Based onCentos_vsftpInstall configurations
1,CheckVsftpInstalled or not:Chkconfig-list | grep vsftpd
If no output is displayed, the system is not installed;
2,YumCommand to install and install vsftpd:Yum-y install vsftpd
The following error is reported during installation:
Solution:
Rm/var/run/yum. PID
At this time, there is a prompt: Rm: Do you want to delete the common file "/var/run/yum. PID "?
After you press enter, the process is finished.
Note: This Command requires that you can access the Internet and configure the DNS server. The default value is 8.8.8.8.
Displayed: indicates that the installation is successful.
3,Create a log file
Touch/var/log/vsftpd. Log
4,View the service startup status:
All services are closed (Off), Pay attention to the close (Off) Indicates whether the service is automatically started when the server is started. We use the following command to configure its own startup:
Chkconfig vsftpd on
The execution result is as follows:
View and manageFTPService:
Start the FTP service:Service vsftpd start
View FTP service status:Service vsftpd status
Restart the FTP service:Service vsftpd restart
Disable the FTP service:Service vsftpd stop
5,ConfigurationFTPService
Vim/etc/vsftpd. conf
Enable = yes --> anonymous_enable = No // anonymous users are not allowed to access the service. By default
Xferlog_file =/var/log/vsftpd. log # sets the path for saving service logs of vsftpd. Note: This file does not exist by default. Must be manually touch
# Idle_session_timeout = 600 --> idle_session_timeout = 600 // The session times out. The client connects to the FTP but is not operated. It is commented out by default and can be modified as needed.
# Async_abor_enable = yes --> async_abor_enable = Yes // support for asynchronous transmission. It is commented out by default. Remove the comment.
# Ascii_upload_enable = yes --> ascii_upload_enable = Yes // supports the download feature in ASCII mode. By default, it is commented out. Remove the annotation.
# Ascii_download_enable = yes --> ascii_download_enable = Yes // supports the upload function in ASCII mode. By default, this function is commented out.
# Ftpd_banner = welcome to blah FTP service // The FTP logon welcome message, which is commented out and can be omitted
# Chroot_local_user = yes --> chroot_local_user = Yes
// Disable local users from logging out of their FTP home directory. The local user is commented out and the comment is removed.
6,Configure iptables Firewall
Service ipstables status
The above steps cannot be run. Run the following command to check the port number allowed by the firewall. We know that the FTP port number is "20, 21". The result shows that there is no port number.
In this case, you need to configure "/etc/sysconfig/iptables:
Vim/etc/sysconfig/iptables
First list the files with "iptables" fuzzy match, and then add the following content to the "iptables" file after the above name.
-A input-M state -- state new-m tcp-p tcp -- dport 21-J accept
-A input-M state -- state new-m tcp-p tcp -- dport 20-J accept
7,FTPRemote connection
Centos_vsftp-based Installation