Study with me in linux 5

Source: Internet
Author: User
Learn linux with me 5-Linux Enterprise Application-Linux server application information. The following is a detailed description. Take the fourth lesson for linux
Today, I want to tell you how to set up a vsftp server in linux.
1. If the configuration is successful in Lesson 3, we can directly download the file to the 'technical Department 'directory, which is equivalent to the/home/jishu directory, therefore, the configuration must be successful in the third lesson. If the configuration is not successful, contact me.
2, first we go here to download the latest version 2.05, and put it under the Network Neighbor's technical documentation ftp://vsftpd.beasts.org/users/cevans/
3. Then we need to unbind it [root @ zy jishu] # tar zxvf vsftpd-2.01
We can see that the files are decompressed in the/home/jishu directory. By the way, tar zcvf is compressed. You can try to compress a file into the tar format.
4. [root @ zy jishu] # After the cd vsftpd-2.0.1 is unlocked, go to the corresponding directory.
[Root @ zy jishu] #./whether the configure version meets the compilation requirements and other system information required for installation. Prepare for subsequent compilation. ---- If an error is found during the check, configure will prompt and stop the check. You can configure the system as prompted. Run the program again. After the check is passed, the MakeFile file for compilation will be generated. Now you can start compiling. The compilation process varies depending on the size of the software and the performance of the computer:
5. Here I will add some methods to install and uninstall software in linux.
Installation and uninstallation of Linux software has always been a problem for many beginners. Because of the significant differences between Linux and Windows in the system directory structure, system configuration methods, and other aspects, the methods for installing and uninstalling the software are also quite different. In Windows, "Add/delete programs" is used in the control panel. Similarly, there is a powerful software installation and uninstallation tool named RPM in Linux. Its full name is "Red Hat Package Manager ". It can be used to establish, install, query, update, and uninstall software. This tool is used in the command line. Enter rpm at the Shell prompt to obtain help information for this command. Software Installation
The installation of software in Linux is mainly in two different forms. The first installation file is filename.tar.gz. The Installation File is filename. i386.rpm. Most of the software released in the first method is sent as source code. The second method is directly issued in binary format. I386 indicates that the software is compiled and generated according to the Inter 386 instruction set.
For the first method, the installation method is as follows:
First, copy the installation file to your directory. For example, if you log on as root, copy the software to/root.
# Cp filename.tar.gz/root
Because the file is compressed and packaged, decompress it. Command:
# Tar xvzf filename.tar.gz
After running this command, decompress the installation file to the current directory by path. Run the ls command to view the decompressed file. The file named "INSTALL" is usually generated after decompression. This file is a plain text file that describes the installation method of the software package in detail.
For most software to be compiled, the installation method is roughly the same. After decompression, an executable script program named configure is generated. It is used to check whether the system has the library required for compilation, and whether the library version meets the compilation requirements and other system information required for installation. Prepare for subsequent compilation. Command:
#./Configure
If an error is found during the check, configure will prompt and stop the check. You can configure the system as prompted. Run the program again. After the check is passed, the MakeFile file for compilation will be generated. Now you can start compiling. The compilation process varies depending on the size of the software and the performance of the computer. Command:
# Make install
After installation, clear the temporary files generated during compilation and files generated during configuration. Run the following command:
# Make clean
So far, the software installation is complete.
For the second method, the installation method is much simpler.
Copy the installation file to your directory in the same way as the first method. Then use rpm to install the file. The command is as follows:
# Rpm-I filename. i386.rpm
Rpm automatically unpacks the installation file and installs the software in the default directory. And register the software installation information to the rpm database. The role of parameter I is to enable rpm to enter the installation mode. In addition, there are some commercial software on the Linux platform. In the installation file, there is a Setup installer, which is installed in the same way as on Windows. For example, Corel WordPerfect.
Uninstall Software
The software is mainly detached using rpm. To uninstall a software package, you must first know the name registered in the system. Type the following command:
# Rpm-qa
You can query all the software packages installed in the current system. The function of the q parameter is to enable rpm to enter the query command mode. Parameter a is a subparameter of the query mode, meaning ALL ). You can use the less person screen to display more information.
After confirming the name of the software to be detached, you can start to uninstall the software. Type the following command:
# Rpm-e
You can uninstall the software. The function of parameter e is to enable rpm to enter the uninstall mode. Uninstall the software package named. Each software package in the system depends on each other. If the object cannot be detached because of dependency, the rpm prompts and stops uninstalling the object. You can run the following command to ignore the dependency and directly start uninstallation.
# When rpm-e-nodeps ignores dependency uninstallation, other software in the system may be unavailable. You can use
# Rpm-e-test
Run the rpm command to uninstall the preview, instead of detaching the preview. This allows you to check whether the software has dependencies. Whether there is an error during the uninstall process.
6. [root @ zy vsftpd-2.0.1] # make to generate binary data
7. [root @ zy vsftpd-2.0.1] # make INSTALL installation command. The binary data generated by installation is equivalent to running the exe file in windows.
7. [root @ zy vsftpd-2.0.1] # Check that vsftpd is installed in which vsftpd.
8. Now that the server has been installed, We have to modify the configuration file.
[Root @ zy vsftpd-2.0.1] # more install. Let's take a look at the installation help.
To see how to configure it, you should pay attention to how to configure the document during installation.
First, copy the master configuration file to the/etc directory.
[Root @ zy vsftpd-2.0.1] # cp vsftpd. conf/etc
[Root @ zy etc] # cp RedHat/vsftpd. pam/etc/pam. d/ftp. This cp is used for ftp authentication, that is, the user needs to log on through pm. d.
A lot of content in "more INSTALL" is to teach us how to set up a successful vsftpd server.
[Root @ zy etc # vi vsftpd. conf
We need to add the listen = YES statement at the end. The reason for this is to let the server run independently, let the server listen on its own, and wq save and exit.
[Root @ zy vsftpd-2.0.1] # create an anonymous logon user directory using mkdir/var/ftp
[Root @ zy vsftpd-2.0.1] # chown root. root/var/ftp: Change the directory owner to root, and change the group to root.
[Root @ zy vsftpd-2.0.1] # If the chmod og-w/var/ftp permission is set to another user or root group, the user cannot write data, but can only read and enter
[Root @ zy vsftpd-2.0.1] # confirm anonymous users with finger ftp
[Root @ zy vsftpd-2.0.1] #/usr/local/sbin/vsftpd, in this way, the server runs in the background when it is started. Cocould not bind listening IPv4 socket?
In the/etc/xinetd. d/vsftpd file, change disable = no to YES!
Also, add listen = yes to the/etc/vsftpd. conf file and change it to STANDALONE independent mode!
Because xinetd has started vsftpd and vsftpd is set to stardalone mode, stop the xinetd service and service xinetd stop first, and then/usr/local/sbin/vsftpd & start the ftp service
[Root @ zy vsftpd-2.0.1] # netstat-tnl check whether a port of 21 is opened. If yes, if the process is using port 21, use the kill-9 process pid to delete the process.
[Root @ zy vsftpd-2.0.1] # Set the ftp localhost to test the link. It will allow you to enter the user name and password. We will try to leave the anonymous password blank, it is found that the logon is successful now,
[Root @ zy vsftpd-2.0.1] # vi/etc/rc. local to enable the ftp server to start automatically, We need to write it to the/etc/rc. local directory.
We write/usr/local/sbin/vsftpd &
Wq save and exit
It's not going to be continued. You guys will support me quickly. The more I write, the harder I will, the more I believe it will help you. I hope you will not be able to stand alone.

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.