方法一:
一、安装proftpd:
前提需要先安装gcc: [root@localhost ~]# mount /dev/cdrom /mnt mount: block device /dev/cdrom is write-protected, mounting read-only [root@localhost ~]# yum install gcc* 安装proftpd: [root@localhost ~]# tar fvxz proftpd-1.3.3.tar.gz [root@localhost ~]# ls anaconda-ks.cfg install.log proftpd-1.3.3 vmware-tools-distrib Desktop install.log.syslog proftpd-1.3.3.tar.gz [root@localhost ~]# tar fvxz proftpd-1.3.3.tar.gz [root@localhost ~]# cd proftpd-1.3.3 [root@localhost proftpd-1.3.3]# ls[root@localhost proftpd-1.3.3]# ./configure --prefix=/usr/local/proftpd/ --enable-shadow --enable-autoshadow --with-modules=mod_ratio:mod_readme:mod_wrap
[root@localhost proftpd-1.3.3]# make && make install [root@localhost proftpd-1.3.3]# cd /usr/local/proftpd/ [root@localhost proftpd]# ls bin etc include lib libexec sbin share var [root@localhost proftpd]# 修改man配置文件: [root@localhost proftpd]# vim /etc/man.config 在最后一行加入:MANPATH /usr/local/proftpd/man 以超级守护进程方式启动: [root@localhost proftpd]# cd /etc/xinetd.d [root@localhost xinetd.d]# ls chargen-dgram discard-stream gssftp rmcp time-stream chargen-stream echo-dgram klogin rsync daytime-dgram echo-stream krb5-telnet tcpmux-server daytime-stream eklogin kshell tftp discard-dgram ekrb5-telnet proftpd time-dgram [root@localhost xinetd.d]# vim proftpd server ftp { disable=no flags=REUSE socket_type=stream wait=no user=root server=/usr/local/proftpd/sbin/proftpd server_args=-C /usr/local/proftpd/etc/proftpd.conf log_on_success +=DURATION USERID log_on_failure +=USERID } ~ 修改proftpd的配置文件: [root@localhost xinetd.d]# vim /usr/local/proftpd/etc/proftpd.conf ServerType inetd Group nobody[root@localhost xinetd.d]# service xinetd restart
停止 xinetd: [确定] 启动 xinetd: [确定] [root@localhost xinetd.d]# netstat -antlp | grep :21 [root@localhost xinetd.d]# netstat -antlp | grep :21 [root@localhost xinetd.d]# ftp 192.168.18.127 Connected to 192.168.18.127. 220 ProFTPD 1.3.3 Server (ProFTPD Default Installation) [192.168.18.127] 500 AUTH not understood 500 AUTH not understood KERBEROS_V4 rejected as an authentication type Name (192.168.18.127:root): ftp 331 Anonymous login ok, send your complete email address as your password Password: 530-Unable to set anonymous privileges. 530 Login incorrect. Login failed. Remote system type is UNIX. Using binary mode to transfer files. ftp> quit方法二:
安装proftpd略:
[root@localhost proftpd]# cd /usr/local/
[root@localhost local]# [root@localhost local]# ls bin etc games include lib libexec proftpd sbin share src [root@localhost local]# cd /etc/init.d/ [root@localhost init.d]# ls [root@localhost init.d]# cd [root@localhost ~]# ls anaconda-ks.cfg install.log.syslog unrar-3.5.4-1.2.fc4.src.rpm Desktop proftpd-1.3.3 vmware-tools-distrib install.log proftpd-1.3.3.tar.gz [root@localhost ~]# cd proftpd-1.3.3 [root@localhost proftpd-1.3.3]# ls [root@localhost proftpd-1.3.3]# cd contrib/dist/rpm/ [root@localhost rpm]# ls proftpd.init.d proftpd.init.d.suse proftpd.logrotate xinetd [root@localhost rpm]# cd [root@localhost ~]# cd proftpd-1.3.3 [root@localhost proftpd-1.3.3]# cp contrib/dist/rpm/proftpd.init.d /etc/init.d/proftpd[root@localhost proftpd-1.3.3]# service proftpd restart
proftpd: 未被识别的服务 [root@localhost proftpd-1.3.3]# cd /etc/init.d/ [root@localhost init.d]# ls[root@localhost init.d]# ll
-rwxr-xr-x 1 root root 1203 2008-07-09 pand
-rwxr-xr-x 1 root root 2020 2009-12-22 pcscd -rwxr-xr-x 1 root root 1877 2006-07-13 portmap -rw-r--r-- 1 root root 1941 01-06 21:07 proftpd -rwxr-xr-x 1 root root 1030 2008-07-16 psacct[root@localhost init.d]# chmod 755 proftpd
[root@localhost init.d]# service proftpd restart Shutting down proftpd: [失败] Starting proftpd: /bin/bash: proftpd: command not found [失败] [root@localhost init.d]# [root@localhost init.d]# vim proftpdPATH="$PATH:/usr/local/proftpd/sbin"
[root@localhost init.d]# service proftpd restart
Shutting down proftpd: [失败] Starting proftpd: - Fatal: Group: Unknown group 'nogroup' on line 30 of '/usr/local/proftpd//etc/proftpd.conf' [失败] [root@localhost init.d]# [root@localhost init.d]# vim /usr/local/proftpd/etc/proftpd.conf Group nobody[root@localhost init.d]# service proftpd restart
Shutting down proftpd: [确定] Starting proftpd: [确定] [root@localhost init.d]# netstat -antlp | grep :21 tcp 0 0 0.0.0.0:21 0.0.0.0:* LISTEN 16612/proftpd: (acc [root@localhost init.d]#在客户端测试:
[root@localhost ~]# ftp 172.17.17.2 Connected to 172.17.17.2. 220 ProFTPD 1.3.3 Server (ProFTPD Default Installation) [172.17.17.2] 500 AUTH not understood 500 AUTH not understood KERBEROS_V4 rejected as an authentication type Name (172.17.17.2:root): ftp 331 Anonymous login ok, send your complete email address as your password Password: 530-Unable to set anonymous privileges. 530 Login incorrect. Login failed. Remote system type is UNIX. Using binary mode to transfer files. ftp> quit 221 Goodbye.