proftpd 설치 방법이다. 아래순서대로 따라 입력하면 된다.
http://www.proftpd.org
proftpd-1.2.2.tar.gz
vi /etc/passwd
proftpd:x:501:501::/usr/local/proftpd:/bin/false
vi /etc/group
proftpd:x:501:
gzip -dc proftpd-1.2.2.tar.gz | tar vxf -
cd proftpd-1.2.2
./configure --prefix=/usr/local/proftpd --enable-autoshadow
make
make install
cp contrib/dist/rpm/proftpd.init.d /etc/rc.d/init.d/proftpd
cd /etc/rc.d/init.d/
chmod 755 proftpd
vi /etc/rc.d/init.d/proftpd
#!/bin/sh
#
# Startup script for ProFTPd
#
# chkconfig: 345 85 15
# description: ProFTPD is an enhanced FTP server with \
# a focus toward simplicity, security, and ease of configuration. \
# It features a very Apache-like configuration syntax, \
# and a highly customizable server infrastructure, \
# including support for multiple 'virtual' FTP servers, \
# anonymous FTP, and permission-based directory visibility.
# processname: proftpd
# config: /etc/proftpd.conf
#
# Source function library.
. /etc/rc.d/init.d/functions
FTPSHUT=/usr/local/proftpd/sbin/ftpshut
FTPDAEMON=/usr/local/proftpd/sbin/in.proftpd
PID=/usr/local/proftpd/var/proftpd.pid
# See how we were called.
case "$1" in
start)
echo -n "Starting proftpd: "
if [ -f $FTPDAEMON ]; then
echo -n "Started "
$FTPDAEMON
fi
echo
touch /var/lock/subsys/proftpd
;;
stop)
echo -n "Shutting down proftpd: "
if [ -f $PID ]; then
echo -n "Stopped "
/bin/kill `cat $PID`
fi
echo
rm -f /var/lock/subsys/proftpd
;;
status)
status proftpd
;;
restart)
$0 stop
$0 start
;;
reread)
echo -n "Re-reading proftpd config: "
killproc proftpd -HUP
echo
;;
suspend)
if [ -f $FTPSHUT ]; then
if [ $# -gt 1 ]; then
shift
echo -n "Suspending with '$*' "
$FTPSHUT $*
else
echo -n "Suspending NOW "
$FTPSHUT now "Maintanance in progress"
fi
else
echo -n "No way to suspend "
fi
echo
;;
resume)
if [ -f /etc/shutmsg ]; then
echo -n "Allowing sessions again "
rm -f /etc/shutmsg
else
echo -n "Was not suspended "
fi
echo
;;
*)
echo -n "Usage: $0 {start|stop|restart|status|reread|resume"
if [ "$FTPSHUT" = "" ]; then
echo "}"
else
echo "|suspend}"
echo "suspend accepts additional arguments which are passed to ftpshut(8)"
fi
exit 1
esac
if [ $# -gt 1 ]; then
shift
$0 $*
fi
exit 0
chmod 755 /etc/rc.d/init.d/proftpd
chown -R proftpd:proftpd /usr/local/proftpd/
vi /usr/local/proftpd/etc/proftpd.conf
# This is a basic ProFTPD configuration file (rename it to
# 'proftpd.conf' for actual use. It establishes a single server
# and a single anonymous login. It assumes that you have a user/group
# "nobody" and "ftp" for normal operation and anon.
ServerName "OPEN"
ServerType standalone
DefaultServer on
# Port 21 is the standard FTP port.
Port 21
# Umask 022 is a good standard umask to prevent new dirs and files
# from being group and world writable.
Umask 022
# To prevent DoS attacks, set the maximum number of child processes
# to 30. If you need to allow more than 30 concurrent connections
# at once, simply increase this value. Note that this ONLY works
# in standalone mode, in inetd mode you should use an inetd server
# that allows you to limit maximum number of processes per service
# (such as xinetd)
MaxInstances 30
# Set the user and group that the server normally runs at.
User proftpd
Group proftpd
# Normally, we want files to be overwriteable.
<Directory /*>
AllowOverwrite on
</Directory>
######## Global start ###################################
<Global>
Umask 022
#DisplayLogin .welcome.msg
#DisplayFirstChdir .message
#User nobody
#Group nogroup
#MaxClients 10
#MaxClientsPerHost 1
#UserAlias anonymous ftp
RootLogin off
#AuthPAMAuthoritative on
#TimeoutIdle 300
DeferWelcome off
RequireValidShell on
ShowSymlinks on
DefaultRoot ~
timesGMT off
</Global>
######## Global end ###################################
# A basic anonymous configuration, no upload directories.
<Anonymous ~ftp>
User ftp
Group ftp
# We want clients to be able to login with "anonymous" as well as "ftp"
UserAlias anonymous ftp
# LsDefaultOptions "-a"
# Limit the maximum number of anonymous logins
MaxClients 10
MaxClientsPerHost 3 "Sorry, one connection allow per one host"
# HideUser root
# HideGroup root
# We want 'welcome.msg' displayed at login, and '.message' displayed
# in each newly chdired directory.
DisplayLogin welcome.msg
DisplayFirstChdir .message
# Limit WRITE everywhere in the anonymous chroot
<Limit WRITE>
DenyAll
</Limit>
<Directory incoming>
<Limit READ>
DenyALL
</Limit>
<Limit STOR MKD>
AllowALL
</Limit>
</Directory>
<Directory logs>
<Limit READ WRITE DIRS>
DenyALL
</Limit>
</Directory>
</Anonymous>
/etc/rc.d/init.d/proftpd restart
'전자/컴퓨터 > Unix/Linux' 카테고리의 다른 글
sendmail 설치 스크립트 (2) | 2008.07.21 |
---|---|
NetBSD3.0에 APM설치 방법 (0) | 2007.04.17 |