Centos_vsftp-based Installation

Source: Internet
Author: User
Tags ftp port number

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.