RHEL 5.4 手工安装管理 vsftpd 2.0.5-16

[edgen@rhel54 ~]$ su
口令:
[root@rhel54 edgen]# rpm -qa | grep vsftpd
[root@rhel54 edgen]# mount
/dev/mapper/VolGroup00-LogVol00 on / type ext3 (rw)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
/dev/sda1 on /boot type ext3 (rw)
tmpfs on /dev/shm type tmpfs (rw)
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
none on /proc/fs/vmblock/mountPoint type vmblock (rw)
sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw)
/dev/hdc on /media/RHEL_5.4 i386 DVD type iso9660 (ro,noexec,nosuid,nodev,uid=500)
[root@rhel54 edgen]# cd /media/RHEL_5.4\ i386\ DVD/
[root@rhel54 RHEL_5.4 i386 DVD]# ll | grep vsftp
[root@rhel54 RHEL_5.4 i386 DVD]# cd Server/
[root@rhel54 Server]# ll | grep vsftp
-r--r--r--  86 edgen root   143838 2009-07-24 vsftpd-2.0.5-16.el5.i386.rpm
[root@rhel54 Server]# rpm -ivh vsftpd-2.0.5-16.el5.i386.rpm
warning: vsftpd-2.0.5-16.el5.i386.rpm: Header V3 DSA signature: NOKEY, key ID 37017186
Preparing...                ########################################### [100%]
   1:vsftpd                 ########################################### [100%]
[root@rhel54 Server]# exit
exit
[edgen@rhel54 ~]$ rpm -qa | grep vsftpd
vsftpd-2.0.5-16.el5


[edgen@rhel54 ~]$ su
口令:

[root@rhel54 edgen]# /sbin/chkconfig vsftpd on
[root@rhel54 edgen]# /sbin/service vsftpd on
用法:/etc/init.d /vsftpd {start |stop |restart |condrestart |status }
[root@rhel54 edgen]# /sbin/service vsftpd restart
关闭 vsftpd:                                              [失败]
为 vsftpd 启动 vsftpd:                                    [确定]


[root@rhel54 edgen]# /sbin/iptables -A INPUT -p tcp --dport 21 -j ACCEPT
[root@rhel54 edgen]# /sbin/iptables -A INPUT -p tcp --dport 20 -j ACCEPT
[root@rhel54 edgen]# /sbin/iptables -L INPUT
Chain INPUT (policy ACCEPT)
target     prot opt source               destination        
RH-Firewall-1-INPUT  all  --  anywhere             anywhere           
ACCEPT     tcp  --  anywhere             anywhere            tcp dpt:ftp
ACCEPT     tcp  --  anywhere             anywhere            tcp dpt:ftp-data


[root@rhel54 edgen]# cd /etc/vsftpd/
[root@rhel54 vsftpd]# vi ftpusers
[root@rhel54 vsftpd]# cat ftpusers  | grep root
#root


[root@rhel54 vsftpd]# set SELinux ftpd_disable_trans 1


[root@rhel54 vsftpd]# vi /etc/vsftpd/vsftpd.conf
[root@rhel54 vsftpd]# cat /etc/vsftpd/vsftpd.conf | grep local_root
local_root=/
[root@rhel54 vsftpd]# /sbin/service vsftpd restart
关闭 vsftpd:                                              [确定]
为 vsftpd 启动 vsftpd:                                    [确定]


[root@rhel54 vsftpd]# vi /etc/vsftpd/vsftpd.conf
[root@rhel54 vsftpd]# cat /etc/vsftpd/vsftpd.conf | grep pasv
pasv_enable=YES
pasv_min_port=30000
pasv_max_port=30100

[root@rhel54 vsftpd]# /sbin/service vsftpd restart
关闭 vsftpd:                                              [确定]
为 vsftpd 启动 vsftpd:                                    [确定]

[root@rhel54 vsftpd]# vi /etc/sysconfig /iptables
[root@rhel54 vsftpd]# cat /etc/sysconfig/iptables
...

...
-A RH-Firewall-1-INPUT -p tcp --dport 30000:30100 -j ACCEPT
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 21 -j ACCEPT

COMMIT
[root@rhel54 vsftpd]# /sbin/service iptables restart
清除防火墙规则:                                           [确定]
把 chains 设置为 ACCEPT 策略:filter                       [确定]
正在卸载 Iiptables 模块:                                  [确定]
应用 iptables 防火墙规则:                                 [确定]
载入额外 iptables 模块:ip_conntrack_netbios_ns            [确定]
[root@rhel54 vsftpd]# /sbin/service vsftpd restart
关闭 vsftpd:                                              [确定]
为 vsftpd 启动 vsftpd:                                    [确定]
[root@rhel54 vsftpd]# exit

猜你喜欢

转载自edgenhuang.iteye.com/blog/856134