以service xinetd restart 的方式開啟proftpd
1
mount /dev/cdrom /mnt
2
cd /mnt/server
3
vim /etc/yum.repos.d/rhel-source.repo
[rhel-source]
name=red hat enterprise linux $releasever - source
baseurl=file:///mnt/server/
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/rpm-gpg-key-redhat-release
4
yum install -y gcc*
5
cd /root
6
cd desktop
7
tar fvxz proftpd-1.3.3.tar.gz
cd proftpd-1.3.3
8
./configure --prefix=/usr/local/proftpd --enable-shadow --enable-autoshadow --with-modules=mod_ratio:mod_readme:mod_wrap
9
make && make install
10
cd /usr/local/proftpd/
11
vim /etc/man.config
#
.gz /usr/bin/gunzip -c
.bz2 /usr/bin/bzip2 -c -d
.z
.z /bin/zcat
.f
.y
manpath /usr/local/proftpd/man
12
cd /etc/xinetd.d/
13
vim proftpd
service 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
}
14
vim /usr/local/proftpd/etc/proftpd.conf
servertype standalone
servertype inetd
defaultserver on
# port 21 is the standard ftp port.
port 21
# don't use ipv6 support by default.
useipv6 off
# 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 under which the server will run.
user nobody
group nobody
15
service xinetd restart
[root@localhost xinetd.d]# service xinetd restart
停止 xinetd: [确定]
啟動 xinetd: [确定]
16
netstat -antlp | grep :21
[root@localhost xinetd.d]# netstat -antlp | grep :21
tcp 0 0 0.0.0.0:21 0.0.0.0:* listen 23877/xinetd
17
mkdir -p ftp/pub
18 在用戶端
[root@localhost ~]# ftp 192.168.18.157
connected to 192.168.18.157.
220 proftpd 1.3.3 server (proftpd default installation) [192.168.18.157]
500 auth not understood
kerberos_v4 rejected as an authentication type
name (192.168.18.157: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>
用service proftpd restart
1
cd /root
2
cd desktop
3
cd proftpd-1.3.3
4
./configure --prefix=/usr/local/proftpd --enable-shadow --enable-autoshadow --with-./configure --prefix=/usr/local/proftpd --enable-shadow --enable-autoshadow --with-
5
make && make install
6
cp contrib/dist/rpm/proftpd.init.d /etc/init.d/proftpd
7
service proftpd restart
8
cd /etc/init.d/
9
chmod 755 proftpd
10
11
vim /usr/local/proftpd/etc/proftpd.conf
12
vim /etc/init.d/proftpd
path="$path:/usr/local/proftpd/sbin"
13
service proftpd restart
[root@localhost ~]# service proftpd restart
shutting down proftpd: [失敗]
starting proftpd: [确定]
14
shutting down proftpd: [确定]
15
netstat -antlp | grep :21
[root@localhost ~]# netstat -antlp | grep :21
tcp 0 0 0.0.0.0:21 0.0.0.0:* listen 944/proftpd: (accep
16
在用戶端上
ftp> quit
221 goodbye.
you have new mail in /var/spool/mail/root