Ali installation records in the cloud centos7.x under vsftpd
Log into your linux server checks whether the installation vsftps
rpm -qa | grep vsftpd
After entering did not have any information that there is no installation
1. Install execute the command:
yum -y install vsftpd
The default installation path: /etc/vsftpd/vsftpd.conf can command: whereis vsftpd View
2. Create a virtual user
Select Create a ftp folder in the root directory or user directory: mkdir ftpfile
Create a user:
useradd wanghy -d / home / myForder // (and add a user to create a file named myforder folder in your home directory wanghy can be changed to your own FTP account)
If you want to delete a user can delete by userdel command
userdel wanghy
If you want to modify the user to modify some of the options with modified later by the command usermod wanghy
usermod wanghy
MyForder modify permissions (grants permission to myForder)
chown -R wanghy / home / myForder // the format of a user name file path chown -R
Ftpuser Reset Password:
passwd wanghy
:( Then enter the password you want to set the required input 2)
(12345678 system here is set to recommend that the password is 8 may not be provided 8)
5 due to the need to support FTP passive mode (PASV), so it needs to open a port authority such as limited range (8088-8099)
input the command:
vim /etc/vsftpd/vsftpd.conf
Press i Insert mode add the following code in the final surface
pasv_min_port = 8088 // Note that this is open a range of ports, meaning port within this range of 8088 ~ 8099 must open all ports can be easily set up their own
pasv_max_port = 8099
anonymous_enable default is yes or NO to change it to support anonymous user access
Modify anonymous_enable = NO
listen to default NO to YES
listen=YES
listen_ipv6 default is YES to NO
listen_ipv6=NO
After modification press esc to exit the editor enter: wq to save and exit
And then release both ports through the command:
/sbin/iptables -I INPUT -p tcp --dport 8088 -j ACCEPT
/sbin/iptables -I INPUT -p tcp --dport 8099 -j ACCEPT
Edit your firewall configuration:
vim /etc/sysconfig/iptables
In -A INPUT -p tcp -m state --state NEW -m tcp --dport 22 -j ACCEPT separate line below the port 21 can be changed:
-A INPUT -p tcp -m state --state NEW -m tcp --dport 21 -j ACCEPT
And through: wq to save and exit
Enter systemctl restart vsftpd --- restart
Other commands
Start vsftpd:
systemctl start vsftpd
Restart vsftpd:
systemctl restart vsftpd
Stop vsftpd:
systemctl stop vsftpd
View vsftpd status:
systemctl status vsftpd
Edit chroot_list :
vim /etc/vsftpd/chroot_list
To Username chroot_list which was added: wanghy (with useradd wanghy -d / home / ftpfile the new name corresponding to wanghy )
Remember to restart a modified file
systemctl restart vsftpd
At this time in the browser enter: ftp: //192.168.1.65 (own local or public network ip ip) access
To uninstall vsftpd
rpm -aq vsftpd
continue
RPM -e vsftpd- 3.0.2-25.el7.x86_64
Edited by vim editor
vim /usr/local/nginx/conf/nginx.conf
Locate and open #user nobody (remove the #) at the very top of the configuration file to modify their own user name: user wanghy then configure http {} which add the following server node (best buy yourself a domain name and for the record)
Server { the listen 80 ; charset UTF-8 ; # this is set to off, then visit if the browser through the domain name will be 403 without access to the ip is possible (of course, it can be disabled ip access) if used for image server settings such as off is necessary autoindex off ; # display the file about the size of the unit is kb or MB or GB autoindex_exact_size off ; server_name resource.xxx.com.cn ; the best application # own a domain name LOCATION / { root / Home / myforder / ImagesRF Royalty Free / ; # can own a new directory myForder images below the add_header the Allow-Access-Control-Origin * ; } }
After modifying the command:
cd / usr / local / nginx / sbin /
./nginx // refresh -s reload
Such as