CentOS install ftp software in rpm Mode
Centos 6.6-based
First, mount the optical drive!
[root@localhost zengyun]# mount /dev/cdrom ./rommount: block device /dev/sr0 is write-protected, mounting read-only
1. install ftp software
Go to the Packages directory of the CD
[root@localhost zengyun]# cd rom/Packages/
View the full name of the software to be installed:
[root@localhost Packages]# ls | grep ftp
Run the installation command: rpm-ivh vsftpd-2.2.2-12.el6_5.1.x86_64.rpm
[root@localhost Packages]# rpm -ivh vsftpd-2.2.2-12.el6_5.1.x86_64.rpm
Run the command to check whether the installation is successful: rpm-q software name rpm-qa // query all to check the software installed in all rpm methods in the system
Rpm-q vsftpd
2. Enable the ftp service
Ftp is the same as apache. It is a service software that uses the ftp protocol and occupies port 21.
Start the ftp service:
Service vsftpd start/stop/restart // controller ftp service ps-A | grep ftp // view ftp-related service processes
3. Disable the Firewall
By default, firewall is enabled in linux, which prevents external users from accessing the ftp server. Disable the linux system firewall (Execute Command> setup ). The "*" of the comprehensive number behind the firewall is removed by hitting a space, indicating that the firewall is disabled.
4. winscp connection to the ftp service
Connection Failed after login:
Solution: Disable SELinux (secure enhanced linux security enhanced linux ).
Vi/etc/selinux/config is edited and reboot restarts the system, and the ftp service selinux: secure enhanced linux security enhanced linux is started, which plays a security protection role for the system. It may affect software installation and use. It also interferes with the use of the ftp service.
Edit/etc/selinux/config and change enforcing to disabled:
Run reboot after saving and exiting, and then start the service:
service vsftpd start
After the service is started, log on to winscp.
5. ftp access permission control 5.1 enable and block user access to ftp service
There is a configuration file in the system that can restrict access to the ftp service for specified users. Specific configuration files: ftpusers and user_list
5.2 set normal users to access their home directories only
Open the comment '#' and create a chroot_list file, which can be written into the username list.