This paper uses the latest CentOS 7来 learning to build a variety of Linux servers, sharing today is to build an FTP server (PS: not recommended to use the latest system to learn, because the system has changed, a lot of previous methods to build the server is not, For example, Centos7 Firewall from Iptables for firewall, and then the original tutorial to build will encounter a lot of problems ..., of course, if you just want to use the server can be installed at the time of the installation of the appropriate options system will automatically install the relevant services) due to my bad luck, So in the installation of the process encountered a variety of exotic problems, and I was a just getting started small rookie, so it took a good 3 days to set up the FTP server. Of course, the process of learning is the process of debug, the problems encountered, the more learned knowledge will be richer, the following to share my experience in the construction of FTP.
The first is to install the CENTOS7 system with a VM
PS: My installation option is the smallest installation, so the built-in software is very few
As for the specific installation, this is not within the scope of this article, if you need to communicate, can Q I ...
If you make sure the network is clear after the installation is complete, if there is no network, please enter the command Nmtui open Network settings
Then we need to change the CENTOS7 firewall back to Iptables
1. To uninstall the firewall, you need to perform the following command
2. Install Iptables-services
3. Open Iptables Service
4. Set the firewall to boot
5. Generate iptables configuration files under the/etc/sysconfig folder
Next install the FTP server vsftp
Configuring firewalls
Open/etc/sysconfig/iptables with Vim
(PS: Must be placed in
-A input-j REJECT--reject-with icmp-host-prohibited
-A forward-j REJECT--reject-with icmp-host-prohibited
These two rules precede, because the rules of the firewall are parsed from top to bottom.
Although the firewall is set up, but does not mean that the FTP server can be used properly, we have to configure SELinux
Through Getsebool-a | grep FTP We can see that SELinux is a ban on all FTP services, in order to be able to properly use we need to
ftp_home_dir,ftpd_connection_db Two Boolean variable set to True
PS: If you do not open this will not be able to upload and download files Oh! O (∩_∩) o~)
Through the above settings we can finally use the FTP service! Test below Windows
Just go and experience it!!!
Note : More wonderful tutorials Please pay attention to the triple computer tutorial section, triple Computer office group: 189034526 welcome you to join