好湿?好紧?好多水好爽自慰,久久久噜久噜久久综合,成人做爰A片免费看黄冈,机机对机机30分钟无遮挡

主頁 > 知識庫 > linux下用Proftpd搭建ftp服務器及配置

linux下用Proftpd搭建ftp服務器及配置

熱門標簽:大連遼寧電銷機器人 400電話辦理 誠薦翰諾科技 電話機器人客戶對話 地圖標注機位 好操作的電話機器人 谷歌美發店地圖標注入駐 了不起的修仙模擬器地圖標注 為什么地圖標注后不顯示 地圖標注路線軟件

linux下搭建ftp服務器的軟件是wuftp,現在真的時代變了,上網看一下幾乎全世界的人都用proftpd了!趕個潮流,我也用proftpd在公司的一臺備用小服務器上裝上ftp服務器。

  首先proftpd是一個開源軟件,目前最高版本是:1.3.1(非穩定版),穩定的版本是1.3.0,下載文件為proftpd-1.3.0a.tar.gz

  我下載的是1.3.0,上傳到服務器上后按照常規的方法安裝即可。

  tar -zxvf proftpd-1.3.0a.tar.gz

  cd proftpd*

  ./configure --prefix=/usr/local/proftpd

  make

  make install

  安裝完成!接下來是配置。

  設置一:隨機啟動服務,sbin/proftpd文件復制到/etc/rc.d/rc.local文件夾中,以實現開機自動啟動。

  設置二:配置文件在etc/proftpd.conf,配置文件說明如下:

  ServerName "ProFTPD Default Installation"

  ServerType standalone

  DefaultServer on

  分別表示:服務器名稱,服務類型和默認服務狀態!

  后面的服務端口啊什么的我就省去不說了,說最關鍵的權限控制部分。

  # Set the user and group under which the server will run.

  User nobody

  Group nogroup

  注意看上面:以什么用戶和什么組來運行服務。

  更改為你現有的組和用戶,這里為了管理上的方便和安全性上考慮,建議新建一個ftp組和ftp用戶。

  # To cause every FTP user to be "jailed" (chrooted) into their home

  # directory, uncomment this line.

  #DefaultRoot ~

  是否允許用戶進入用戶的主目錄,注意:可是適用/home替代

  # Normally, we want files to be overwriteable.

  AllowOverwrite on

  是否具有重寫的權利

  # A basic anonymous configuration, no upload directories. If you do not

  # want anonymous users, simply delete this entire section.
  User ftp

  Group ftp

  # We want clients to be able to login with "anonymous" as well as "ftp"

  UserAlias anonymous ftp

  # Limit the maximum number of anonymous logins

  MaxClients 10

  # We want 'welcome.msg' displayed at login, and '.message' displayed

  # in each newly chdired directory.

  DisplayLogin welcome.msg

  DisplayFirstChdir .message

  # Limit WRITE everywhere in the anonymous chroot
  DenyAll

  這部分是匿名用戶的定義其實也很簡單。

  啟動不了,出現如下錯誤的解決方法

  [root@new-host sbin]# ./proftpd

  - IPv4 getaddrinfo 'new-host' error: Name or service not known

  - warning: unable to determine IP address of 'new-host'

  - error: no valid servers configured

  - Fatal: error processing configuration file '/usr/local/proftpd/etc/proftpd.conf'

  原因是無法綁定Ip地址。

  在配置文件中增加下面這句:

  DefaultAddress 192.168.8.105

  再重啟服務就可以了!

  接上!原來以為這樣就完事了,可是看看才知道如果我要新增加一個FTP用戶的話實際上是很麻煩的一件事,因為帳號是直接跟系統帳號想關聯的,不安全也不好操作,我們的目的是要做成像虛擬主機服務提供商那樣的ftp!

  接下去,需要一個模塊的支持到 去看看proftpd-mod-quotatab模塊,注意下面這句話:

  NOTE: mod_quotatab became part of the offical ProFTPD source distribution in 1.2.10rc1. If using a version of ProFTPD later than that, please use the mod_quotatab already included, as it will be most up-to-date.

  表示我們下載的1.3版本已經支持做了這個東西,主要編譯安裝的時候把mod_quotatab 開起來就可以了,于是重新編譯!

  前提:確認你已經安裝并且能夠正常運行mysql,否則后面的工作都是沒有意義的了!

  重新編譯:

  ./configure --prefix=/usr/local/proftpd --with-modules=mod_sql:mod_sql_mysql:mod_quotatab:mod_quotatab_sql --with-includes=/usr/include/mysql --with-libraries=/usr/lib/mysql

  注意請根據自己的Linux系統找到MySQL的相應include和lib目錄,以上例子中的相關路徑是大多數Linux系統默認的,如果你的MySQL是通過源碼編譯安裝的,則這兩個目錄一般在安裝路徑下。

  有資料說:需要修改contrib目錄中mod_sql_mysql.c文件:

  vi mod_sql_mysql.c

  找到#include 這一行,將mysql.h改成你的系統中此文件所在的路徑,如/usr/include/mysql/mysql.h

  可是我沒有這樣做也可以,真奇怪!

  然后make

  make install

  一樣的切換到proftpd文件夾中操作,后面的比較復雜,我試試以大學教授的水平用簡單的語言講。

標簽:新鄉 邵陽 法律服務 慶陽 東營 沈陽 阜陽 云浮

巨人網絡通訊聲明:本文標題《linux下用Proftpd搭建ftp服務器及配置》,本文關鍵詞  linux,下用,Proftpd,搭建,ftp,;如發現本文內容存在版權問題,煩請提供相關信息告之我們,我們將及時溝通與處理。本站內容系統采集于網絡,涉及言論、版權與本站無關。
  • 相關文章
  • 下面列出與本文章《linux下用Proftpd搭建ftp服務器及配置》相關的同類信息!
  • 本頁收集關于linux下用Proftpd搭建ftp服務器及配置的相關信息資訊供網民參考!
  • 推薦文章