Vsftpd Installation Guide for beginners

Source: Internet
Author: User

VsFTPd software packages are included in the latest installation disks of various major release editions. you can install them using the software package management tools provided by the corresponding release editions; of course, you can find the vsftpd software package in the FTP images of various major releases; of course, you can also use the software package management tool to install it online; the vsftpd software package is not big, and it will not take long, two minutes is enough. This is a beginner's tutorial. I strongly recommend that you use the software provided by the release to install it. We do not recommend you compile the source code package by yourself;

BKJIA recommended topics: getting started with vsftpd-installation, configuration, cases, and FAQs

If you are using a Fedora or Redhat system, you can use the following command to install it online;

[root@localhost ~]# yum install vsftpd

For debian systems, you can use apt for online installation;

[root@localhost ~]# apt-get install vsftpd

If you are an RPM system, you can also find the vsftpd-xxxx.rpm package to install through the rpm command;

[root@localhost ~]# rpm -ivh vsftpd*.rpm 

You can download the source package to install

For example, we download the vsftpd-2.0.3.tar.gz;

[root@localhost ~]# tar zxvf vsftpd-2.0.3.tar.gz[root@localhost ~]# cd vsftpd-2.0.3[root@localhost ~]# make ;make install[root@localhost ~]# cp vsftpd.conf /etc

Modify/etc/vsftpd. conf and add the following line to the last line of the configuration file;

listen=yes

If your system is an RPM package-managed system, you can delete the/etc/xinetd. d/vsftpd file and start the xinetd server;

[Root @ localhost ~] #/Etc/init. d/xinetd restart stop xinetd: [OK] Start xinetd: [OK]

VsFTPd runs in two modes. In RPM package management systems, most of them are developed by Fedora/Redhat. For such systems, there is an xinted server; for non-RPM package management systems, there is generally no xinted. To ensure the consistency of this document, we should not use the xinetd mode, but use the initd running mode to start and manage the server, that is, the independent running mode.

Related reading: What is xinetd mode and initd mode?

Like other daemon programs, vsftpd provides standalone, inetdinetd, and xinetd running modes. For a brief explanation, standalone is started at a time and remains in the memory during running. The advantage is that it responds quickly to the access signal, and the disadvantage is that it consumes a certain amount of system resources, therefore, it is often used on Professional FTP servers with high real-time response requirements. Inetd is the opposite. Because the FTP process is called only when an external connection sends a request, it is not suitable for systems with a large number of connections at the same time. In addition, inetd mode does not occupy system resources. In addition to the impact of response speed and resource occupation, vsftpd also provides some additional advanced features, such as inetd mode support per_IP (Single IP) restrictions, standalone mode is more conducive to the application of PAM verification function.

1. xinetd Running Mode

Most newer systems use the xinetd super service daemon. Use "vi/etc/xinetd. d/vsftpd" to check its content, as shown below:

Disable = no socket_type = streamwait = no # This indicates that the device is activated and is using standard TCP Sockets. If "/etc/vsftpd. in conf, the option is "listen = YES". After canceling the command, restart xinetd. The command is as follows: $/etc/rc. d/init. d/xinetd restart

Note that only one FTP service can be enabled in the "/etc/xinetd. d" directory.

2. standalone Mode

Standalone mode facilitates PAM verification. In this mode, you must first disable vsftpd under xinetd and set

"Disable = yes", or cancel the corresponding line in "/etc/inetd. conf. Then modify "/etc/vsftpd. con

The option in f is "listen = YES ".

If standlone mode is used, it is started as a separate service and does not need system collaboration or as a system service,

If it becomes the xinetd mode, its service will be restricted by the system service, such as creating a new service process, but it also has disadvantages. If the xinetd service itself has a problem, related services will also be affected.
 
--------------------------------------------------------------------------

Differences between xinetd mode and standalone Mode

The Service Running in xinetd mode indicates that the service process is not executed by the daemon process. Take the FTPD process as an example to run the service in xinetd mode. This is the case, the FTP service itself listens to port 21. However, if this service is run in this mode, port 21 is monitored by the xinetd process. At this time, the FTPD service is not running ), if your network adapter receives port 21 requests, the xinetd process will call the FTPD program and hand over the request data received on port 21 to the FTPD process for processing, after processing, the FTPD process exits, while the xinetd process continues to listen to port 21, which is a bit similar to the windows svhost process. The Service Running in standalone mode is a service process, for example, ftpd runs in the memory as a daemon. After receiving a request from port 21, the FTPD process fork sends a sub-process for processing, and the original process continues to listen to port 21.

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.