Install, configure, and uninstall vsftp in CentOS
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.