kernel: ip_conntrack: table full, dropping packet ip_conntrack 모듈에서 연결 추적을 기록하는 테이블의 객수 제한때문에 생긴다.ip_conntrack table 가득차서 발생. # ip_conntrack table 확인방법cat /proc/net/ip_conntrack 해결하기================================================================== # 계산하기(32비트)CONTRACK_MAX = RAMSIZE(단위: byte) / 16384 / ( x / 32) HASHSIZE = CONNTRAK_MAX / 8 = RAMSIZE(단위: byte) / 131072 / (x / 32) CONTRACK_MAX = 2048M * 1024 * 1024 / 16384 * 32 = 131072 * 32 = 4194304HASHSIZE = CONNTRAK_MAX / 8 = 4194304 / 8 = 524288, # 계산하기(64비트)CONTRACK_MAX = RAMSIZE(단위: byte) / 16384 / ( x / 64) HASHSIZE = CONNTRAK_MAX / 8 =
빈줄 삭제:g/^$/d # 해당 문자열이 들어간 라인 삭제설명 : 이 문자열이 들어간 라인은 모두 삭제:% g/문자열/d # 특정 문자열만 들어간 라인 삭제설명 : 문자열 앞 뒤로 < 와 > 를 감싸주면 해당 단어만을 의미한다.:% g/<문자열>/d
# gd 소스 설치 tar xvfpz gd-2.0.33.tar.gzcd gd-2.0.33./configure --prefix=/opt/webapps/gd makemake install
# libmcrypt 소스 설치 tar xvfpz libmcrypt-2.5.7.tar.gzcd libmcrypt-2.5.7./configure --prefix=/opt/webapps/libmcrypt makemake install
wget http://dev.centos.org/centos/5/CentOS-Testing.repo mv CentOS-Testing.repo /etc/yum.repos.d/ yum --enablerepo=c5-testing update php
프로세스별로 오픈된 파일 개수 확인하기 지정한 프로세스가 몇개의 파일을 사용중인지 확인하기 lsof -p PID | wc -l lsof -p 23425,24255 |wc -l
# openssl 소스 설치 tar xvfpz openssl-0.9.8g.tar.gzcd openssl-0.9.8g ./config -fPIC --prefix=/opt/webapps/openssl shared threads zlib makemake install echo "/opt/webapps/openssl/lib" >> /etc/ld.so.conf
# libiconv 소스 설치 tar xvfpz libiconv-1.9.2.tar.gzcd libiconv-1.9.2./configure --prefix=/usr makemake install
# libidn 소스 설치 tar xvfpz libidn-0.5.9.tar.gzcd libidn-0.5.9./configure --prefix=/usr makemake install
# mysql 소스 설치 tar xvfpz mysql-5.0.83.tar.gzcd mysql-5.0.83 useradd -M -r -d /var/lib/mysql -s /bin/bash -c "MySQL Server" -u 27 mysql./configure --prefix=/opt/webapps/mysql5 --localstatedir=/var/lib/mysql5 --with-thread-safe-client --with-client-ldflags=-all-static --with-mysqld-ldflags=-all-static --enable-thread-safe-client --without-debug --without-docs --without-bench --with-charset=utf8 --with-language=korea --with-extra-charsets=all --with-plugins=innobase makemake install mv my.cnf /etc/my.cnfmv mysqld.log /etc/logrotate.d/mysqldmv mysqld_5 /etc/init.d/mysqld chmod 700 /etc
# httpd 소스 설치 tar xvfpz httpd-2.0.63.tar.zcd httpd-2.0.63 # apache + 64bit problemrm -f configurerm -f srclib/apr-util/configure./buildconf ./configure --prefix=/opt/webapps/apache2 --enable-so --enable-ssl --with-ssl=/usr --enable-lib64 --libdir=/usr/lib64 --enable-cache --enable-deflate --enable-proxy --enable-mem-cache --enable-expires --enable-rewrite --enable-mods-shared=mod_rewrite --enable-security --with-module=proxy:mod_security.c makemake install mkdir /var/log/httpdchmod 711 /opt/webappschmod 755 /opt/webapps/apache2chmod 644 /opt/webapps/apache2/conf/*chmod 600 /opt/
rsync를 이용하여 동기화 할때 특정 폴더 제외하기 예) /home/src/ 폴더를 /home/dest/ 폴더로 동기화하는데 /home/src/a/ 폴더는 제외시킬 경우 rsync -av --delete --exclude 'a' /home/src/ /home/dest/ 주의사항: --exclude 는 상대경로를 써줘야 함. exclude 패턴을 여러개 지정하고 싶을 경우엔--exclude-from 에 파일 경로를 지정해 주면 된다. 예) /home/src/ 폴더를 /home/dest/ 폴더로 동기화하는데 /home/src/a/, /home/src/b/ 을 제외 할 경우 /home/pattern.txt 란 파일에 패턴을 저장. a/ b/ 아래의 명령어 실행. rsync -av --delete --exclude-from '/home/pattern.txt'/home/src/ /home/dest/