Centos
1. Open DNS can be yum install (Close after operation)
# vi/etc/resolv.conf
# (INSERT) nameserver 8.8.8.8
# (insert) means pressing the INSERT key and entering the following characters
# (ESC): Wq
2, installation vsftpd
# yum Install vsftpd
3. Start the service
#systemctl Start Vsftpd.service
4. Check boot start
# Systemctl List-unit-files | grep enabled
# If it's not enabled, start it like this
#systemctl Enable httpd
5. Add a Htmler account to the root group for FTP to/var/www/html and give it a password
# useradd-g root-m-d/var/www/html-s/sbin/nologin Htmler
# passwd Htmler
# Enter password
6, the ownership of/var/www/html to htmler.root
# Chown-r Htmler.root/var/www/html
7, configure vsftpd, prohibit anonymous user login
# vi/etc/vsftpd/vsftpd.conf
# (INSERT) Anonymous_enable=yes to anonymous_enable=no
# (ESC): Wq
8. Configuring Firewalls and SELinux
# firewall-cmd--permanent--zone=public--add-service=ftp
9.# Reload
# Firewall-cmd--reload
Tofind ftp -related SELinux bool values for FTP Access release
# Getsebool-a | grep FTP
# setsebool-p Ftpd_full_access on
#-P writes to disk, does not restart disappears, but takes longer and waits patiently, this is the last step
If the file server can upload ftp , but the PHP code remote FTP driver upload image is empty, then turn off SELinux! No, why not! :
1,. View SELinux Status
/usr/sbin/sestatus
2,. Close SELinux
/usr/sbin/setenforce 0 Close now
Vi/etc/sysconfig/selinux Modify configuration file, reboot only takes effect
Selinux=disabled
Dredge
CENTOS7 Open VSFTPD