1. Install the vsftpd service:
Run yum install vsftpd in shell to install it successfully;
2. Modify vsftpd Configuration:
Find vsftpd in/etc/vsftpd. conf file, modify the default configuration, including the listening address and port, whether to enable the tcp and psav modes, etc. The configuration is relatively simple. For details, refer to the vsftpd configuration manual in my article.
3. Start the vsftpd service:
Run service vsftpd start, or run/etc/init. d/vsftpd start.
4. Create a user and logon directory for ftp
# Useradd-G ftp-d/directory name-M User Name
# Passwd user
# Chown username. ftp/directory name-R
# Chmod 750/directory name-R
Then you can use the username and account you created to log on to the ftp. The ftp login method is
Ftp host name;
Enter the user name;
Enter the password.
Of course, you can also use ftp.
Enable FTP
[Root @ huiyi ~] # Service vsftpd start
Starting vsftpd for vsftpd: [OK]
Disable FTP
[Root @ huiyi ~] # Service vsftpd stop
Shutting down vsftpd: [OK]
[1] FTP automatic logon and batch download
#! /Bin/bash
Ftp-n <
User guest 123456.
Binary
Cd/home/data
LCD/home/databackup
Prompt
Mget *
Close
Bye
!
[2] FTP automatic logon and File Upload
#! /Bin/bash
Ftp-n <
User guest 123456.
Binary
Hash
Cd/home/data
LCD/home/databackup
Prompt
Mput *
Close
Bye
!
Author: "java-2007"