(1) Construction of PURE-FTPD Service (official website: www.pureftpd.org)
A, the first is to download software:
[Email protected] ~]# cd/usr/local/src/[[email protected] src]# wget http://download.pureftpd.org/pub/pure-ftpd/ RELEASES/PURE-FTPD-1.0.42.TAR.BZ2
B, decompression installation pure-ftpd
[[Email protected] src]# tar jxf pure-ftpd-1.0.42.tar.bz2[[email protected] src]# CD Pure-ftpd-1.0.42[[email protected] P ure-ftpd-1.0.42]#./configure--prefix=/usr/local/pureftpd--without-inetd--with-altlog--with-puredb-- With-throttling--with-peruserlimits--with-tls[[email protected] pure-ftpd-1.0.42]# make && make install
C, copy and modify the configuration file
[[Email protected] pure-ftpd-1.0.42]# CD Configuration-file[[email protected] pure-ftpd-1.0.42]# mkdir-p/usr/local/ Pureftpd/etc/[[email protected] configuration-file]# CP pure-ftpd.conf/usr/local/pureftpd/etc/pure-ftpd.conf[[ Email protected] configuration-file]# CP Pure-config.pl/usr/local/pureftpd/sbin/pure-config.pl[[email protected] configuration-file]# chmod 755/usr/local/pureftpd/sbin/pure-config.pl
D, you need to modify the configuration file before starting PURE-FTPD, the configuration file is/usr/local/pureftpd/etc/ pure-ftpd.conf, this copy of the configuration file can be opened for reference to see, there is a lot of content, not much of it is a comment statement, if you do not think of any use we will directly empty and then copy the configuration file in, the configuration file contents are as follows:
Chrooteveryone yesbrokenclientscompatibility nomaxclientsnumber & nbsp 50daemonize yesmaxclients Perip 8VerboseLog Nodisplaydotfiles yesanonymousonly &NB Sp Nonoanonymous nosyslogfacility ftpdontresolve yesmaxidletime &N Bsp 15PureDB /u Sr/local/pureftpd/etc/pureftpd.pdblimitrecursion 3136 8AnonymousCanCreateDirs   nomaxload 4AntiWarez &NBS P Yesumask 1 33:022minuid  100ALLOWUSERFXP &NB Sp  NOALLOWANONYMOUSFXP Noprohibitdotfileswrite &N Bsp Noprohibitdotfilesread noautorename &NB Sp noanonymouscantupload nopidfile /usr/local/pureftpd/var/run/pure-ftpd.pidmaxdiskusage 99CustomerProof yes
E. Start the PURE-FTPD service; If the startup succeeds, it will display a long line of information beginning with running, otherwise it is an error message
[Email protected] ~]#/usr/local/pureftpd/sbin/pure-config.pl/usr/local/pureftpd/etc/pure-ftpd.conf
This is the startup script that starts the configuration file
(2) Create an account for other servers to upload downloaded files
[[email protected] ~]# mkdir/tmp/[[email protected] ~]# useradd www[[email protected] ~]# chown-r Www:www/tmp/[[email p Rotected] ~]#/usr/local/pureftpd/bin/pure-pw useradd ftp_user1-uwww-d/tmp/password:enter it again:
Where-u associates the virtual user Ftp_user1 with the system user www, that is, using the Ftp_user1 account to log in to FTP, will be the identity of the WWW to read files or download files. The directory behind the-D is the home directory of the Ftp_user1 account (in fact, the FTP share is used to upload the downloaded files), so that ftp_user1 can only access their home directory/tmp/. It's not done yet, and the most critical step is to create a user information database file:
[Email protected] ~]#/USR/LOCAL/PUREFTPD/BIN/PURE-PW MKDB
PURE-PW can also list the current FTP account (/USR/LOCAL/PUREFTPD/BIN/PURE-PW list), of course, you can delete an account (/usr/local/pureftpd/ BIN/PURE-PW userdelete ftp_user1), we create an account again:
[Email protected] ~]#/USR/LOCAL/PUREFTPD/BIN/PURE-PW useradd ftp_user2-uwww-d/tmp[[email protected] ~]#/usr/local /PUREFTPD/BIN/PURE-PW MKDB
(3) Test pure-ftpd
Testing is a tool that needs to be used by the client for Lftp, which needs to be installed under this tool (Yum install-y lftp):
Start a simple test (you can test the upload download file on this computer):
[Email protected] ~]# touch/data/www/123.txt[[email protected] ~]# lftp [email protected] Password: lftp [email Protected]:~> ; Lsdrwxr-xr-x 2 514 www 4096 June 11:14. Drwxr-xr-x 2 514 www 4096 June 12 1 1:14.. -rw-r--r--1 514 www 0 June 11:14 123.txt
At the same time can also be the local file upload (put to the server) and download (get to the computer);
Add: We can use the Lftp tool in addition to the login can also be directly with the FTP login, but the login method is a bit different, using FTP login way: FTP 127.0.0.1 (ftp directly with IP) The commands that lftp can use after logging in and the commands that FTP can use are also different, but the difference is not great.
This article is from the "7169431" blog, please be sure to keep this source http://7179431.blog.51cto.com/7169431/1876834
PUREFTP deployment and optimization of Linux (PURE-FTPD)