First, use the root account to log on to the CentOS system. 1. install VSFTP [root @ localhost ~] # Yum-yinstallvsftpd (apt-getinstallvsftpd is used in ubuntu) vsftp is installed in the/etc/vsftpd directory by default. 2. configure the vsftpd. conf file [root @ localhost first use the root account to log on to the CentOS system. 1. install VSFTP
[Root @ localhost ~] # Yum-y install vsftpd (use apt-get install vsftpd in ubuntu)
Vsftp is installed in the/etc/vsftpd directory by default.
2. configure the vsftpd. conf file [root @ localhost ~] # Vi/etc/vsftpd. conf1, change "anonymous_enable = YES" in the configuration file to "anonymous_enable = NO"
Cancel the annotator before the following configuration:
Local_enable = YES
Write_enable = YES
Chroot_local_user = YES
Chroot_list_enable = YES
Chroot_list_file =/etc/vsftpd. chroot_list
Save and exit (click ESC and enter: wq)
2. edit the/etc/vsftpd. chroot_list file, add the ftp account name, save and exit. 3. add the FTP account name "cent" and the password "cent"
[Root @ localhost ~] # Useradd-d/www-s/sbin/nologin cent (the directory after-d indicates the directory after ftp logon) [root @ localhost ~] # Passwd cent
4. edit the user_list file to allow cent users to access FTP
[root@localhost ~]# vi /etc/vsftpd/user_list
Add cent at the end.
5. create our root directory and set access permissions.
[root@localhost ~]# mkdir /var/public_root[root@localhost ~]# chown -R cent /var/public_root[root@localhost ~]# chmod -R 755 /var/public_root
6. enable and disable the vsftpd service
[root@localhost ~]# service vsftpd start
[root@localhost ~]# service vsftpd stop
7. the vsftp service is enabled by default.
[root@localhost var]# chkconfig vsftpd on
8. centos vsftpd uninstall method
If vsftpd is installed on the server, you need to uninstall vsftpd if a configuration error occurs.
First, you must disable the vsftpd service.
[root@localhost ~]# service vsftpd stop
[root@localhost ~]# rpm -aq vsftpd
Vsftpd-2.0.5-16.el5_5.1 # Here is the result of finding vsftpd
[root@localhost ~]# rpm -e vsftpd
And then click OK.
Check whether vsftpd is uninstalled, and perform the stop and start operations:
[root@localhost ~]# service vsftpd stop
Vsftpd: unrecognized service # vsftpd not found
This indicates that the deletion is successful.