서버 설정 · 4 min read · Feb 12, 2026
완벽한 설정 - SUSE 9.2 - 페이지 6
Proftpd
Proftpd 대신 vsftpd를 사용하고 싶습니다. 이는 SUSE의 기본 FTP 서버이며, 제가 이 서버에 설치할 제어판 소프트웨어 (ISPConfig)가 SUSE 9.2에서 Proftpd를 요구하기 때문입니다 (다른 배포판에서는 다릅니다). Proftpd에 대한 SUSE 패키지가 없기 때문에 수동으로 컴파일해야 합니다:
cd /tmp/
wget –passive-ftp ftp://ftp.proftpd.org/distrib/source/proftpd-1.2.10.tar.gz
tar xvfz proftpd-1.2.10.tar.gz
cd proftpd-1.2.10/
./configure –sysconfdir=/etc
make
make install
cd ../
rm -fr proftpd-1.2.10*
이제 파일 /etc/init.d/proftpd를 생성합니다:
| #! /bin/sh # Copyright (c) 2000-2001 SuSE GmbH Nuernberg, Germany. # All rights reserved. # # Original author: Marius Tomaschewski <[email protected]> # # Slightly modified in 2003 for use with SuSE Linux 8.1, # by http://www.learnlinux.co.uk/ # # Slightly modified in 2005 for use with SuSE Linux 9.2, # by Falko Timme # # /etc/init.d/proftpd # ### BEGIN INIT INFO # Provides: proftpd # Required-Start: $network $remote_fs $syslog $named # Required-Stop: # Default-Start: 3 5 # Default-Stop: 0 1 2 6 # Description: Starts ProFTPD server ### END INIT INFO # Determine the base and follow a runlevel link name. base=${0##*/} link=${base#*[SK][0-9][0-9]} # Force execution if not called by a runlevel directory. test $link = $base && START_PROFTPD=yes # Modified by learnlinux.co.uk test "$START_PROFTPD" = yes || exit 0 # Modified by learnlinux.co.uk # Return values acc. to LSB for all commands but # status (see below): # # 0 - success # 1 - generic or unspecified error # 2 - invalid or excess argument(s) # 3 - unimplemented feature (e.g. "reload") # 4 - insufficient privilege # 5 - program is not installed # 6 - program is not configured # 7 - program is not running proftpd_cfg="/etc/proftpd.conf" proftpd_bin="/usr/local/sbin/proftpd" proftpd_pid="/usr/local/var/proftpd.pid" [ -r $proftpd_cfg ] || exit 6 [ -x $proftpd_bin ] || exit 5 # Source status functions . /etc/rc.status # First reset status of this service rc_reset case "$1" in start) echo -n "Starting ProFTPD Server: " test -f /etc/shutmsg && rm -f /etc/shutmsg /sbin/startproc $proftpd_bin rc_status -v ;; stop) echo -n "Shutting down ProFTPD Server: " test -x /usr/local/sbin/ftpshut && /usr/local/sbin/ftpshut now && sleep 1 /sbin/killproc -TERM $proftpd_bin test -f /etc/shutmsg && rm -f /etc/shutmsg rc_status -v ;; restart) ## If first returns OK call the second, if first or ## second command fails, set echo return value. $0 stop $0 start rc_status ;; try-restart) ## Stop the service and if this succeeds (i.e. the ## service was running before), start it again. ## Note: not (yet) part of LSB (as of 0.7.5) $0 status >/dev/null && $0 restart rc_status ;; reload|force-reload) ## Exclusive possibility: Some services must be stopped ## and started to force a new load of the configuration. echo -n "Reload ProFTPD Server: " /sbin/killproc -HUP $proftpd_bin rc_status -v ;; status) # Status has a slightly different for the status command: # 0 - service running # 1 - service dead, but /var/run/ pid file exists # 2 - service dead, but /var/lock/ lock file exists # 3 - service not running echo -n "Checking for ProFTPD Server: " checkproc $proftpd_bin rc_status -v ;; probe) ## Optional: Probe for the necessity of a reload, ## give out the argument which is required for a reload. [ $proftpd_cfg -nt $proftpd_pid ] && echo reload ;; *) echo "Usage: $0 {start|stop|status|restart|reload|try-restart|probe}" exit 1 ;; esac # Set an exit status. rc_exit |
chmod 755 /etc/init.d/proftpd
chkconfig –add proftpd
/etc/init.d/proftpd start
보안상의 이유로 다음 줄을 /etc/proftpd.conf에 추가할 수도 있습니다:
| DefaultRoot ~ IdentLookups off ServerIdent on "FTP Server ready." |
ftp 사용자가 CHMOD를 사용할 수 있도록 하기 위해 다음 줄을 주석 처리해야 합니다:
| # Bar use of SITE CHMOD by default # |
그리고 Proftpd를 재시작합니다:
/etc/init.d/proftpd restart
Webalizer
webalizer를 설치하려면 다음을 실행하세요
apt-get install webalizer
시스템 시계 동기화
시스템 시계를 NTP 서버와 동기화하려면 다음을 수행하세요:
apt-get install netdate
netdate tcp time.nist.gov
/var/spool/cron/tabs/root를 생성합니다:
| # update time with ntp server 0 3,9,15,21 * * * /usr/sbin/netdate time.nist.gov |
그런 다음 실행합니다
chmod 600 /var/spool/cron/tabs/root
/etc/init.d/cron restart
SpamAssassin에 필요한 일부 Perl 모듈 설치 (ISPConfig와 함께 제공됨)
Perl 셸을 사용한 설치
루트로 명령줄에 로그인하고 Perl 셸을 시작하려면 다음 명령을 실행합니다:
perl -MCPAN -e shell
Perl 셸을 처음 실행하면 몇 가지 질문이 표시됩니다. 대부분의 경우 기본 답변이 괜찮습니다.
참고: 시스템에서 방화벽을 실행 중인 경우 Perl 셸에서 작업하는 동안 방화벽을 끄고 필요한 모듈을 지연 없이 가져올 수 있도록 해야 할 수 있습니다. 작업이 끝난 후 다시 켤 수 있습니다.
Perl 셸의 큰 장점은 여기서 설명한 두 가지 방법과 비교하여 새로운 모듈을 설치할 때 종속성을 신경 쓴다는 것입니다. 즉, 다른 모듈을 설치할 때 필수 Perl 모듈이 누락된 경우 Perl 셸이 해당 필수 모듈을 설치할 것인지 물어봅니다. 이 질문에 “예”라고 대답해야 합니다.
SpamAssassin에 필요한 모듈을 설치하려면 다음 명령을 실행합니다:
install HTML::Parser
install Net::DNS (테스트를 활성화하라는 메시지가 표시되면, 아니오를 선택하세요)
install Digest::SHA1
install DB_File
q (Perl 셸을 종료하려면)
모듈이 이미 시스템에 설치되어 있는 경우 다음과 유사한 메시지가 표시됩니다:
HTML::Parser는 최신 상태입니다.
모듈 설치가 성공적으로 완료되면 다음과 같은 메시지가 표시됩니다:
/usr/bin/make install – OK
끝
서버 구성은 이제 완료되었으며, 원하시면 이제 ISPConfig를 설치할 수 있습니다.
SuExec에 대한 주의 사항
CGI 스크립트를 suExec 하에 실행하려면 ISPConfig에서 생성된 웹사이트의 홈 디렉토리로 /srv/www/htdocs를 지정해야 합니다. SUSE의 suExec는 /srv/www/htdocs를 Doc_Root으로 컴파일되었기 때문입니다. /usr/sbin/suexec2 -V를 실행하면 출력은 다음과 같아야 합니다:
ISPConfig 설치 중 웹사이트의 홈 디렉토리로 /srv/www/htdocs를 선택하려면 다음을 수행하세요: 설치 모드에 대한 질문이 있을 때 전문가 모드를 선택하세요.
설치 중에 ISPConfig가 웹사이트를 생성할 기본 디렉토리로 /home/www를 사용할 것인지 질문이 있을 것입니다. n이라고 대답하고 웹사이트의 홈 디렉토리로 /srv/www/htdocs를 입력하세요.
링크
새 게시물을 받은 편지함에서 받기
스팸은 없습니다. 언제든지 구독 해지 가능합니다.