You need to use the FTP channel to upload applications from your own server to the ECS.
This article describes how to upload an application to a CentOS ECS instance in a Windows environment.
Step 1 configure the FTP service on the ECS
1. Run the following command to install Vsftp under the root permission.
[Root @ VM_250_202_tlinux ~] # Yum install vsftpd
2. Before starting the vsftpd service, you need to log on to the ECS to modify the configuration file and disable anonymous logon.
Run the following command to open the configuration file:
[Root @ VM_250_202_tlinux ~] # Vim/etc/vsftpd. conf
Add the # sign before "anonymous_enable = YES" in the configuration file to disable anonymous logon.
3. Read the effective configuration.
[Root @ VM_250_202_tlinux ~] # Cat/etc/vsftpd. conf | grep ^ [^ #]
Local_enable = YES
Write_enable = YES
Local_umask = 022
Anon_upload_enable = YES
Anon_mkdir_write_enable = YES
Anon_umask = 022
Dirmessage_enable = YES
Xferlog_enable = YES
Connect_from_port_20 = YES
Xferlog_std_format = YES
Listen = YES
Pam_service_name = vsftpd
Userlist_enable = YES
Tcp_wrappers = YES
4. Start the vsftpd service.
[Root @ VM_250_202_tlinux ~] # Service vsftpd start
5. Set an FTP user account. After the setting is successful, you can log on to the FTP server using this account.
(1) set the FTP user's account, for example, the account is "ftpuser1", the directory is/home/ftpuser1, and the setting is not allowed to log on through ssh.
[Root @ VM_250_202_tlinux ~] # Useradd-d/home/ftpuser1-s/sbin/nologin ftpuser1
(2) set the password for the account, for example, "ftpuser1"
.
[Root @ VM_250_202_tlinux ~] # Passwd ftpuser1
6. Modify the pam configuration of vsftpd so that you can connect to the ECS instance by setting your own FTP user account and password.
(1) modify pam.
[Root @ VM_250_202_tlinux ~] # Vim/etc/pam. d/vsftpd
Modify the content:
# % PAM-1.0
Auth required/lib64/security/pam_listfile.so item = user sense = deny file =/etc/ftpusers onerr = succeed
Auth required/lib64/security/pam_unix.so shadow nullok
Auth required/lib64/security/pam_shells.so
Account required/lib64/security/pam_unix.so
Session required/lib64/security/pam_unix.so
(2) Check whether the modified file is correct.
[Root @ VM_250_202_tlinux ~] # Cat/etc/pam. d/vsftpd # % PAM-1.0
Auth required/lib64/security/pam_listfile.so item = user sense = deny file =/etc/ftpusers onerr = succeed
Auth required/lib64/security/pam_unix.so shadow nullok
Auth required/lib64/security/pam_shells.so
Account required/lib64/security/pam_unix.so
Session required/lib64/security/pam_unix.so
(3) restart the vsftpd service to make the modification take effect.
[Root @ VM_250_202_tlinux ~] # Service vsftpd restart
Shutting down vsftpd: [OK]
Starting vsftpd for vsftpd: [OK]
Step2. download and install the open-source software FileZilla
Use versions 3.5.1 and 3.5.2 of FileZilla. (if you use FileZilla of version 3.5.3 for FTP upload, this will cause a problem ).
As FileZilla only provides the latest version 3.5.3 for download, you are advised to search for the 3.5.1 and 3.5.2 download addresses by yourself.
Suggested 3.5.1 download address: http://www.oldapps.com/filezilla.php? Old_filezilla = 6350
Step3. connect to FTP
Run FileZilla and configure it as shown in the following figure. Then, click "quick link ":
The configuration information is described as follows:
(1) host: public IP address of the ECS instance (you can view the public IP address of the ECS instance on the ECS "management view" page ).
(2) User Name: The FTP user account set in step 1. Here, "ftpuser1" is used as an example.
(3) password: the password of the FTP user account set in step 1. Here, "ftpuser1" is used as an example.
(4) Port: FTP listening port. The default value is "21 ".
Step 4. Upload files to the CentOS ECS
When uploading a file, drag and drop the local file to the remote site to upload the file to the CentOS ECS.
Note:
The FTP channel of the ECS does not support automatic decompression and deletion of the tar package after the tar package is uploaded.
A schematic diagram of the uploaded file is as follows: