First, the system environment
1.vmware workstation pro install Linux virtual machine
2.Linux: Linux Red Hat Enterprise Linux 7.0
Second, configure the local yum source
Connection
On wmware workstation pro, click Virtual Machine-> Settings-> CD / DVD-> Use ISO image file-> Browse, find the ISO image file of Linux Red Hat Enterprise Linux 7.0, and then confirm.
2. Configure yum local source
(1) Hang on CD (ISO image file)
mkdir / media / cdrom
mount / dev / cdrom / media / cdrom
(2) Set the ISO image file to be mounted automatically at boot
df -T #View ISO file type
vi / etc / fstab
#Add the content to automatically mount at boot
/usr/local/src/rhel-server-7.0-x86_64-dvd.iso / media / cdrom iso9660 default, ro, loop 0 0
#ISO where path is hung to this directory file type
(3) Create a new xxx.repo file in the /etc/yum.repos.d/ directory, and modify this file. Copy the media.repo in / media / cdrom directly to the /etc/yum.repos.d/ directory
cp / media / cdrom /etc/yum.repos.d/
#Modify the media.repo file
vim /etc/yum.repos.d/media.repo
[InstallMedia]
name = Red Hat Enterprise Linux 7.2
baseurl = file: /// media / cdrom
eabled = 1
mediaid = 1446216863.790260
metadata_expire = -1
gpgcheck = 1 (if it is 1, don't set gpgkey)
gpgkey = file: /// media / cdrom / RPM-GPG-KEY-redhat-release cost = 500
: Wq #save and exit
(4) Use the yum command to automatically install the vsftpd service
yum clean all #clear yum cache
yum makecache #cache package information in local yum source
yum install vsftpd #install vsftpd
rpm -qa vsftpd #Query all directories and files where httpd is installed
(5) Start, stop, restart, and start automatically when the service starts. Take vsftpd as an example.
systemctl start vsftpd.service #Start Apache
systemctl stop vsftpd.service #stop apache
systemctl restart vsftpd.service #Restart apache
systemctl enable vsftpd.service #Set the boot to start
systemctl status httpd.service #View the running status of the vsftpd service
ps ef | grep vsftpd #Check if there is a vsftpd process
(6) Configure vsftpd service
Creating FTP users, setting up FTP directories, and restricting FTP connection to the system
mkdir / data
useradd ftpuser -d / data -s / sbin / nologin
Set the password of the ftpuser user
passwd ftpuser
(7) Modify the configuration file of vsftpd
vim /etc/vsftpd/vsftpd.conf
anonymous_enable = NO #Do not allow anonymous login
local_enable = YES #Allow local access
Others are modified as required. After saving the configuration, you need to restart the vsftpd service
(8) Configure the firewall to allow access to port 21 of this machine
firewall-cmd --permanent --add-port = 21 \ tcp
firewall-cmd --reload #Refresh the firewall list
firewall-cmd --list-all #View the firewall list
systemctl start firwalld.service #Start the firewall
systemctl stop firwalld.service #Stop the firewall
systemctl restart firwalld.service #Restart the firewall
systemctl status firwalld.service #View firewall status
systemctl enable firwalld.service #Set the boot to start
(9) Close SELinux
Modify selinux state temporarily
getenfoce #View selinux status
setenfoce 0 #Alarm status
setenfoce 1 #Open state
"Permanent" change color linux status
vim / etc / sysconfig / selinux
SELINUX = enfocing #Enable selinux
SELINUX = permissive #Alarm status
SELINUX = disabled #close selinux
Effective after restart
Third, test on the physical machine
1. Anonymous login (before modifying the configuration file)
Run cmd.exe
ftp ip address
Username is ftp, no password; login after entering
2. Username Login
ftp ip address
Enter username ftpuser and password; log in after entering
3. Test with filezilla.exe client
Enter IP address, user, password and port
Fourth, FTP operation commands
ascii
Enter ASCII mode for transferring text files.
binary
Enter binary mode for transferring binary files.
cd directory name
Change the working directory of the remote computer.
close
End the FTP session with the remote computer and return to the FTP command status. After running the close command, the user can connect to a new system or exit from FTP.
delete file name
Deletes the file with the specified name from the remote system.
dir directory or file
On the remote computer, list all directories or files.
hash
Let FTP display a # every time a block of data is transferred with the get or put command. Useful when users are not sure whether the network is working. This gives you a visible signal that confirms that data is being transmitted. When transferring large files, if FTP displays this message, the transfer is in progress. The hash command is a boolean variable command. Use the hash command to turn on the display # switch, and then use the hash command to turn off the display.
help command
Displays a piece of help text about the command.
lcd directory
Changes the missing directory to the specified directory on the local computer.
ls
List a short directory on the remote computer with the same parameters as dir.
mget file list
Get multiple files from a remote computer. The file list can be a list of file names separated by spaces. Or often with * which expresses arbitrary files and express anything at this location? Match type structure.
mput file list
Transfer multiple files to a remote computer.
open
Connect to the specified computer. This is useful if you want to connect to a new system after transferring files from one system. You must first close the original connection.
prompt
When using mget or mput, the prompt command lets FTP prompt you to confirm before transferring each file. This prevents overwriting existing files. When the prompt command is issued, if the prompt is already enabled, FTP will turn off the prompt. At this time, all files are transferred without any questions.
pwd
Displays the name of the remote current directory.
lcd
Display the current directory of the local computer.
quit
Close all currently open connections and exit FTP.
user
Send the user name to a remote computer to log in. Use this command when the user name and password are not entered correctly. It can be used without closing the current connection.
!
On UNIX systems, when running FTP, you can run without leaving FTP! After typing the UXIN command.
CTRL + C
Interrupt FTP command.