redhat5.4linux64位安装vsftpd

安装最新版本,总是有这样那样的问题,这里安装的是vsftp2.0.5.rpm这个版本。

创建本地用户:

useradd -g ftp ftpadmin

passwd ftpadmin

mkdir -p /var/ftp/pub

chown -R ftpadmin:ftp /var/ftp/pub

chmod 755 /var/ftp/pub

rm -rf /home/ftpadmin


由于vsftp编译包安装试了很久都没有成功,
就改为redhat5.4下面的rpm安装包了。
进入到redhat的ISO中的Server,目录下。
cp vsftpd-2.0.5-16.el5.x86_64.rpm /usr/local/share/
cd /usr/local/share
chmod 755 vsftpd-2.0.5-16.el5.x86_64.rpm
rpm -ivh vsftpd-2.0.5-16.el5.x86_64.rpm
安装成功后。
service vsftpd restart



如果启动失败,尝试如下:
关闭xinetd启动方式:
cd /etc/xinetd.d
mv vsftpd vsftpd.bak
service xinetd restart
service vsftpd restart(第一个失败,第二个成功才对)
vim /etc/selinux/config
关闭SELINUX
SELINUX=disabled
默认启动vsftpd
chkconfig vsftpd on
关闭防火墙(被动模式感觉有点烦,测试了没有成功)
service iptables stop
chkconfig iptables off
iptables开机自动启动:
开启: chkconfig iptables on
关闭: chkconfig iptables off
iptables关闭服务:
开启: service iptables start
关闭: service iptables stop


如果成功:
修改vim /etc/vsftpd/vsftpd.conf
# users to NOT chroot().
#chroot_list_enable=YES
# (default follows)
#chroot_list_file=/etc/vsftpd/chroot_list
#
# You may activate the "-R" option to the builtin ls. This is disabled by
# default to avoid remote users being able to cause excessive I/O on large
# sites. However, some broken FTP clients such as "ncftp" and "mirror" assume
# the presence of the "-R" option, so there is a strong case for enabling it.
#ls_recurse_enable=YES
#
# When "listen" directive is enabled, vsftpd runs in standalone mode and
# listens on IPv4 sockets. This directive cannot be used in conjunction
# with the listen_ipv6 directive.
listen=YES
#
# This directive enables listening on IPv6 sockets. To listen on IPv4 and IPv6
# sockets, you must run two copies of vsftpd whith two configuration files.
# Make sure, that one of the listen options is commented !!
#listen_ipv6=YES

pam_service_name=vsftpd
userlist_enable=YES
tcp_wrappers=YES

:wq
service vsftpd restart


/**如果有任何问题,可以加入群228920057进行讨论*/

你可能感兴趣的:(redhat)