Tag Archives: ioerror
Home » Tag: ioerror


fail2ban 설치
[Msnote, /usr/local/src >vi /etc/yum.repos.d/CentOS-Base.repo
> 아래 내용추가후~
[Msnote, /usr/local/src >yum install fail2ban
####################내용추가######################
[dag]
name=Dag RPM Repostory for Red Hat Enterprise Linux
baseurl=http://apt.sw.be/redhat/el$releasever/en/$basearch/dag
gpgcheck=1
enabled=1
gpgkey=http://dag.wieers.com/packages/RPM-GPG-KEY.dag.txt
[kbs-CentOS-Misc]
name=CentOS.Karan.Org-EL$releasever – Stable
gpgkey=http://centos.karan.org/RPM-GPG-KEY-karan.org.txt
gpgcheck=1
enabled=1
baseurl=http://centos.karan.org/el$releasever/misc/stable/$basearch/RPMS/
#####################내용끝######################
[Msnote, /etc/fail2ban >vi /etc/fail2ban/jail.conf
> SSH 를 예로 적용한사례
#enabled = false //미적용
enabled = true // 적용
filter = sshd
action = iptables[name=SSH, port=ssh, protocol=tcp]
logpath = /var/log/secure // 참조로그
maxretry = 5 // 시도횟수
bantime = 600 // 밴타임
iptables -vnL
fail2ban 실행시 체인생성됨
193 11048 fail2ban-SSH tcp — * * 0.0.0.0/0 0.0.0.0/0 tcp dpt:22
Chain fail2ban-SSH (1 references)
> 여기에 드랍IP가 표시됨!



diff [옵션] [파일1] [파일2]
-c : 보다 자세하게 파일의 다른점을 보여줌
-d : 파일의 내용을 세밀하게 분석함
-r : 재귀적비교, 두 디렉토리를 비교하여, 같은 이름의 파일에 대하여 내용이 다른점을 확인한다.
자세한 설명은 아래쪽에…
-s : 두파일의 내용이 동일한 경우에도 동일하다는 메시지를 출력해준다.
> 요런식으로 사용가능
[Msnote, /home/master >diff -cds php.ini php.ini_2
*** php.ini 2013-10-14 13:38:31.000000000 +0900
— php.ini_2 2013-10-14 13:56:40.000000000 +0900
***************
*** 1880,1886 ****
; (time to live) Sets the number of second while cached file will be used
; instead of original one.
; http://php.net/soap.wsdl-cache-ttl
! soap.wsdl_cache_ttl=86400
; Sets the size of the cache limit. (Max. number of WSDL files to cache)
soap.wsdl_cache_limit = 5
— 1880,1886 —-
; (time to live) Sets the number of second while cached file will be used
; instead of original one.
; http://php.net/soap.wsdl-cache-ttl
! soap.wsdl_cache_ttl=96400
; Sets the size of the cache limit. (Max. number of WSDL files to cache)
soap.wsdl_cache_limit = 5
***************
*** 1915,1918 ****
; Local Variables:
; tab-width: 4
– ; End:
— 1915,1917 —-


/usr/local/src/nginx/php-5.2.17/sapi/cli/php: error while loading shared libraries: libmysqlclient.so.18: cannot open shared object file: No such file or directory
make[1]: *** [install-pear-installer] 오류 127
make: *** [install-pear] 오류 2
locate libmysqlclient.so.18 // 모듈 위치확인
/usr/local/mysql/lib/libmysqlclient.so.18 // 이런경로에 나오면!!
vi /etc/ld.so.conf
/usr/local/mysql/lib 추가
ldconfig






/usr/local/apache/conf/httpd.conf
> 모듈 로드 확인
LoadModule rewrite_module modules/mod_rewrite.so
> 모바일 디바이스 선언
UnsetEnv MOBILE_DEVICE
SetEnvIfNoCase User-Agent “iphone” MOBILE_DEVICE=TRUE
SetEnvIfNoCase User-Agent “android” MOBILE_DEVICE=TRUE
SetEnvIfNoCase User-Agent “ipod” MOBILE_DEVICE=TRUE
SetEnvIfNoCase User-Agent “ipad” MOBILE_DEVICE=TRUE
SetEnvIfNoCase User-Agent “midp” MOBILE_DEVICE=TRUE
>vhost 설정
/usr/local/apache/conf/extra/httpd-vhosts.conf
RewriteEngine on
RewriteCond %{ENV:MOBILE_DEVICE} ^TRUE$
RewriteRule ^(.*)$ http://m.msnote.co.kr$1 [L]
> 끝!
