After the newly installed RHEL5 is reorganized, it is found that ftp cannot be used and telnet cannot be used. I thought the service servicexinetdrestart was not enabled, and the prompt "xinetd: unrecognized service" was displayed. Xinetd is not installed properly. A xinetd-2.3.13-4.4E.l.i386.rpm was found on the flip mounting disk. Fortunately, rpm installation is not troublesome for rpm-Uvhxinetd-2.3.13-4.4E.l.i386.r
After the newly installed RHEL5 is reorganized, it is found that ftp cannot be used, and telnet cannot be used. If the service xinetd restart is not enabled, the system prompts that xinetd is an unrecognized service. Xinetd is not installed with a new reinstallation.
A xinetd-2.3.13-4.4E.l.i386.rpm was found on the flip mounting disk. Fortunately there is rpm installation is not trouble rpm-Uvh xinetd-2.3.13-4.4E.l.i386.rpm on the good, and then check rpm-qa | grep xinetd has been.
Then, after installing vsftpd for a long time, I couldn't find the rpm Installation File. So I had to go online and find the latest version 2.3.4, but only the source file does not have an rpm package, you can only make it by yourself. Refer to the article on installing and configuring vsftp. It is not too troublesome to install it by step.
Step 1: Install VSFTP
Use the tar.gz source code package to install VSFTP and place the downloaded source code package in a directory. Here I create a project
Record ftp. All operations are performed in this directory:
Mkdir ftp
Copy vsftpd-1.2.1.tar.gz to the ftp directory:
Cp download vsftpd-1.2.1.tar.gz placement directory ftp/
Go to the ftp directory:
Cd ftp
Next, decompress the package:
Tar zxvf vsftpd-1.2.1.tar.gz
After decompression, an additional directory named vsftpd-1.2.1 under the ftp directory, enter the directory to compile VSFTP:
Cd vsftpd-1.2.1
Compile:
Make
After compilation, an executable file vsftpd is added to the directory,
# Ls-l vsftpd
-Rwxr-xr-x 1 root 77144 April 13 21:17 vsftpd
This is the main program of vsftp. Because vsftp requires the "nobody" user by default, you must
Make sure that you have this user in your system. Generally, this user does. But to be clear, run the following command:
Add a nobody user:
# Adduser nobody
Adduser: user nobody exists
Because the nobody user already exists in my system, the system prompts that the user already exists.
The default vsftp configuration also requires an empty directory (empty). The absolute path of this directory should be
/Usr/share/empty/. If the ftp server requires an anonymous user (anonymous), add a user
Ftp: the user directory is set to/var/ftp, which is the ing of anonymous users of VSFTP.
Local user, that is, the anonymous user runs the process as an ftp user in the process, but the anonymous user
It does not inherit the file permissions of the ftp user. It only has the file permissions of other groups. The following command can be used:
Complete the preceding requirements:
# Mkdir/var/ftp/
# Useradd-d/var/ftp
If your system already has an ftp user, use the following command to change the directory owner and user directory:
# Chown root. root/var/ftp
# Chmod og-w/var/ftp
Next, install the compiled file to the corresponding directory:
Make install
After installation, the main program vsftpd is available in the/usr/local/sbin/directory.
There is also a vsftpd configuration file under/etc/xinetd. d, which is started by the xinetd daemon.
The configuration file of vsftpd. In addition, if you do not use xinetd to start vsftp, you should add
A vsftp configuration file. The default file name is/etc/vsftpd. conf. You can manually
Edit, but there is already a sample configuration file in our source code directory. You can directly modify this file.
To meet our needs, copy the sample configuration file to this directory:
# Cp vsftpd. conf/etc/
In this case, there is a configuration file vsftpd. conf under/etc.
Let's test whether VSFTP can run normally. We use an independent process instead of xinetd.
Start VSFTP and add a line after the file/etc/vsftpd. conf:
Listen = YES
Run the following command to start VSFTP:
#/Usr/local/sbin/vsftpd &
[1] 7208
All right, VSFTP has been started, and the process number is 7208.
Next, test FTP (you should make sure that there is no other FTP service software running in your machine, otherwise use
Conflict with the same port ):
# Ftp 127.0.0.1
Connected to 127.0.0.1 (127.0.0.1 ).
220 (vsFTPd 1.2.1)
Name (127.0.0.1: root): ftp
331 Please specify the password.
Password:
230 Login successful.
Remote system type is UNIX.
Using binary mode to transfer files.
OK. The FTP server runs normally. You can also use the anonymous
For the username ftp, you can log on successfully.