Build an ftp server on CentOS 7

Source: Internet
Author: User

Build an ftp server on CentOS 7

This article uses the latest CentOS 7 to learn how to build various Linux servers. Today we are sharing the idea of building an ftp server (ps: we do not recommend using the latest system for learning because the system has changed, A lot of previous server building methods won't work. For example, if centos7 changes the firewall from iptables to firewall and then builds the firewall according to the original tutorial, it will encounter many problems ....., of course, if you only want to use a server, you can check the corresponding options when installing the server. The system will automatically install related services.) due to my poor luck, so I encountered a variety of strange problems during the installation process, and I am still a beginner, so it took 3 days to build the ftp server. of course, the learning process is the debugging process. The more problems you encounter, the more knowledge you will learn. Let's share my ftp building experience.

First, use the VM to install the CentOS7 system.

Ps: I chose the minimal installation option, so there are few built-in software.

As for the specific installation, this is not within the scope of this article. If you need to communicate, please q me...

After the installation is complete, make sure that the network is smooth. If there is no network, enter the command nmtui to enable network settings.

Then we need to change the centos7 firewall back to iptables.

1. To uninstall firewall, run the following command:

2. Install iptables-services

3. Enable the iptables service

4. Set the firewall to start upon startup

5. Generate the iptables configuration file in the/etc/sysconfig folder.

Next, install the ftp server vsftp.

Configure Firewall

Use vim to open/etc/sysconfig/iptables

(Ps: must be placed in

-A input-j REJECT -- reject-with icmp-host-prohibited

-A forward-j REJECT -- reject-with icmp-host-prohibited

Before the two rules, because the firewall rules are parsed from top to bottom)

Although the firewall is set up, it does not mean that the ftp server can be used normally. We need to configure selinux

Through getsebool-a | grep ftp, we can see that selinux prohibits all ftp services. In order to be able to use it normally, we need

Set the ftp_home_dir and ftpd_connection_db boolean variables to true.

(Ps: If this option is not enabled, files cannot be uploaded or downloaded! O (worker _ worker) O ~)

Through the above settings, we can finally use the ftp service! Test in windows as follows:

Go and try it !!!

Install and configure the FTP server in CentOS 7

Simple and practical Ubuntu FTP setup

Set up FTP server and Apache server on Ubuntu

Install the LAMP \ vsftpd \ Webmin \ phpMyAdmin service and settings in Ubuntu 13.04

Simple case of anonymous uploading of SeLinux and vsftpd on the RHEL6 Platform

Install vsftpd source code in Linux

Case study of vsftpd Security Configuration

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.