五月综合激情婷婷六月,日韩欧美国产一区不卡,他扒开我内裤强吻我下面视频 ,无套内射无矿码免费看黄,天天躁,日日躁,狠狠躁

新聞動態(tài)

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

發(fā)布日期:2022-04-13 16:37 | 文章來源:站長之家

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

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

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

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文件夾中,以實現(xiàn)開機自動啟動。

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

ServerName "ProFTPD Default Installation"

ServerType standalone

DefaultServer on

分別表示:服務器名稱,服務類型和默認服務狀態(tài)!

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

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

User nobody

Group nogroup

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

更改為你現(xiàn)有的組和用戶,這里為了管理上的方便和安全性上考慮,建議新建一個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

是否具有重寫的權(quán)利

# 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

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

啟動不了,出現(xiàn)如下錯誤的解決方法

[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用戶的話實際上是很麻煩的一件事,因為帳號是直接跟系統(tǒng)帳號想關(guān)聯(lián)的,不安全也不好操作,我們的目的是要做成像虛擬主機服務提供商那樣的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版本已經(jīng)支持做了這個東西,主要編譯安裝的時候把mod_quotatab 開起來就可以了,于是重新編譯!

前提:確認你已經(jīng)安裝并且能夠正常運行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

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

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

vi mod_sql_mysql.c

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

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

然后make

make install

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

海外服務器租用

版權(quán)聲明:本站文章來源標注為YINGSOO的內(nèi)容版權(quán)均為本站所有,歡迎引用、轉(zhuǎn)載,請保持原文完整并注明來源及原文鏈接。禁止復制或仿造本網(wǎng)站,禁止在非maisonbaluchon.cn所屬的服務器上建立鏡像,否則將依法追究法律責任。本站部分內(nèi)容來源于網(wǎng)友推薦、互聯(lián)網(wǎng)收集整理而來,僅供學習參考,不代表本站立場,如有內(nèi)容涉嫌侵權(quán),請聯(lián)系alex-e#qq.com處理。

實時開通

自選配置、實時開通

免備案

全球線路精選!

全天候客戶服務

7x24全年不間斷在線

專屬顧問服務

1對1客戶咨詢顧問

在線
客服

在線客服:7*24小時在線

客服
熱線

400-630-3752
7*24小時客服服務熱線

關(guān)注
微信

關(guān)注官方微信
頂部