3 月 182014
 

192.168.197.55

192.168.197.59

yum update

[root@localhost ~]# mkdir /ftpmount
[root@localhost ~]# mkdir -p /ftpmount/linuxcache/www

[root@localhost ~]# yum install nfs-utils
[root@localhost ~]# mount -t nfs 192.168.197.59:/data/linuxcache/www /ftpmount/linuxcache/www/

[root@localhost ~]# vi /etc/fstab
192.168.197.59:/data/linuxcache/www /ftpmount/linuxcahe/www nfs defaults 0 0

[root@localhost ~]# vi /etc/sysconfig/network

HOSTNAME=ftp.hk.linuxcache-cloud.net

192.168.197.55 ftp ftp.hk.linuxcache-cloud.net
[root@ftp ~]# yum install vsftpd

[root@ftp vsftpd]# cp vsftpd.conf vsftpd.conf.backup

#201403191322
guest_enable=YES
guest_username=nfsnobody
user_config_dir=/etc/vsftpd/users

[root@ftp vsftpd]# vi /etc/pam.d/vsftpd
#%PAM-1.0
#session optional pam_keyinit.so force revoke
#auth required pam_listfile.so item=user sense=deny file=/etc/vsftpd/ftpusers onerr=succeed
#auth required pam_shells.so
#auth include password-auth
#account include password-auth
#session required pam_loginuid.so
#session include password-auth
auth required pam_userdb.so db=/etc/vsftpd/vftpuser
account required pam_userdb.so db=/etc/vsftpd/vftpuser

 

[root@ftp vsftpd]# vi vftpuser.txt
vftpuser01
vftptgbyhn

[root@ftp vsftpd]# db_load -T -t hash -f /etc/vsftpd/vftpuser.txt /etc/vsftpd/vftpuser.db
[root@ftp vsftpd]#

[root@ftp vsftpd]# chmod 600 vftpuser.*
[root@ftp vsftpd]# pwd
/etc/vsftpd
[root@ftp vsftpd]# mkdir users
[root@ftp vsftpd]# vi users/vftpuser01
local_root=/ftpmount/linuxcache/www
anon_upload_enable=YES
anon_mkdir_write_enable=YES
anon_other_write_enable=YES
anon_umask=022

[root@ftp ~]# chkconfig –list vsftpd
vsftpd 0:off 1:off 2:off 3:off 4:off 5:off 6:off
[root@ftp ~]# chkconfig –level 35 vsftpd on

[root@ftp ~]# iptables -I INPUT -p tcp –dport 21 -j ACCEPT

 Leave a Reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

(required)

(required)

此站点使用Akismet来减少垃圾评论。了解我们如何处理您的评论数据