cd /usr/local/directadmin/custombuild
./build update
./build set proftpd yes
mkdir -p custom/proftpd
wget -O custom/proftpd/configure.proftpd http://files.directadmin.com/services/all/sftp/configure.proftpd.sftp
chmod 755 custom/proftpd/configure.proftpd
./build proftpd
2)备份旧的配置,并抓住新的配置:
cd /etc
cp proftpd.conf proftpd.conf.backup
wget -O proftpd.conf http://files.directadmin.com/services/all/sftp/proftpd.conf
wget -O proftpd.sftp.conf http://files.directadmin.com/services/all/sftp/proftpd.sftp.conf
perl -pi -e 's/|SERVER_IP|/1.2.3.4/' proftpd.conf
perl -pi -e 's/|SERVER_IP|/1.2.3.4/' proftpd.sftp.conf
[root@server ~]#/etc/init.d/proftpd restart
Shutting down proftpd: [ OK ]
Starting proftpd: [ OK ]
[root@server ~]# telnet localhost 21
Trying 127.0.0.1...
Connected to localhost.localdomain (127.0.0.1).
Escape character is '^]'.
220 ProFTPD 1.3.4a Server ready.
QUIT
221 Goodbye.
Connection closed by foreign host.
[root@server ~]# telnet localhost 23
Trying 127.0.0.1...
Connected to localhost.localdomain (127.0.0.1).
Escape character is '^]'.
SSH-2.0-mod_sftp/0.9.8
garbledtext
Connection closed by foreign host.
cd /usr/local/directadmin/custombuild
mkdir -p custom/proftpd/conf
wget -O custom/proftpd/conf/proftpd.conf http://files.directadmin.com/services/all/sftp/proftpd.conf
./build proftpd