自拍偷在线精品自拍偷,亚洲欧美中文日韩v在线观看不卡

安裝配置ProFTPd

運(yùn)維 系統(tǒng)運(yùn)維
如何安裝配置ProFTPd呢?ProFTPd安裝(Professional FTP daemon)是針對(duì)Wu-FTP的弱項(xiàng)而開發(fā)的。不僅具有安全性,而且還Wu-FTP沒有的特點(diǎn)。比如,能以Stand-alone、xinetd 等 模式運(yùn)行。本文主要講的是安裝配置ProFTPd 的過程

  1 下載proftpd

  地址:www.proftpd.org。這里我們下載了1.2.9版本

  [code:1:de92f96787] wget ftp://ftp.proftpd.org/distrib/source/proftpd-1.2.9.tar.gz

  [/code:1:de92f96787]

 2 安裝proftpd

  切換到下載目錄,假設(shè)為/tmp/proftpd,然后

  [code:1:de92f96787] tar zxvf proftpd-1.2.9.tar.gz //解壓

  1.   cd proftpd-1.2.9  
  2.  
  3.   ./configure --prefix=/var/proftpd --sysconfdir=/etc //設(shè)置安裝目錄/var/proftpd,配置文件目錄/etc  
  4.  
  5.   make  
  6.  
  7.   make install  
  8.  
  9.   [/code:1:de92f96787]  
  10.  

  3 新建ftp專用帳號(hào)

  就是上面目的中提到的那個(gè)專用帳號(hào),這里以skate/skate(u/p)為例。

  [code:1:de92f96787] groupadd skate

  useradd skate -g skate -d /var/ftp -s /sbin/nologin //設(shè)置/var/ftp目錄為ftp的目錄

  passwd skate //設(shè)置skate用戶的密碼

  mkdir /var/ftp/upload

  chown skate.skate /var/ftp/upload //設(shè)置upload目錄skate用戶可寫

  [/code:1:de92f96787]

  4 設(shè)置proftpd

  proftpd的配置文件就一個(gè),就是/etc/proftpd.conf

  [code:1:de92f96787] vi /etc/proftpd.conf //打開proftpd.conf

  [/code:1:de92f96787]

  [code:1:de92f96787]

  ####具體配置如下######

  ServerName "Test ftp server..."

  ServerType standalone

  DefaultServer on

  #端口

  Port 21

  Umask 022

  #最大線程數(shù)

  MaxInstances 30

  User skate

  Group skate

  #DNS反查

  UseReverseDNS off

  IdentLookups off

  #最大嘗試連接次數(shù)

  MaxLoginAttempts 3

  #每用戶線程

  MaxClientsPerHost 2

  #最大用戶數(shù)

  MaxClients 20

  DirFakeUser On skate

  DirFakeGroup On skate

  DeferWelcome On

  #日志文件位置

  SystemLog /var/log/proftpd.log

  ServerIdent off

  #限制skate組的skate用戶登錄時(shí)不能切換到其他目錄(只能呆在他的home目錄)

  DefaultRoot ~ skate,skate

  #設(shè)置只允許192.168.0的用戶登錄

  #

  #Order allow,deny

  #Allow from 192.168.0.

  #Deny from all

  #

  #設(shè)置只允許skate用戶登錄,否則系統(tǒng)用戶也可以登錄ftp

  #

  #Order allow,deny

  #DenyUser !skate

  #

  #開起全盤的寫權(quán)限

  AllowOverwrite on

  AllowStoreRestart on

  #允許FXP

  # AllowForeignAddress on

  AllowAll

  #設(shè)置skate用戶在upload的限制

  #DELE刪除權(quán)限

  #RNFR RNTO重命名權(quán)限

  #RMD XRMD移動(dòng)目錄權(quán)限

  DenyUser skate

  #####結(jié)束######

  [/code:1:de92f96787]

  編輯完以后按Esc,然后輸入:x保存。

  5 啟動(dòng)ProFTPd服務(wù)

  編輯一個(gè)啟動(dòng)腳本(這個(gè)是從網(wǎng)上copy的,不是我寫的,感謝那個(gè)寫這個(gè)腳本的人,很好用,thx)

  1.   [code:1:de92f96787] vi /etc/rc.d/init.d/proftpd[/code:1:de92f96787]  
  2.  
  3.   [code:1:de92f96787]  
  4.  
  5.   #####腳本內(nèi)容開始########  
  6.  
  7.   #!/bin/sh  
  8.  
  9.   #  
  10.  
  11.   # Startup script for ProFTPD  
  12.  
  13.   #  
  14.  
  15.   # chkconfig: 345 85 15  
  16.  
  17.   # description: ProFTPD is an enhanced FTP server with \  
  18.  
  19.   # a focus toward simplicity, security, and ease of configuration. \  
  20.  
  21.   # It features a very Apache-like configuration syntax, \  
  22.  
  23.   # and a highly customizable server infrastructure, \  
  24.  
  25.   # including support for multiple 'virtual' FTP servers, \  
  26.  
  27.   # anonymous FTP, and permission-based directory visibility.  
  28.  
  29.   # processname: proftpd  
  30.  
  31.   # config: /etc/proftpd.conf  
  32.  
  33.   #  
  34.  
  35.   # By: Osman Elliyasa   
  36.  
  37.   # $Id: proftpd.init.d,v 1.7 2002/12/07 21:50:27 jwm Exp $  
  38.  
  39.   # Source function library.  
  40.  
  41.   . /etc/rc.d/init.d/functions  
  42.  
  43.   if [ -f /etc/sysconfig/proftpd ]; then  
  44.  
  45.   . /etc/sysconfig/proftpd  
  46.  
  47.   fi  
  48.  
  49.   #下面這行設(shè)置環(huán)境變量,注意設(shè)置好你的proftpd的安裝目錄  
  50.  
  51.   PATH="$PATH:/usr/local/sbin:/var/proftpd/bin:/var/proftpd/sbin" 
  52.  
  53.   # See how we were called.  
  54.  
  55.   case "$1" in  
  56.  
  57.   start)  
  58.  
  59.   echo -n "Starting proftpd: "  
  60.  
  61.   daemon proftpd $OPTIONS  
  62.  
  63.   echo  
  64.  
  65.   touch /var/lock/subsys/proftpd  
  66.  
  67.   ;;  
  68.  
  69.   stop)  
  70.  
  71.   echo -n "Shutting down proftpd: "  
  72.  
  73.   killproc proftpd  
  74.  
  75.   echo  
  76.  
  77.   rm -f /var/lock/subsys/proftpd  
  78.  
  79.   ;;  
  80.  
  81.   status)  
  82.  
  83.   status proftpd  
  84.  
  85.   ;;  
  86.  
  87.   restart)  
  88.  
  89.   $0 stop  
  90.  
  91.   $0 start  
  92.  
  93.   ;;  
  94.  
  95.   reread)  
  96.  
  97.   echo -n "Re-reading proftpd config: "  
  98.  
  99.   killproc proftpd -HUP  
  100.  
  101.   echo  
  102.  
  103.   ;;  
  104.  
  105.   suspend)  
  106.  
  107.   hash ftpshut >/dev/null 2>&1  
  108.  
  109.   if [ $? = 0 ]; then  
  110.  
  111.   if [ $# -gt 1 ]; then  
  112.  
  113.   shift  
  114.  
  115.   echo -n "Suspending with '$*' "  
  116.  
  117.   ftpshut $*  
  118.  
  119.   else  
  120.  
  121.   echo -n "Suspending NOW "  
  122.  
  123.   ftpshut now "Maintanance in progress"  
  124.  
  125.   fi  
  126.  
  127.   else  
  128.  
  129.   echo -n "No way to suspend "  
  130.  
  131.   fi  
  132.  
  133.   echo  
  134.  
  135.   ;;  
  136.  
  137.   resume)  
  138.  
  139.   if [ -f /etc/shutmsg ]; then  
  140.  
  141.   echo -n "Allowing sessions again "  
  142.  
  143.   rm -f /etc/shutmsg  
  144.  
  145.   else  
  146.  
  147.   echo -n "Was not suspended "  
  148.  
  149.   fi  
  150.  
  151.   echo  
  152.  
  153.   ;;  
  154.  
  155.   *)  
  156.  
  157.   echo -n "Usage: $0 {start|stop|restart|status|reread|resume"  
  158.  
  159.   hash ftpshut  
  160.  
  161.   if [ $? = 1 ]; then  
  162.  
  163.   echo '}'  
  164.  
  165.   else  
  166.  
  167.   echo '|suspend}'  
  168.  
  169.   echo 'suspend accepts additional arguments which are passed to ftpshut(8)'  
  170.  
  171.   fi  
  172.  
  173.   exit 1  
  174.  
  175.   esac  
  176.  
  177.   if [ $# -gt 1 ]; then  
  178.  
  179.   shift  
  180.  
  181.   $0 $*  
  182.  
  183.   fi  
  184.  
  185.   exit 0  
  186.  

  #######腳本結(jié)束#########

  [/code:1:de92f96787]

  按Esc,輸入:x保存。

  然后添加到系統(tǒng)服務(wù)并啟動(dòng)

  [code:1:de92f96787]

  chkconfig --add profptd

  service proftpd start[/code:1:de92f96787]

  以后可以用service proftpd restart來(lái)重起proftpd。

  6 ProFTPd的一點(diǎn)體會(huì)

  看proftpd的文檔翻譯過的一句話:Finally, a special command is allowed which can be used to control login access: LOGIN Connection or login to

  the server. Applying a to this pseudo-command can be used to allow or deny initial connection or login to the context. It has no

  effect, and is ignored, when used in a context other than server config, or (i.e. using it in a context

  is meaningless).

  翻譯下:最后,有一個(gè)用來(lái)限制登陸的特殊命令,就是LOGIN。在中用這個(gè),可以禁止或者允許連接進(jìn)來(lái)。但是,如果不在Server config,

  或者中使用的話,他將失去效用,或者說被忽略掉(比如在中使用就是無(wú)效的)。

  proftpd感覺還是比vsftp功能配置上好用一點(diǎn),主要掌握好段基本上應(yīng)用來(lái)說就沒有問題了。

【編輯推薦】

  1. 用MySQL和Proftpd配置FTP服務(wù)器
  2. ProFTPD 下的五大問題
  3. Linux ProFTPd服務(wù)器配置(全)
  4. ProFTPD的配置文件proftpd.conf
  5. ProFTPD的啟動(dòng)與測(cè)試
  6. 手把手教你 配置ProFTPD服務(wù)器
  7. ProFTPd的啟動(dòng)
  8. 在圖形界面下控制ProFTPD
責(zé)任編輯:zhaolei 來(lái)源: 網(wǎng)絡(luò)轉(zhuǎn)載
相關(guān)推薦

2010-03-29 14:48:58

CentOS系統(tǒng)

2011-03-08 10:10:37

Linuxproftpd

2011-02-24 14:47:48

ProFTPD

2011-03-02 10:41:41

Vsftpd安裝

2011-04-01 15:00:35

2011-04-02 14:21:46

MRTG安裝

2011-02-25 17:48:52

2010-06-07 11:22:28

2011-03-03 13:43:11

2011-02-23 11:15:21

DebianProFTPd

2011-02-24 13:15:59

2011-02-22 10:08:46

ProFTPD配置

2011-03-03 13:00:21

2011-02-25 09:44:51

怎樣安裝Proftpd

2011-02-22 09:50:01

2011-03-03 13:07:13

安裝Proftpd

2011-02-25 17:19:09

Pureftpd安裝

2011-03-25 15:01:44

Cacti安裝

2011-03-30 15:05:40

MRTG安裝

2011-04-02 15:26:51

Cacti安裝
點(diǎn)贊
收藏

51CTO技術(shù)棧公眾號(hào)