Tag Archives: ioerror

Home »  Tag: ioerror

fail2ban

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가 표시됨!

DSN: Data format error

/etc/mail/sendmail.cf
Dj$ msnote.co.kr << 설정
/etc/mail/local-host-names
msnote.co.kr     << 추가

파일비교 diff

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 —-

php libmysqlclient.so.18 error

/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
 
 

An error occurred while getting provider information from the database

<connectionStrings>
<add name=”ReaderInsightDbContext”
connectionString=”data source=localhost\MSSQLSERVER;
initial catalog=ReaderInsight;Integrated Security=True”
providerName=”System.Data.SqlClient” />
</connectionStrings>

IIS 세션 상태 서버에 세션 상태 요청을 할 수 없습니다

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\aspnet_state\Parameters
에서 AllowRemoteConnection 이  127.0.0.1 또는 localhost 확인, 없으면 생성
 
서비스에서 ASP.NET State Service 확인
 

windows 2008 이상 메일서버 설정

windows 2008 이상부터는 POP에 대한 서비스를 지원하지않음.
대신 visendo smtp extender 을 설치하면됨! ㅋㅋ
http://kr.medownloads.com/download-Visendo-SMTPExtender-%C7%C3%B7%AF%BD%BA-651552.htm
설정은 좀 개쉬움..
smtp 설정 후 릴레이 설정 까묵하지 맙시다
 

php 동적모듈추가

소스설치시 소스디렉토리이동
 
/php-5.2.17/ext/soap
/usr/local/php/bin/phpize
./configure –with-php-config=/usr/local/php/bin/php-config
make
 
/usr/local/apache/conf/php.ini 여기에서 extension_dir= 경로로 .so 파일을 복사
 
 
extension=”모듈이름”
 
에효..

모바일 접속시 모바일페이지로!! (  mod_rewrite  )

/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]
 
> 끝!

mssql DB 접속자 및 IP확인

SELECT S.SPID, S.LOGINAME, S.LOGIN_TIME, S.LAST_BATCH, C.CLIENT_NET_ADDRESS
FROM sys.sysprocesses S, sys.dm_exec_connections C
WHERE S.spid = C.SESSION_ID