:
7 D+ s# \( N B7 s4 a6 ohttp://www.111cn.net/sys/CentOS/88456.htm% R* X' ]3 S/ e/ T# X7 S% @ Z
https://www.centos.bz/2011/03/centos-pureftpd-install/, `, h) C- p$ _2 H
$ E' ^4 n+ d- i: Z5 V3 |餈Yum摰鋆Pure-ftpd霂衣甇仿炊憒銝嚗" u+ g$ ]9 f- N3 r3 Y
& |) V/ l* q9 N
甇仿炊銝:蝵座um皞隞乩舫撠 CentOS 6.X6 k, z( N. `- x4 w6 R1 C" ^6 q( ?
憭隞(憒蝵桀嗡epel皞)) E# l" S$ X* V* G+ f9 \, A$ i
mv /etc/yum.repos.d/epel.repo /etc/yum.repos.d/epel.repo.backup$ |; r4 a* E. r# Z8 |" ^
銝頧賣郢epo /etc/yum.repos.d/( z9 {! d; b2 @, Y2 N( n
wget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-6.repo8 |% ^; C9 @% {& B j1 K
yum makecache
1 J7 `6 \* e1 @) b% a. r0 h4 E
隞乩舫撠 CentOS 5.X; F. T& A0 V. F) V/ ^: Y
cd /etc/yum.repos.d/8 x5 l& {: H! ]* a2 R
wget http://centos.karan.org/kbsingh-CentOS-Extras.repo5 R& V, Z4 `6 }7 ^2 P1 T
2 c& @& j& N# E3 q' g/ l5 z
敹瞈瘣蝕bs-CentOS-Testing摨怒kbsingh-CentOS-Extras.repo隞塚enabled=0寞enabled=1
9 V0 N' ?2 G% ]/ j2 ^9 G/ ~vi kbsingh-CentOS-Extras.repo
3 {9 [: Z4 O6 J V- [kbs-CentOS-Testing]
- name=CentOS.Karan.Org-EL$releasever - Testing
- gpgcheck=1
- gpgkey=http://centos.karan.org/RPM-GPG-KEY-karan.org.txt
- enabled=1
- baseurl=http://centos.karan.org/el$releasever/extras/testing/$basearch/RPMS/
銴鋆賭誨蝣 亦撠乎PG key啗隞嗅澈- rpm --import http://centos.karan.org/RPM-GPG-KEY-karan.org.txt
銴鋆賭誨蝣 憒甇仿銝憭望閰,雿輻其誑銝隞:
% H! E6 S3 M0 R) s: n) e J2 ^2 _rpm -Uvh ftp://ftp.trychlos.org/pub/CentOS/6.3/pcalfs/x86_64/RPMS/epel-release-6-7.noarch.rpm (CentOS 6.7)
) D3 {" Y. D. s |* f' C4 H$ k銝臭誑CentOS 6.7,憒浚entOS 6.8 狂oogle 撠 epel-release-6-8.noarch.rpm頛暺,隞交迨憿4 z+ M9 M( Z+ X/ E
% s* V; i0 r$ X) M, ]: A甇仿炊鈭:yum摰鋆
# L4 p8 E/ G' {, ~9 [! nyum install pure-ftpd -y
( N( z3 [$ [7 O% o u$ K
! W. u/ n3 o) T ]. O( D甇仿炊銝:靽格寥蝵格隞
, O9 M. A1 I! W% z& g5 Qvim /etc/pure-ftpd/pure-ftpd.conf
- ^2 Q( w e5 } e* n1 i* \# {4 j. M, `3 {0 A2 g, j
PureDB /etc/pure-ftpd/pureftpd.pdb
1 }! y4 ]% b# f( z. `( Y#餅餈銵瘜券嚗摰頝臬嚗PureDB冽唳桀隞
( x! Z% d4 T" y" o/ n0 NVerboseLog yes
; z) k/ e) S6 I9 Q2 A* }1 d$ j& i#撘舀亙 /var/log/pureftpd.log$ _( l+ j8 E a- q2 _
NoAnonymous yes0 U) F% k& u" V, z- t3 Z1 c
#蝏踹冽瑞餃
* _, h/ a! F/ I. a. b/ O0 zPassivePortRange 48000 500008 \' t* B' m, b
#雿輻刻◤冽芋撘嚗嗥垢
5 x1 b9 O. B% g
, b. I8 m0 @: K! a( c
8 j. f; G4 o, n) X. I
! y2 K7 F3 {7 u甇仿炊:蝵桅脩怠蝑
& x4 c, `' ]3 Q+ Z5 |/ z( ]iptables -A INPUT -p tcp --dport 21 -j ACCEPT
6 P: j9 p- I6 G& diptables -A INPUT -p tcp --dport 48000:50000 -j ACCEPT/ b9 }* ~3 o/ B$ o4 G/ `
6 ^# V2 H u8 I9 [2 r; v
甇仿炊鈭:臬私ure-ftpd% P, O3 ?/ n" @; M/ A% L
chkconfig pure-ftpd --level 345 on (閮剖瘥甈⊿璈芸瑁)4 h& s! ]: H' ?( z+ ^7 {2 n m
憒曆軏hkconfig,which chkconfig 臭誑曉啣桅雿蝵,銝祆閰脣/sbin,憒/sbin銋瘝銵函內瘝摰鋆chkconfig
+ x+ g1 U" A1 r! B0 W+ ]5 nyum install chkconfig 摰鋆chkconfig4 Z5 d( m6 a% k
憒摰鋆摰銋 chkconfig: command not found
$ Z+ y& Q F, d* U9 L& T+ e銝蝯 5 U2 L/ ^" n6 ~6 M
ln -s /sbin/chkconfig /usr/bin/
$ x: X7 m! r, L' S, P' c8 Y$ b7 M* e! {; x- v& K
/etc/init.d/pure-ftpd start service pure-ftpd start雿輻冽蝣澆鋆隢 http://www.111cn.net/sys/CentOS/88456.htm憒 service pure-ftpd start 銋憿舐內 service: command not found9 {% N+ G* j3 y
銋雿銝蝯4 |* @. b5 x0 ?1 `. D+ @& k: J/ K
ln -s /sbin/service /usr/bin/
3 P6 X- a) Q& E
J, Q& R- a" ]摰鋆 ftp client :6 _+ c0 n C% u- Q: ?. i J* C
yum install ftp -y
' _' g3 ~+ C2 O3 g' g! H6 ?( [5 b- D$ p# ^
閮:9 M8 K9 v S/ a+ D
: O8 ?/ {& {& t2 C( G1." K: g; e1 J; V* p
when login ftp show error:
$ ~& G# Y* B, [( }530 Login authentication failed
2 O% B9 T3 T" _2 C$ |7 JLogin failed.( O9 D3 k- X: K3 G; q2 {4 ~
# e. I3 B+ ?: N k4 N
) i7 G6 S2 |8 y8 n6 x, \. p, Acheck /var/log/secure* [; w5 k' F$ D( Q. R% N; Y
Nov 3 10:03:44 DLTB-2475 pure-ftpd: pam_listfile(pure-ftpd:auth): Couldn't open /etc/ftpusers
" n3 P4 I: W. o6 nNov 3 10:03:44 DLTB-2475 pure-ftpd: PAM audit_log_acct_message() failed: Operation not permitted
! Z$ A9 _# Z+ n, I% l& t
$ Y! Y$ W+ {2 u& s8 {Sol:0 b/ ^5 z' Z+ p F: d
vi /etc/pure-ftpd/pure-ftpd.conf0 B6 B r" ?1 E1 u/ O, {
撠PAMAuthentication 隤霅寞 UnixAuthentication隤霅 ,! [! q4 d$ X/ n
#PAMAuthentication yes 閮餉圾; l, j8 I# R2 t% T( k3 a
UnixAuthentication yes 瘨閮餉圾% R$ ]. ^% v* f* i
service pure-ftpd restart
# z( |! A- j' j
( A8 S6 Z# o% S3 L2.' a+ B7 u& g/ d. H5 l. X
When login ftp server from remote host show errors:
! p+ i" X. j, ^; Sconnect: No route to host3 f9 V+ j: Z( y9 f- [
舫脩怎雿鈭,iptable瘝⊥閮胤AT,SOL:
; j3 l3 b4 W2 x2 q$ }; ystop iptables or 拍嗉身摰 iptables & N: s+ B1 w9 P# M- Z
; h0 d4 w! J7 O7 @
vi /etc/sysconfig/iptables-config) x2 z# q% ^! ^; d% E7 i, j$ o
湔 IPTABLES_MODULES= IPTABLES_MODULES=ip_nat_ftp ip_conntrack_ftp( W0 G( {! _* o. ^' y
service iptables reload) F( B' i" O4 B6 F/ O) X3 l+ a& _6 J
i# Q/ y; \* r! k" Y/ k/ Z, R3.
2 [7 F# Y) X1 ~# V8 a421 Unable to read the indexed puredb file (or old format detected) - Try pure-pw mkdb
. |/ p$ d) g3 CLogin failed.
1 H A4 a7 T" q5 h3 f0 G6 S) H' O [ q/ @& A' a) {' S! A7 _6 Z
SOL:7 p( [( G n0 E
vi /etc/pure-ftpd/pure-ftpd.conf( G7 J/ H* J5 C; L2 C5 o! y
撠 PureDB /etc/pure-ftpd/pureftpd.pdb 閮餉圾. |" G3 K6 i7 q
4./ _1 k( e9 K' v
ftp> put file
9 R7 }6 @2 X: K( ?' ilocal: file remote: file
5 p6 k; V/ J8 |! x227 Entering Passive Mode (122,117,11,31,193,78)8 z2 a4 T4 j/ m( T* H1 T( ]$ H
553 Can't open that file: Permission denied- R) |4 P5 [1 @- g1 V9 \0 s3 a
& k3 I' v% `4 K: Z* G6 O1 f7 Q5 m, R8 f
SOL:* ~) ?/ m2 g$ Q( B# o- H
ls -l /home/user1
& G, _+ ], R, e' T2 L, h$ H! ^drwxr-xr-x. 2 root root 4096 2016-01-17 04:46 user1: E7 {- t& S, d( l
chown user1:user1 /home/user1
' k4 ?3 T% g( r! {4 _/ T0 B, L3 `! u! @& x. f8 Q
[ftp 隞也5 x( q3 W( I3 u2 v+ H3 g
lcd 寡local桅
( Q' d) Y' P; Dlls 亦local桅瑼獢 (蝑 !ls)4 v3 d" Q* ~* e. f
1 w& F- e( E: y% ?# M6 L* V$ [- ~( ?% M) R( c" N) `5 |3 |
1 n: [; ]0 }$ M6 D% E( X, S# k0 h D! A, E% V1 ^
|
|