admin 2010.02.23 apache 암호인증 암호인증 설정하기 httd.conf 파일내에 AccessFileName .htaccess 주석해제암호할 인증디렉토리로 이동[root@se html]# vi .htaccess AuthName “xinet”AuthType BasicAuthUserFile /free/home/xinet/html/.htpasswdAuthGroupFile /dev/null<Limit GET POST>require valid-user</Limit>경로 설정만 입력합니다 그리고 다시 해당 경로로 들어가서httpasswd -c /free/home/xinet/html/.htpasswd xinet 여기서 끝에입력한것은 웹에서 인증할 아이디이다암호입력 아파치 재시작 Read More..
admin 2010.02.23 apache2 cband 설치 cband 설치 tar -zxvf mod-cband-0.9.7.5.tgz ./configure –with-apxs=/usr/local/apache/bin/apxs makemake install 버추얼호스트 부분에 아래 부분을 추가 또는 특정 conf 파일을 생성하여 includ 한다 <CBandUser xinet>CBandUserLimit 1500MbCBandUserPeriod 1DCBandUserScoreboard /usr/local/apache/logs/cband/xinet_Scoreboard</CBandUser> 위에서 cband은 nobody권한으로 생성해 준다 scoreboard를 사용하기 위해서 Read More..
admin 2010.02.23 centos5 네임서버 설정하기 centos5 에서는 리눅스 네임서버를 설치하면 기존 4.x 때와는 설정파일이 다르다 centos 4.x 설정파일 /etc/named.conf centos 5.x 설정 파일 /etc/named.caching-nameserver.conf (기존 설정값) /etc/named.rfc1912.zones (존 파일 설정값) centos 5.x 네임서버 설치 및 설정 편하게 yum으로 설치한다[root@localhost ~]# yum -y install bind-*[root@localhost ~]# yum -y install caching-nameserver 기본 설정값을 변경해 준다[root@localhost ~]# vi /etc/name... Read More..
admin 2010.02.23 네임서버 rndc 설정하기 rndc 설정하기[root@ns1 ~]# rndc-confgen # Start of rndc.confkey “rndckey” { algorithm hmac-md5; secret “FZJ4dxYL09ToyH7p5RJdTQ==”;}; options { default-key “rndckey”; default-server 127.0.0.1; default-port 953;};# End of rndc.conf # Use with the following in named.conf, adjusting the allow list as needed:# key “rndckey” {# algorithm hmac-md5;# ... Read More..
admin 2010.02.23 spamassassin 설치 및 설정 정상적으로 send mail이 설치 된 후 설치합니다. ▶ spamassassin 설치 [root@localhost ~]# yum -y install spamassassin 아울러 sendmail에서 MILTER 기능을 지원하는 sendmail이라면, 실행할 때 다음과 같이 MILTER가 보여야 한다 [root@localhost ~]# sendmail -d0.10 < /dev/null | grep MILTER MATCHGECOS MILTER MIME7TO8 MIME8TO7 NAMED_BIND NETINET NETINET6 ▶ /etc/mail/sendmail.mc 파일을 열어 하단에 다음 예제와 같이 3줄을 추가한다 [root@localhost ~]# vi /etc/mail/sendm... Read More..
admin 2010.02.23 sendmail 설치 및 설정 리눅스의 기본 sendmail 기본 설정값 ▶ rpm 또는 yum으로 설치한다 [root@localhost ~]# yum -y install sendmail* ▶ 메일 설정을 하기 위해 주석 제거 (48라인 근처) [root@localhost ~]# vi /etc/mail/sendmail.mc =================이 부분 주석 제거 (주석제거는 dnl 삭제)=========================TRUST_AUTH_MECH(DIGEST-MD5 CRAM-MD5 LOGIN PLAIN’)dnldefine(confAUTH_MECHANISMS’, DIGEST-MD5 CRAM-MD5 LOGIN PLAIN’)dnl ================= 105번 라인 부분 수정 =================... Read More..
admin 2010.02.23 64bit O/S환경 GEOIP 모듈 적재 ### 64bit O/S환경 GEOIP 모듈 적재 환경 : CentOS 5.3 64Bit 1. 먼저 YUM으로 커널을 업데이트 한다 [root@ns ~]# yum update kernel[root@ns ~]# yum update kernel-devel [root@ns ~]# yum install yum-utils 리부팅 yum의 서버를 국내서버를 이용하기 이용서 yum 리스트를 추가해 준다 [root@ns ~]# vi /etc/yum.repos.d/CentOS-Base.repo 추가[centossrpm]name=CentOS-$releasever – SRPMSbaseurl=ftp://ftp.daum.net/centos/$releasever/os/SRPMS/#yum-fastestmirror를 사용하고 있다면 ... Read More..
admin 2010.02.23 디렉토리 이하 파일내용 수정 #!/bin/bash check_dir_name() { dir=$1 len=expr length $dir last_char=expr substr $dir $len 1 if [ “$last_char” = “/” ]; then dir=expr substr $dir 1 $((len-1)) fi unset len last_char} cur_dir_files_conv() { check_dir_name $1 for i in grep -l “$findstring” $dir/* 2> /dev/null do orig=”$i” temp=”$i.tmp” cp $orig $temp && \ sed -e “s/$exp_f... Read More..
admin 2010.02.23 2일이상 지난 파일 삭제 find /tmp -ctime +2 -name “php*” -exec rm -f ‘{}’ \; ctime 명령어를 이용하면 된다 Read More..
admin 2010.02.23 하루 전 날짜 구하기 쉘 today=date +%Y%m%d ### 하루전날date1=date –date ‘1 days ago’ ‘+%Y%m%d’ Read More..