I. FTP instructions
The common FTP in Linux system is vsftp, that is, very Security File Transfer Protocol. There is also a proftp (profession FTP). Here is also a simple description of the configuration under Vsftp.
VSFTP provides 3 types of remote login options:
(1) Anonymous login method
Just don't need username, password. You can log in to the server computer.
(2) Local user mode
You need an account name and password to log in. And, this account name and password, are in your Linux system, already have users.
(3) Virtual user mode
You also need a user name and password to log in. But the difference with the above is that this username and password is not in your Linux system (no user account)
Two.UBUNTU FTP setup:
2.1 Installation
VSFTP installation package, can be found in the installation. The installation process with Yum is also simple.
Install command: Yum install vsftpd--------"I've tried this, and I'm not in Ubuntu,
Recommended for this: Run the new FTP service command at Terminal:Sudo apt-get install vsftpd
3. To change the configuration, configure the following:
Listen=yes
Anonymous_enable=no
Local_enable=yes
Write_enable=yes
Anon_upload_enable=yes
Anon_mkdir_write_enable=yes
Dirmessage_enable=yes
Use_localtime=yes
Xferlog_enable=yes
Connect_from_port_20=yes
Chown_uploads=yes
Chown_username=sa
Xferlog_file=/var/log/vsftpd.log
Pam_service_name=vsftpd
Rsa_cert_file=/etc/ssl/private/vsftpd.pem
4. Restart the FTP service sudo/etc/init.d/vstpd restart
---------"Restart here I tried not to, use a few, you can
2.2.1 Start and close
[[Email protected] ~]# service VSFTPD start
Starting vsftpd for VSFTPD: [OK]
[[Email protected] ~]# service VSFTPD stop
Shutting down VSFTPD: [OK]
[Email protected] ~]# service vsftpd restart
------The following can be done without looking, you want to try it--------
Shutting down VSFTPD: [FAILED]
Starting vsftpd for VSFTPD: [OK]
[[email protected] ~]#/etc/init.d/vsftpd start
Starting vsftpd for VSFTPD: [FAILED]
[[email protected] ~]#/etc/init.d/vsftpd stop
Shutting down VSFTPD: [OK]
[Email protected] ~]#/etc/init.d/vsftpd restart
Shutting down VSFTPD: [FAILED]
Starting vsftpd for VSFTPD: [OK]
[Email protected] ~]#/ETC/INIT.D/VSFTPD status
VSFTPD (PID 3931) is running ...
[Email protected] ~]#
2.2.2. Other commands
--View vsftpd boot status
[[email protected] ~]# chkconfig--list vsftpd (this piece can you need to download Chkconfig:sudo apt-get install chkconfig)
VSFTPD 0:off 1:off 2:off 3:off 4:off 5:off 6:off
--------did not try, I do not have a firewall, do not have to try----------------------
[Email protected] ~]# chkconfig vsftpd on
[Email protected] ~]# chkconfig--list vsftpd
VSFTPD 0:off 1:off 2:on 3:on 4:on 5:on 6:off
As you can see here, from 2 to 5 is set to on by default. 2 to 5 is a multi-user level. This corresponds to the different operating levels of Linux.
We can also add the level option to specify:
[[email protected] ~]# chkconfig--level 0 vsftpd on
[Email protected] ~]# chkconfig--list vsftpd
VSFTPD 0:on 1:off 2:on 3:on 4:on 5:on 6:off
We see that 0 is set to ON.
We can use the man chkconfig to see the help:
--level levels
Specifies the run levels an operation should pertain to. It is given as a string of numbers from 0 to 7. For example,--level specifies Runlevels 3 and 5.
Traditional init defines 7 runlevel (run level), each representing some specific services that the system should complement:
(1) Level 0 is a complete shutdown of the system
(2) Class 1 or S-class stands for single-user mode
(3) Level 2-5 is a multi-user level
(4) 6 level is the level of reboot
-----------------------------------
Third, Ubuntu upload files to Windows XP
1. Open Terminal
2. Sudoftp 192.168.2.94
3. Enter user name and password (Administrator Mima)
4. Put/home/sa.sh/ds/sa.sh (Windwos new Folder DS under Local path)
Iv. Ubuntu downloads files from Windows XP
1. Open Terminal
2. Sudoftp 192.168.2.94
3. Enter user name and password (Administrator Mima)
4. Get \nativej.zip/home/sa/native.zip (Download the zip package under Windows to Ubuntu)
Five, Windows XP upload files to Ubuntu
1. Open cmd
2. FTP 172.16.224.129
3. Enter user name and password (FTP FTP)
4. put/home/sa.sh/ds/sa.sh (if prompted 553, then there is no write permission, under Ubuntu gives the user permission to write in this directory)
Six, Windows XP download files from Ubuntu
1. Open cmd
2. FTP 172.16.224.129
3. Enter user name and password (sa sa123456)
4. Get/home/sa/aa.sql D:\tools\nativej\aa.sql
Database Backup
1. Open Terminal
2. Convert to root user (sudo su)
3. The path switches to the directory where mysqldump is located, by default in the/usr/bin directory.
4. mysqldump–uroot–psa123456 bjxsms >/home/sa/aa.sql
Log cleanup
Purge Master logs before Date_sub (now (), interval 3day);//clean up 3 days ago Binlog
Reset master;//Clear All Binlog logs
Learning to configure VSFTP for FTP file transfer