I believe you have mastered the FTP transmission mode. Next we can establish an FTP server. It can be easily completed in four steps. The FTP server implements the basic function of uploading and downloading. The following describes how to create an FTP server in several steps 。
Create an FTP server 1. install an FTP server
If you do not select to install the FTP server when installing the system, you can install it using the "Add/delete application" tool in Red Hat 9.0, select "Main Menu" → "system settings" → "Add/delete Applications", select the FTP server in the pop-up interface, and click "Update 。
If you cannot confirm whether the software is installed, run the following command:
- #rpm -qa|grep vsftpd
- vsftpd-1.1.3-8
Create an FTP server 2. Start the FTP server
Use the default example of Red Hat 9.0 to directly start VSFTP 。
- # /sbin/service vsftpd start
Start vsftpd For vsftpd: [OK]
Create an FTP Server 3. Create a file named test.txt under/var/ftp/pubdirectory with the file content "This is a test file "。
Create an FTP server 4. Test
Log on to the local server using the FTP client, and then log on with an anonymous identity (anonymous:
- # ftp 127.0.0.1
- Connected to 127.0.0.1 (127.0.0.1).
- 220 (vsFTPd 1.1.3)
- Name (127.0.0.1:root): anonymous
- 331 Please specify the password.
- Password:
- 230 Login successful. Have fun.
- Remote system type is UNIX.
- Using binary mode to transfer files.
In this way, you can successfully log on to the FTP server. The server directory list is displayed as follows:
- ftp> ls
- 227 Entering Passive Mode (127,0,0,1,63,15)
- 150 Here comes the directory listing.
- drwxr-xr-x 2 0 0 4096 Dec 04 01:35 pub
- 226 Directory send OK.
Switch to the pubdirectory and display the directory content. You can find the created file test.txt:
- ftp> cd pub
- 250 Directory successfully changed.
- ftp> ls
- 227 Entering Passive Mode (127,0,0,1,232,34)
- 150 Here comes the directory listing.
- -rw-r--r-- 1 0 0 21 Dec 04 01:35 test.txt
- 226 Directory send OK.