亚洲av成人无遮挡网站在线观看,少妇性bbb搡bbb爽爽爽,亚洲av日韩精品久久久久久,兔费看少妇性l交大片免费,无码少妇一区二区三区

  免費(fèi)注冊(cè) 查看新帖 |

Chinaunix

  平臺(tái) 論壇 博客 文庫(kù)
最近訪問(wèn)板塊 發(fā)新帖
樓主: b.s.d
打印 上一主題 下一主題

[FreeBSD] [發(fā)表]FreeBSD全能服務(wù)器安裝手冊(cè)v0.0.7 [復(fù)制鏈接]

論壇徽章:
0
11 [報(bào)告]
發(fā)表于 2006-06-20 11:27 |只看該作者
FreeBSD全能服務(wù)器安裝手冊(cè)之內(nèi)核編譯篇

################################編譯系統(tǒng)內(nèi)核###################################
進(jìn)入內(nèi)核編輯區(qū)域
cd /usr/src

多線(xiàn)程支持加快編譯速度(注意:cpu的占用率會(huì)升高)
make -j4 buildworld

備份原有內(nèi)核
cd /usr/src/sys/i386/conf
cp GENERIC  /root/GENERIC.OLD

編輯內(nèi)核
ee NS1

建立內(nèi)核
cd /usr/src
make buildkernel

安裝內(nèi)核
make installkernel

重新啟動(dòng)計(jì)算機(jī)
shutdown -r now

mergemaster -p
更新系統(tǒng)配置文件。這個(gè)命令后會(huì)跟隨多個(gè)提示問(wèn)題建議仔細(xì)閱讀后做出選擇,如果是安裝系統(tǒng)后第一次同步代碼,并是在沒(méi)有安裝任何軟件的情況下,可以考慮執(zhí)行mergemaster –ai
“跳過(guò)詢(xún)問(wèn)信息選擇全部更新”
提示如下:
www# mergemaster -p

*** Creating the temporary root environment in /var/tmp/temproot
*** /var/tmp/temproot ready for use
*** Creating and populating directory structure in /var/tmp/temproot



*** Beginning comparison

*** Temp ./etc/master.passwd and installed have the same CVS Id, deleting
*** Temp ./etc/group and installed have the same CVS Id, deleting

*** Comparison complete

Do you wish to delete what is left of /var/tmp/temproot? [no] yes
//我選擇了yes刪除/var/tmp/temproot
//將會(huì)有以下顯示結(jié)果
*** /var/tmp/temproot has been deleted

grep: /etc/make.conf: No such file or directory

*** Comparing make variables

*** From /etc/make.conf
*** From /usr/src/share/examples/etc/make.conf





更新系統(tǒng)配置文件
cd /usr/src
make installworld

mergemaster
shutdown -r now



刪除/usr/obj(以防影響下一次編譯內(nèi)核)
cd /usr/obj
chflags -R noschg *
rm -rf *

論壇徽章:
0
12 [報(bào)告]
發(fā)表于 2006-06-20 11:28 |只看該作者
FreeBSD全能服務(wù)器安裝手冊(cè)之底層軟件安裝篇

##############################安裝perl5.8.X#####################################
Perl介紹
Perl(Practical Extraction and Report Language)是一種腳本語(yǔ)言。 最初的設(shè)計(jì)者為拉里•沃爾(Larry Wall),它于1987年12月18日發(fā)表。Perl借取了C、sed、awk、shell scripting以及很多其他程序語(yǔ)言的特性。
Perl原名pearl。在這個(gè)語(yǔ)言官方發(fā)表前,拉里•沃爾發(fā)現(xiàn)已經(jīng)有個(gè)程序語(yǔ)言“pearl”,便改變將這個(gè)程序語(yǔ)言的名字改成Perl。Perl這個(gè)名字,出現(xiàn)了一些backronym的建議,包括充滿(mǎn)幽默感的“Pathologically Eclectic Rubbish Lister”。今日,“Practical Extraction and Report Language”出現(xiàn)了在很多有關(guān)Perl的資料里,包括官方的man pages。它的名字第一個(gè)字母大寫(xiě)(Perl)時(shí)就指這個(gè)程序語(yǔ)言,無(wú)大寫(xiě)字母(perl)時(shí)就指它的直譯器。將Perl寫(xiě)成“PERL”是不適當(dāng)?shù),所為它并非一個(gè)縮寫(xiě)字。
Perl具有動(dòng)態(tài)語(yǔ)言的強(qiáng)大靈活的特性,并起提供了許多冗余語(yǔ)法,也因此獲得了write-only的“美譽(yù)”,因?yàn)樵S多Perl程序的代碼令人難以閱讀。但Perl同樣可以將代碼書(shū)寫(xiě)得像Python等語(yǔ)言一樣優(yōu)雅。
Perl主要應(yīng)用在Unix平臺(tái)和網(wǎng)頁(yè)中(PHP,CGI)。Perl擁有海量的模塊支持,在解決問(wèn)題時(shí)非常方便。CPAN是Perl模塊的集中營(yíng)。和C一樣,在Perl界,難以讀懂的程序碼大賽是個(gè)有名的活動(dòng)。近似難以讀懂的程序碼,但方向不同,Perl Poetry是可以被perl編譯的詩(shī)。新的詩(shī)經(jīng)通常會(huì)在Perl Monks (http://www.perlmonks.org/index.pl?node=Perl%20Poetry)網(wǎng)站發(fā)表。另一個(gè)Perl hackers的有趣活動(dòng)是寫(xiě)JAPHs。
##############################################################################################################################################################

cd /usr/ports/lang/perl5.8

make WITH_DEBUGGING=yes \
WITH_GDBM=yes \
WITHOUT_PERL_MALLOC=yes \
WITHOUT_PERL_64BITINT=yes \
WITH_THREADS=yes \
ENABLE_SUIDPERL=yes
(注意:以上命令及參數(shù)是按行輸入)
make test
make install
make clean
make rmconfig
rehash
perl -v
ps auwx|grep perl
pkg_info
pkg_info | col -b > /usr/home/chb/pkg_info/pkg_info_perl5.8.txt




###############更改ports軟件包的默認(rèn)下載路徑(因?yàn)橹挥邪惭b了perl后才會(huì)有/etc/make.conf)#######
ee /etc/make.conf

添加
MASTER_SITE_OVERRIDE= \
ftp://ftp.tw.FreeBSD.org/pub/FreeBSD/ports/distfiles/${DIST_SUBDIR} \
ftp://ftp4.tw.FreeBSD.org/pub/FreeBSD/ports/distfiles/${DIST_SUBDIR} \
ftp://ftp10.tw.FreeBSD.org/pub/FreeBSD/ports/distfiles/${DIST_SUBDIR} \
ftp://ftp13.tw.FreeBSD.org/pub/FreeBSD/ports/distfiles/${DIST_SUBDIR} \
ftp://ftp.jp.FreeBSD.org/pub/FreeBSD/ports/distfiles/${DIST_SUBDIR} \
ftp://ftp3.jp.FreeBSD.org/pub/FreeBSD/ports/distfiles/${DIST_SUBDIR} \
ftp://ftp5.jp.FreeBSD.org/pub/FreeBSD/ports/distfiles/${DIST_SUBDIR} \
ftp://ftp.jaist.ac.jp/pub/FreeBSD/ports/distfiles/${DIST_SUBDIR} \
ftp://ftp.freebsdchina.org/pub/FreeBSD/ports/distfiles/${DIST_SUBDIR}

(更改ports默認(rèn)的下載路徑,可以根據(jù)自己的實(shí)際情況進(jìn)行設(shè)置)
rehash


################################安裝openssl####################################
OpenSSL簡(jiǎn)介
OpenSSL項(xiàng)目是共同努力開(kāi)發(fā)出來(lái)的一個(gè)健全的、商業(yè)級(jí)的、全開(kāi)放的和開(kāi)放源代碼的工具包,實(shí)現(xiàn)安全套接層協(xié)議(SSL v2/v3)和傳輸層安全協(xié)議(TLS v1)以及形成一個(gè)功效完整的通用目的的加密技術(shù)庫(kù)。該項(xiàng)目是由全世界范圍內(nèi)團(tuán)體的志愿者管理著,他們使用因特網(wǎng)進(jìn)行交流、策劃和開(kāi)發(fā)這個(gè)OpenSSL工具和相關(guān)的文檔。
OpenSSL基于Eric A. Young 和 Tim J. Hudson開(kāi)發(fā)的優(yōu)秀的SSLeay庫(kù)(http://www.columbia.edu/~ariel/ssleay/)。OpenSSL工具包使用許可類(lèi)似Apache,這意味著任何人在服從一些簡(jiǎn)單的許可協(xié)議下,可以免費(fèi)的獲取并且應(yīng)用于商業(yè)、非商業(yè)目的。
##############################################################################################################################################################cd /usr/ports/security/openssl
make
make install
make clean
make rmconfig
rehash
pkg_info
pkg_info | col -b > /usr/home/chb/pkg_info/pkg_info_openssl.txt



#################################安裝web管理系統(tǒng)##############################
WEBMIN介紹
“Webmin 是一個(gè)基于 Web 的 Unix 系統(tǒng)管理界面。借助任何支持表格和表單的瀏覽器(和 File Manager 模塊所需要的 Java),您就可以設(shè)置用戶(hù)帳號(hào)、Apache、DNS、文件共享,等等。Webmin 包括一個(gè)簡(jiǎn)單的 Web 服務(wù)器和許多 CGI 程序,這些程序可以直接修改系統(tǒng)文件,比如 /etc/inetd.conf 和 /etc/passwd。Web 服務(wù)器和所有的 CGI 程序都是用 Perl 5 編寫(xiě)的,沒(méi)有使用任何非標(biāo)準(zhǔn) Perl 模塊!
Webmin 事實(shí)上可以運(yùn)行于所有的類(lèi) Unix 平臺(tái),包括 Linux、AIX、HPUX、Solaris、OS X,等等。它具有一個(gè) Web 前端,可以完成 Linux 中的諸多管理任務(wù)。它可以以本地方式或者遠(yuǎn)程方式運(yùn)行于任意圖形化瀏覽器中。Webmin 使用 SSL 來(lái)保證安全,防止偵聽(tīng)。當(dāng)您學(xué)習(xí) Linux 管理時(shí),Webmin 將為您節(jié)省很多時(shí)間。Webmin 還可以幫您完成那些還不能自動(dòng)執(zhí)行的繁瑣的任務(wù)。Webmin 是可擴(kuò)展的。作者提供了一個(gè)開(kāi)發(fā)向?qū)В乙呀?jīng)出現(xiàn)了一些第三方的模塊。您也可以設(shè)計(jì)您自己的模塊,以使 Webmin 永遠(yuǎn)可以按您的需要進(jìn)行調(diào)整。
##############################################################################################################################################################

cd /usr/ports/sysutils/webmin
make
make install
make clean
make rmconfig

配置webmin(用戶(hù)名、密碼、端口等)
/usr/local/lib/webmin/setup.sh

啟動(dòng)webmin
/usr/local/etc/webmin/start

測(cè)試webmin
https://計(jì)算機(jī)名:端口號(hào)

https://192.168.0.118:10000/
使webmin同系統(tǒng)一起啟動(dòng)
ee /etc/rc.conf
添加
webmin_enable="YES"

pkg_info
pkg_info | col -b > /usr/home/chb/pkg_info/pkg_info_webmin.txt
###############################安裝expat2#####################################
cd /usr/ports/textproc/expat2
make
make install
make clean
pkg_info
pkg_info | col -b > /usr/home/chb/pkg_info/pkg_info_expat2.txt

論壇徽章:
0
13 [報(bào)告]
發(fā)表于 2006-06-20 11:28 |只看該作者
FreeBSD全能服務(wù)器安裝手冊(cè)之?dāng)?shù)據(jù)庫(kù)安裝篇


#################################安裝數(shù)據(jù)庫(kù)mysql4.0############################
MySQL介紹
MySQL是一個(gè)開(kāi)放源碼的小型關(guān)系型數(shù)據(jù)庫(kù)管理系統(tǒng),開(kāi)發(fā)者為MySQL AB公司。目前MySQL被廣泛地應(yīng)用在Internet上的中小型網(wǎng)站中。由于其體積小、速度快、總體擁有成本低,尤其是開(kāi)放源碼這一特點(diǎn),許多中小型網(wǎng)站為了降低網(wǎng)站總體擁有成本而選擇了MySQL作為網(wǎng)站數(shù)據(jù)庫(kù)。
MySQL的特性
使用C和C++編寫(xiě),并使用了多種編譯器進(jìn)行測(cè)試,保證源代碼的可移植性
支持AIX、FreeBSD、HP-UX、Linux、Mac OS、Novell Netware、OpenBSD、OS/2 Wrap、Solaris、Windows等多種操作系統(tǒng)
為多種編程語(yǔ)言提供了API。這些編程語(yǔ)言包括C、C++、Eiffel、Java、Perl、PHP、Python、Ruby和Tcl等。
支持多線(xiàn)程,充分利用CPU資源
優(yōu)化的SQL查詢(xún)算法,有效地提高查詢(xún)速度
既能夠作為一個(gè)單獨(dú)的應(yīng)用程序應(yīng)用在客戶(hù)端服務(wù)器網(wǎng)絡(luò)環(huán)境中,也能夠作為一個(gè)庫(kù)而嵌入到其他的軟件中
提供多語(yǔ)言支持,常見(jiàn)的編碼如中文的GB2312、GB18030、BIG5,日文的SJIS等都可以用作數(shù)據(jù)表名和數(shù)據(jù)列名
提供TCP/IP、ODBC和JDBC等多種數(shù)據(jù)庫(kù)連接途徑
提供用于管理、檢查、優(yōu)化數(shù)據(jù)庫(kù)操作的管理工具
可以處理?yè)碛猩锨f(wàn)條記錄的大型數(shù)據(jù)庫(kù)

MySQL的應(yīng)用
與其他的大型數(shù)據(jù)庫(kù)例如Oracle、DB2、SQL Server等相比,MySQL自有它的不足之處,如規(guī)模小、功能有限(MySQL不支持視圖(已經(jīng)被列入5.1版的開(kāi)發(fā)計(jì)劃)、存儲(chǔ)過(guò)程、事件等)等,但是這絲毫也沒(méi)有減少它受歡迎的程度。對(duì)于一般的個(gè)人使用者和中小型企業(yè)來(lái)說(shuō),MySQL提供的功能已經(jīng)綽綽有余,而且由于MySQL是開(kāi)放源碼軟件,因此可以大大降低總體擁有成本。

目前Internet上流行的網(wǎng)站構(gòu)架方式是LAMP(Linux+Apache+MySQL+PHP),即使用Linux作為操作系統(tǒng),Apache作為Web服務(wù)器,MySQL作為數(shù)據(jù)庫(kù),PHP作為服務(wù)器端腳本解釋器。由于這四個(gè)軟件都是遵循GPL的開(kāi)放源碼軟件,因此使用這種方式不用花一分錢(qián)就可以建立起一個(gè)穩(wěn)定、免費(fèi)的網(wǎng)站系統(tǒng)。

MySql管理
可以使用命令行工具管理MySQL 數(shù)據(jù)庫(kù)(命令mysql 和 mysqladmin),你也可以從MySQL 的網(wǎng)站下載圖形管理工具M(jìn)ySQL Administrator (http://www.mysql.com/products/administrator) 和 MySQL Query Browser (http://www.mysql.com/products/query-browser).

phpMyAdmin是由php寫(xiě)成的,很流行的開(kāi)源web程序。

hpMyBackupPro, 也是由PHP寫(xiě)成的,可以創(chuàng)建和管理數(shù)據(jù)庫(kù)。它可以創(chuàng)建偽cronjobs,可以用來(lái)自動(dòng)在某個(gè)時(shí)間或周期備份MySQL 數(shù)據(jù)庫(kù)
##############################################################################################################################################################

cd /usr/ports/databases/mysql40-server
make WITH_CHARSET=gbk \
WITH_XCHARSET=all \
SKIP_DNS_CHECK=yes \
BUILD_OPTIMIZED=yes \
BUILD_STATIC=yes
make install
make clean
make rmconfig

pkg_info
pkg_info | col -b > /usr/home/chb/pkg_info/pkg_info_mysql40-server.txt



%%%%%%%%%%%%安裝mysql40組件%%%%%%%%%%%%%%
cd /usr/ports/databases/p5-DBD-mysql40
make
make install
make clean
make rmconfig

%%%%%%%%%%%使mysql40和系統(tǒng)一起啟動(dòng)%%%%%%%%%%%
ee /etc/rc.conf
mysql_enable="YES"

%%%%%%%%%%啟動(dòng)mysql40%%%%%%%%%%%%%%%%%%%
/usr/local/etc/rc.d/mysql-server.sh start

%%%%%%%%%%%設(shè)置mysql40的密碼%%%%%%%%%%%%%%
/usr/local/bin/mysqladmin -u root password 'password'

%%%%%%%%%%%測(cè)試數(shù)據(jù)庫(kù)登陸%%%%%%%%%%%%%%%%
mysql -u root -ppassword

pkg_info
pkg_info | col -b > /usr/home/chb/pkg_info/pkg_info_mysql40.txt

論壇徽章:
0
14 [報(bào)告]
發(fā)表于 2006-06-20 11:29 |只看該作者
FreeBSD全能服務(wù)器安裝手冊(cè)之底層服務(wù)器篇


###############################安裝web服務(wù)器apache1.33######################
APACHE介紹
Apache是一個(gè)歷史悠久并且功能十分強(qiáng)大的WEB服務(wù)器,但其豐富的功能對(duì)于一個(gè)新手來(lái)說(shuō)往往不知道從何下手。我個(gè)人感覺(jué)Apache的設(shè)計(jì)充分體現(xiàn)了模塊化設(shè)計(jì)的優(yōu)勢(shì),通過(guò)在動(dòng)態(tài)模塊加載(DSO)模式下的安裝,任何子應(yīng)用模塊都可以通過(guò)配置文件的簡(jiǎn)單修改進(jìn)行積木式的靈活配置。安裝的過(guò)程可以從簡(jiǎn)單的靜態(tài)html服務(wù)開(kāi)始,一個(gè)模塊一個(gè)模塊的學(xué)習(xí)使用。從單純的HTML靜態(tài)服務(wù)(core),到復(fù)雜的動(dòng)態(tài)頁(yè)面服務(wù)(core + php, core + resin, core + php + mod_gzip, core + resin + mod_expire)。
##############################################################################################################################################################


cd /usr/ports/www/apache13
make
make install
make clean

%%%%%%%%%%%使apache和系統(tǒng)一起啟動(dòng)%%%%%%%%%%%
ee /etc/rc.conf
添加
apache_enable="YES"

%%%%%%%%%%%%更改apache的相應(yīng)設(shè)置%%%%%%%%%%%
ee /usr/local/etc/apache/httpd.conf
change 330  
ServerAdmin you@your.address ==>ServerAdmin b.s.d@163.com  
change 348  
#ServerName www.example.com==>ServerName www.tjhaina.net  
添加              794   
AddLanguage zh-cn .zh-cn
添加              822   
AddCharset GB2312 .gb2312
添加                   976
NameVirtualHost 192.168.0.205 (your hosts ip)

%%%%%%%%%%%%啟動(dòng)apache%%%%%%%%%%%%%%%%%
/usr/local/sbin/apachectl start
pkg_info
pkg_info | col -b > /usr/home/chb/pkg_info/pkg_info_apache.txt


####################################安裝php###################################
PHP介紹

PHP 的全名就蠻有趣的,它是一個(gè)遞歸的縮寫(xiě)名稱(chēng),"PHP: Hypertext Preprocessor",打開(kāi)縮寫(xiě)還是縮寫(xiě)。PHP 是一種 HTML 內(nèi)嵌式的語(yǔ)言 (類(lèi)似 IIS 上的 ASP)。而 PHP 獨(dú)特的語(yǔ)法混合了 C、Java、Perl 以及 PHP 式的新語(yǔ)法。它可以比 CGI 或者 Perl 更快速的執(zhí)行動(dòng)態(tài)網(wǎng)頁(yè)。
PHP 最初是在公元 1994 年 Rasmus Lerdorf 開(kāi)始計(jì)劃發(fā)展。在 1995 年以 Personal Home Page Tools (PHP Tools) 開(kāi)始對(duì)外發(fā)表第一個(gè)版本。在這早期的版本中,提供了訪客留言本、訪客計(jì)數(shù)器等簡(jiǎn)單的功能。隨后在新的成員加入開(kāi)發(fā)行列之后,在 1995 年中,第二版的 PHP 問(wèn)市。第二版定名為 PHP/FI(Form Interpreter)。PHP/FI 并加入了 mSQL 的支持,自此奠定了 PHP 在動(dòng)態(tài)網(wǎng)頁(yè)開(kāi)發(fā)上的影響力。在 1996 年底,有一萬(wàn)五千個(gè) Web 網(wǎng)站使用 PHP/FI;在 1997 年中,使用 PHP/FI 的 Web 網(wǎng)站成長(zhǎng)到超過(guò)五萬(wàn)個(gè)。而在 1997 年中,開(kāi)始了第三版的開(kāi)發(fā)計(jì)劃,開(kāi)發(fā)小組加入了 Zeev Suraski 及 Andi Gutmans,而第三版就定名為 PHP3。

PHP3 跟 Apache 服務(wù)器緊密結(jié)合的特性;加上它不斷的更新及加入新的功能;并且它幾乎支持所有主流與非主流數(shù)據(jù)庫(kù);再以它能高速的執(zhí)行效率,使得 PHP 在 1999 年中的使用網(wǎng)站超過(guò)了十五萬(wàn)!!它的源代碼完全公開(kāi),在 Open Source 意識(shí)抬頭的今天,它更是這方面的中流砥柱。不斷地有新的函數(shù)庫(kù)加入,以及不停地更新的活力,使得 PHP 無(wú)論在 UNIX 或是 Win32 的平臺(tái)上都可以有更多新的功能。它提供豐富的函數(shù),使得在程序設(shè)計(jì)方面有著更好的支持。

PHP 的第四代 Zend 核心引擎已經(jīng)進(jìn)入測(cè)試階段。整個(gè)腳本程序的核心大幅改動(dòng),讓程序的執(zhí)行速度,滿(mǎn)足更快的要求。在最佳化之后的效率,已較傳統(tǒng) CGI 或者 ASP 等程序有更好的表現(xiàn)。而且還有更強(qiáng)的新功能、更豐富的函數(shù)庫(kù)。無(wú)論您接不接受,PHP 都將在 Web CGI 的領(lǐng)域上,掀起巔覆性的革命。對(duì)于一位專(zhuān)職 Web Master 而言,它將也是必修課程之一。
##############################################################################################################################################################
cd /usr/ports/lang/php4
make
lqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqk
x                     Options for php4 4.4.2_1                       x
x lqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqk x
x x         [X] DEBUG      Enable debug                            x x
x x         [X] MULTIBYTE  Enable zend multibyte support           x x
x x         [X] IPV6       Enable ipv6 support                     x x
x x         [X] OPENSSL    Build static OpenSSL extension          x x
x x                                                                x x
tqmqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqjqu
x                       [  OK  ]       Cancel                        x
mqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqj
make install
make clean
make rmconfig
pkg_info
pkg_info | col -b > /usr/home/chb/pkg_info/pkg_info_php4.txt



###################################安裝php擴(kuò)展################################
cd /usr/ports/lang/php4-extensions
make (+  bz2)
lqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqk
x                 Options for php4-extensions 1.0                    x
x lqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqk x
x x  [ ] BCMATH       bc style precision math functions            x x
x x  [ ] BZ2          bzip2 library support                        x x
x x  [ ] CALENDAR     calendar conversion support                  x x
x x  [ ] CRACK        crack support                                x x
x x  [X] CTYPE        ctype functions                              x x
x x  [ ] CURL         CURL support                                 x x
x x  [ ] DBA          dba support                                  x x
x x  [ ] DBASE        dBase library support                        x x
x x  [ ] DBX          dbx support                                  x x
x x  [ ] DIO          Direct I/O support                           x x
x x  [ ] DOMXML       DOM support                                  x x
x x  [ ] EXIF         EXIF support                                 x x
x x  [ ] FILEINFO     fileinfo support                             x x
x x  [ ] FILEPRO      filePro support                              x x
x x  [ ] FRIBIDI      FriBidi support                              x x
x x  [ ] FTP          FTP support                                  x x
x x  [ ] GD           GD library support                           x x
x x  [ ] GETTEXT      gettext library support                      x x
x x  [ ] GMP          GNU MP support                               x x
x x  [ ] ICONV        iconv support                                x x
x x  [ ] IMAGICK      ImageMagick support                          x x
x x  [ ] IMAP         IMAP support                                 x x
x x  [ ] INTERBASE    Interbase 6 database support (Firebird)      x x
x x  [ ] LDAP         OpenLDAP support                             x x
x x  [ ] MBSTRING     multibyte string support                     x x
x x  [ ] MCAL         Modular Calendar Access Library support      x x
x x  [ ] MCRYPT       Encryption support                           x x
x x  [ ] MCVE         MCVE support                                 x x
x x  [ ] MHASH        Crypto-hashing support                       x x
x x  [ ] MING         ming shockwave flash support                 x x
x x  [ ] MNOGOSEARCH  mnoGoSearch support                          x x
x x  [ ] MSSQL        MS-SQL database support                      x x
x x  [X] MYSQL        MySQL database support                       x x
x x  [ ] NCURSES      ncurses support (CLI only)                   x x
x x  [ ] ODBC         unixODBC support                             x x
x x  [ ] OPENSSL      OpenSSL support                              x x
x x  [ ] ORACLE       Oracle support                               x x
x x  [X] OVERLOAD     user-space object overloading support        x x
x x  [ ] PANDA        panda support                                x x
x x  [ ] PCNTL        pcntl support (CLI only)                     x x
x x  [X] PCRE         Perl Compatible Regular Expression support   x x
x x  [ ] PDF          PDFlib support (implies GD)                  x x
x x  [ ] PFPRO        PayFlow Pro support                          x x
x x  [ ] PGSQL        PostgreSQL database support                  x x
x x  [X] POSIX        POSIX-like functions                         x x
x x  [ ] PSPELL       pspell support                               x x
x x  [ ] READLINE     readline support (CLI only)                  x x
x x  [ ] RECODE       recode support                               x x
x x  [X] SESSION      session support                              x x
x x  [ ] SHMOP        shmop support                                x x
x x  [ ] SNMP         SNMP support                                 x x
x x  [ ] SOCKETS      sockets support                              x x
x x  [ ] SYBASE_CT    Sybase database support                      x x
x x  [ ] SYSVMSG      System V message support                     x x
x x  [ ] SYSVSEM      System V semaphore support                   x x
x x  [ ] SYSVSHM      System V shared memory support               x x
x x  [X] TOKENIZER    tokenizer support                            x x
x x  [ ] WDDX         WDDX support (implies XML)                   x x
x x  [X] XML          XML support                                  x x
x x  [ ] XMLRPC       XMLRPC-EPI support                           x x
x x  [ ] XSLT         XSLT Sablotron support                       x x
x x  [ ] YAZ          YAZ support (ANSI/NISO Z39.50)               x x
x x  [ ] YP           YP/NIS support                               x x
x x  [ ] ZIP          ZIP support                                  x x
x x  [X] ZLIB         ZLIB support                                 x x
tqmqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqjqu
x                       [  OK  ]       Cancel                        x
mqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqj

make install
make clean
make rmconfig
cd /usr/local/etc
cp php.ini-dist php.ini
pkg_info
pkg_info | col -b > /usr/home/chb/pkg_info/pkg_info_php4-extensions.txt

論壇徽章:
0
15 [報(bào)告]
發(fā)表于 2006-06-20 11:31 |只看該作者
FreeBSD全能服務(wù)器安裝手冊(cè)之文件服務(wù)器篇
--安裝配置篇

cd /usr/ports/ftp/pure-ftpd
make WITH_WELCOMESG=yes WITH_UPLOADSCRIPT=yes WITH_COOKIE=yes \
WITH_VIRTUALHOSTS=yes WITH_VIRTUALROOT=yes WITH_DIRALIASES=yes \
WITH_QUOTAS=yes WITH_SYSQUOTAS=yes WITH_RATIOS=yes \
WITH_RATIOS=yes WITH_THROTTLING=yes \
WITH_MYSQL=1 WITH_LANG=simplified-chinese \
WITH_EVERYHING=yes WITH_PARANOIDMSG=yes \
WITH_VIRTUALCHROOT=yes WITH_TLS=yes \
WITH_LARGEFILE=yes


lqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqk
x                   Options for pure-ftpd 1.0.21                     x
x lqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqk x
x x[ ] LDAP           Support for users in LDAP directories        x x
x x[X] MYSQL          Support for users in MySQL database          x x
x x[X] PAM            Support for PAM authentication               x x
x x[ ] PGSQL          Support for users in PostgreSQL database     x x
x x[ ] PRIVSEP        Enable privilege separation                  x x
x x[ ] PERUSERLIMITS  Per-user concurrency limits                  x x
x x[X] THROTTLING     Bandwidth throttling                         x x
x x[X] BANNER         Show pure-ftpd welcome upon session start    x x
x x[X] UPLOADSCRIPT   Support uploadscript daemon                  x x
x x[ ] UTF8           Support for charset conversion (expreimental)x x
x x                                                                x x
x x                                                                x x
x x                                                                x x
x x                                                                x x
x x                                                                x x
tqmqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqjqu
x                       [  OK  ]       Cancel                        x
mqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqj

make install
make clean
make rmconfig
cd /usr/local/etc
cp pureftpd-mysql.conf.sample pureftpd-mysql.conf
cp pure-ftpd.conf.sample pure-ftpd.conf



####################################建立ftp用戶(hù)組##############################

pw groupadd ftpusers -g 2000
pw useradd ftp -u 2000 -g ftpusers -s /sbin/nologin
###############################################################################
#################將以下代碼保存成文本文件并命名成script.mysql####################
INSERT INTO mysql.user (Host, User, Password, Select_priv, Insert_priv,
Update_priv, Delete_priv, Create_priv, Drop_priv, Reload_priv,
Shutdown_priv, Process_priv, File_priv, Grant_priv, References_priv,
Index_priv, Alter_priv) VALUES
('localhost','ftp',PASSWORD('passwd'),'Y','Y','Y','Y','N','N','N','N',
'N','N','N','N','N','N');

FLUSH PRIVILEGES;

CREATE DATABASE ftpusers;

USE ftpusers;

CREATE TABLE admin (
Username varchar(35) NOT NULL default '',
Password char(32) binary NOT NULL default '',
PRIMARY KEY (Username)
) TYPE=MyISAM;

INSERT INTO admin VALUES ('Administrator',MD5('passwd'));

CREATE TABLE users (
User char(16) NOT NULL default '',
Password char(32) binary NOT NULL default '',
Uid int(11) NOT NULL default '2000',
Gid int(11) NOT NULL default '2000',
Dir char(128) NOT NULL default '',
QuotaFiles int(10) NOT NULL default '500',
QuotaSize int(10) NOT NULL default '30',
ULBandwidth int(10) NOT NULL default '80',
DLBandwidth int(10) NOT NULL default '80',
status enum('0','1') NOT NULL default '1',
ipaccess varchar(15) NOT NULL default '*',
comment tinytext NOT NULL,
PRIMARY KEY (User),
UNIQUE KEY User (User)
) TYPE=MyISAM;

INSERT INTO `users` VALUES ('test1',MD5('123456'),2001,2000,'/home/test1',500,30,80,5,1,'*','*');
##############################################################################################################################################################


#################################添加ftp用戶(hù)數(shù)據(jù)庫(kù)#############################
mysql -u root -ppassword < script.mysql

###############################################################################
################################設(shè)置pureftpd-mysql.conf##########################
ee /usr/local/etc/pureftpd-mysql.conf
###############################################################################
##############################################
#                                            #
# Sample Pure-FTPd Mysql configuration file.                  #
# See README.MySQL for explanations.                  #
#                                            #
##############################################


# Optional : MySQL server name or IP. Don't define this for unix sockets.
#選擇:MySQL服務(wù)器的名字或IP地址。沒(méi)有對(duì)unix 套接字作出詳細(xì)定義
# MYSQLServer     127.0.0.1
#MYSQL服務(wù)器的                                                        IP

# Optional : MySQL port. Don't define this if a local unix socket is used.
#選擇:MySQL服務(wù)器對(duì)外服務(wù)的端口。如果本地UNIX端口已經(jīng)被使用,則這個(gè)連接不能#被使用
# MYSQLPort       3306
#MYSQL           端口號(hào)

# Optional : define the location of mysql.sock if the server runs on this host.

MYSQLSocket     /tmp/mysql.sock
#使用UNIX.sock本地連接

# Mandatory : user to bind the server as.

MYSQLUser       root
#MYSQL中存放FTP用戶(hù)的數(shù)據(jù)庫(kù)的用戶(hù)名

# Mandatory : user password. You must have a password.

MYSQLPassword   rootpw
#MYSQL中存放FTP用戶(hù)的數(shù)據(jù)庫(kù)的密碼

# Mandatory : database to open.

MYSQLDatabase   pureftpd
#MYSQL中存放FTP用戶(hù)的數(shù)據(jù)庫(kù)的名字

# Mandatory : how passwords are stored
# Valid values are : "cleartext", "crypt", "md5" and "password"
# ("password" = MySQL password() function)
# You can also use "any" to try "crypt", "md5" *and* "password"

MYSQLCrypt      cleartext
#密碼加密方式"cleartext", "crypt", "md5" and "password"
# cleartext 明文,crypt,md5,password是Backend password(‘your-passwd’)函數(shù)(MYSQL
#數(shù)據(jù)庫(kù)所使用的password()函數(shù))
# In the following directives, parts of the strings are replaced at
# run-time before performing queries :
#
# \L is replaced by the login of the user trying to authenticate.
# \I is replaced by the IP address the user connected to.
# \P is replaced by the port number the user connected to.
# \R is replaced by the IP address the user connected from.
# \D is replaced by the remote IP address, as a long decimal number.
#
# Very complex queries can be performed using these substitution strings,
# especially for virtual hosting.

# Query to execute in order to fetch the password

MYSQLGetPW      SELECT Password FROM users WHERE User="\L"
# 密碼字段,我使用users表中的Password做為密碼字段

# Query to execute in order to fetch the system user name or uid

MYSQLGetUID     SELECT Uid FROM users WHERE User="\L"
#UID用戶(hù)ID字段

# Optional : default UID - if set this overrides MYSQLGetUID

#MYSQLDefaultUID 1000
#默認(rèn)的UID (注:如何開(kāi)啟該選項(xiàng),MYSQLGetUID將失去作用)

# Query to execute in order to fetch the system user group or gid

MYSQLGetGID     SELECT Gid FROM users WHERE User="\L"
#GID組ID字段

# Optional : default GID - if set this overrides MYSQLGetGID

#MYSQLDefaultGID 1000
#默認(rèn)的GID (注:如何開(kāi)啟該選項(xiàng),MYSQLGetGID將失去作用)

# Query to execute in order to fetch the home directory

MYSQLGetDir     SELECT Dir FROM users WHERE User="\L"
#從數(shù)據(jù)庫(kù)中獲取FTP用戶(hù)目錄如/home/web/www-9812-net

# Optional : query to get the maximal number of files
# Pure-FTPd must have been compiled with virtual quotas support.

# MySQLGetQTAFS  SELECT QuotaFiles FROM users WHERE User="\L"
#磁盤(pán)限額,文件數(shù)限制。如1000,允許用戶(hù)上傳1千個(gè)文件

# Optional : query to get the maximal disk usage (virtual quotas)
# The number should be in Megabytes.
# Pure-FTPd must have been compiled with virtual quotas support.

# MySQLGetQTASZ  SELECT QuotaSize FROM users WHERE User="\L"
#磁盤(pán)限額,F(xiàn)TP用戶(hù)空間限制(單位為M),如:100M

# Optional : ratios. The server has to be compiled with ratio support.

# MySQLGetRatioUL SELECT ULRatio FROM users WHERE User="\L"
# MySQLGetRatioDL SELECT DLRatio FROM users WHERE User="\L"
#上傳/下載比率。MySQLGetRatioUL為上傳比,MySQLGetRatioDL下載比。如:1:5

# Optional : bandwidth throttling.
# The server has to be compiled with throttling support.
# Values are in KB/s .

# MySQLGetBandwidthUL SELECT ULBandwidth FROM users WHERE User="\L"
# MySQLGetBandwidthDL SELECT DLBandwidth FROM users WHERE User="\L"
#下傳/下載帶寬(單位KB/s)。MySQLGetBandwidthUL上傳帶寬,MySQLGetBandwidthDL3

論壇徽章:
0
16 [報(bào)告]
發(fā)表于 2006-06-20 11:39 |只看該作者
#下載帶寬。如上傳500KB/s,下載50KB/s

# Enable ~ expansion. NEVER ENABLE THIS BLINDLY UNLESS :
# 1) You know what you are doing.
# 1)你知道你正在做什么?
# 2) Real and virtual users match.
# 2)真實(shí)的和虛擬的用戶(hù)相匹配
# MySQLForceTildeExpansion 1

# If you upgraded your tables to transactionnal tables (Gemini,
# BerkeleyDB, Innobase...), you can enable SQL transactions to
# avoid races. Leave this commented if you are using the
# traditionnal MyIsam databases or old (< 3.23.x) MySQL versions.

# MySQLTransactions On
# 此文的配置文件可以根據(jù)個(gè)人的實(shí)際需要來(lái)配置完成
#############################################################################################################################################################################################################################################


###############################################################################
#################################設(shè)置pure-ftpd.conf##############################
ee /usr/local/etc/pure-ftpd.conf

############################################################
#                                                          #
#         Configuration file for pure-ftpd wrappers        #
#                                                          #
############################################################

# If you want to run Pure-FTPd with this configuration   
# instead of command-line options, please run the
# following command :
#
# /usr/local/sbin/pure-config.pl /usr/local/etc/pure-ftpd.conf
#
# Please don't forget to have a look at documentation at
# http://www.pureftpd.org/documentation.shtml for a complete list of
# options.

# Cage in every user in his home directory

ChrootEveryone              yes
# chroot每一個(gè)用戶(hù),等同于Proftpd 中的DefaultRoot~ , 可以限制用戶(hù)在某個(gè)地方活動(dòng),增
# 強(qiáng)服務(wù)器的安全性。使用戶(hù)不能通過(guò)cd命令進(jìn)入上一級(jí)目錄。


# If the previous option is set to "no", members of the following group
# won't be caged. Others will be. If you don't want chroot()ing anyone,
# just comment out ChrootEveryone and TrustedGID.

# TrustedGID                    100
#以上兩者要一起用


# Turn on compatibility hacks for broken clients

BrokenClientsCompatibility  no



# Maximum number of simultaneous users

MaxClientsNumber            50
#最大鏈接數(shù)


# Fork in background

Daemonize                   yes
#Fork in background 以守護(hù)進(jìn)程方式在后臺(tái)運(yùn)行


# Maximum number of sim clients with the same IP address

MaxClientsPerIP             8
#每個(gè)ip最多鏈接數(shù),最好設(shè)小點(diǎn)。


# If you want to log all client commands, set this to "yes".
# This directive can be duplicated to also log server responses.

VerboseLog                  no
#是否要把所有client端的指令都log下來(lái)


# List dot-files even when the client doesn't send "-a".

DisplayDotFiles             yes
#顯示開(kāi)頭的文件


# Don't allow authenticated users - have a public anonymous FTP only.

AnonymousOnly               no
#是否只讓匿名登錄


# Disallow anonymous connections. Only allow authenticated users.

NoAnonymous                 no
#不開(kāi)放匿名登入


# Syslog facility (auth, authpriv, daemon, ftp, security, user, local*)
# The default facility is "ftp". "none" disables logging.

SyslogFacility              ftp
# 應(yīng)該是對(duì)日志做一下過(guò)濾 (auth, authpriv, daemon, ftp, security, user, local*)可以讓日志只
# 記錄想要的信息


# Display fortune cookies

# FortunesFile              /usr/share/fortune/zippy



# Don't resolve host names in log files. Logs are less verbose, but
# it uses less bandwidth. Set this to "yes" on very busy servers or
# if you don't have a working DNS.

DontResolve                 yes
#不反向解釋客戶(hù)端的ip


# Maximum idle time in minutes (default = 15 minutes)

MaxIdleTime                 15
#最大閑置時(shí)間(分鐘)


# LDAP configuration file (see README.LDAP)

# LDAPConfigFile                /etc/pureftpd-ldap.conf
#使用LDAP認(rèn)證


# MySQL configuration file (see README.MySQL)

# MySQLConfigFile               /etc/pureftpd-mysql.conf
#使用MySQL認(rèn)證  注意:配置文件的正確路徑

# Postgres configuration file (see README.PGSQL)

# PGSQLConfigFile               /etc/pureftpd-pgsql.conf
#使用PGSQL認(rèn)證

# PureDB user database (see README.Virtual-Users)

# PureDB                        /etc/pureftpd.pdb
#使用者資料的DB存放地點(diǎn) [由于我是用PureFTPD的內(nèi)建DB.固有此選項(xiàng)

# Path to pure-authd socket (see README.Authentication-Modules)


# ExtAuth                       /var/run/ftpd.sock
#pure-authd socket 路徑 (詳細(xì)請(qǐng)看 README.Authentication-Modules)


# If you want to enable PAM authentication, uncomment the following line

# PAMAuthentication             yes
#開(kāi)啟PAM認(rèn)證


# If you want simple Unix (/etc/passwd) authentication, uncomment this

# UnixAuthentication            yes
#如果你想要有簡(jiǎn)單的Unix(/etc/passwd)的認(rèn)證


# Please note that LDAPConfigFile, MySQLConfigFile, PAMAuthentication and
# UnixAuthentication can be used only once, but they can be combined
# together. For instance, if you use MySQLConfigFile, then UnixAuthentication,

[ 本帖最后由 b.s.d 于 2006-6-20 11:45 編輯 ]

論壇徽章:
0
17 [報(bào)告]
發(fā)表于 2006-06-20 11:44 |只看該作者
#下載帶寬。如上傳500KB/s,下載50KB/s

# Enable ~ expansion. NEVER ENABLE THIS BLINDLY UNLESS :
# 1) You know what you are doing.
# 1)你知道你正在做什么?
# 2) Real and virtual users match.
# 2)真實(shí)的和虛擬的用戶(hù)相匹配
# MySQLForceTildeExpansion 1

# If you upgraded your tables to transactionnal tables (Gemini,
# BerkeleyDB, Innobase...), you can enable SQL transactions to
# avoid races. Leave this commented if you are using the
# traditionnal MyIsam databases or old (< 3.23.x) MySQL versions.

# MySQLTransactions On
# 此文的配置文件可以根據(jù)個(gè)人的實(shí)際需要來(lái)配置完成
#############################################################################################################################################################################################################################################


###############################################################################
#################################設(shè)置pure-ftpd.conf##############################
ee /usr/local/etc/pure-ftpd.conf

############################################################
#                                                          #
#         Configuration file for pure-ftpd wrappers        #
#                                                          #
############################################################

# If you want to run Pure-FTPd with this configuration   
# instead of command-line options, please run the
# following command :
#
# /usr/local/sbin/pure-config.pl /usr/local/etc/pure-ftpd.conf
#
# Please don't forget to have a look at documentation at
# http://www.pureftpd.org/documentation.shtml for a complete list of
# options.

# Cage in every user in his home directory

ChrootEveryone              yes
# chroot每一個(gè)用戶(hù),等同于Proftpd 中的DefaultRoot~ , 可以限制用戶(hù)在某個(gè)地方活動(dòng),增
# 強(qiáng)服務(wù)器的安全性。使用戶(hù)不能通過(guò)cd命令進(jìn)入上一級(jí)目錄。


# If the previous option is set to "no", members of the following group
# won't be caged. Others will be. If you don't want chroot()ing anyone,
# just comment out ChrootEveryone and TrustedGID.

# TrustedGID                    100
#以上兩者要一起用


# Turn on compatibility hacks for broken clients

BrokenClientsCompatibility  no



# Maximum number of simultaneous users

MaxClientsNumber            50
#最大鏈接數(shù)


# Fork in background

Daemonize                   yes
#Fork in background 以守護(hù)進(jìn)程方式在后臺(tái)運(yùn)行


# Maximum number of sim clients with the same IP address

MaxClientsPerIP             8
#每個(gè)ip最多鏈接數(shù),最好設(shè)小點(diǎn)。


# If you want to log all client commands, set this to "yes".
# This directive can be duplicated to also log server responses.

VerboseLog                  no
#是否要把所有client端的指令都log下來(lái)


# List dot-files even when the client doesn't send "-a".

DisplayDotFiles             yes
#顯示開(kāi)頭的文件


# Don't allow authenticated users - have a public anonymous FTP only.

AnonymousOnly               no
#是否只讓匿名登錄


# Disallow anonymous connections. Only allow authenticated users.

NoAnonymous                 no
#不開(kāi)放匿名登入


# Syslog facility (auth, authpriv, daemon, ftp, security, user, local*)
# The default facility is "ftp". "none" disables logging.

SyslogFacility              ftp
# 應(yīng)該是對(duì)日志做一下過(guò)濾 (auth, authpriv, daemon, ftp, security, user, local*)可以讓日志只
# 記錄想要的信息


# Display fortune cookies

# FortunesFile              /usr/share/fortune/zippy



# Don't resolve host names in log files. Logs are less verbose, but
# it uses less bandwidth. Set this to "yes" on very busy servers or
# if you don't have a working DNS.

DontResolve                 yes
#不反向解釋客戶(hù)端的ip


# Maximum idle time in minutes (default = 15 minutes)

MaxIdleTime                 15
#最大閑置時(shí)間(分鐘)


# LDAP configuration file (see README.LDAP)

# LDAPConfigFile                /etc/pureftpd-ldap.conf
#使用LDAP認(rèn)證


# MySQL configuration file (see README.MySQL)

# MySQLConfigFile               /etc/pureftpd-mysql.conf
#使用MySQL認(rèn)證  注意:配置文件的正確路徑

# Postgres configuration file (see README.PGSQL)

# PGSQLConfigFile               /etc/pureftpd-pgsql.conf
#使用PGSQL認(rèn)證

# PureDB user database (see README.Virtual-Users)

# PureDB                        /etc/pureftpd.pdb
#使用者資料的DB存放地點(diǎn) [由于我是用PureFTPD的內(nèi)建DB.固有此選項(xiàng)

# Path to pure-authd socket (see README.Authentication-Modules)


# ExtAuth                       /var/run/ftpd.sock
#pure-authd socket 路徑 (詳細(xì)請(qǐng)看 README.Authentication-Modules)


# If you want to enable PAM authentication, uncomment the following line

# PAMAuthentication             yes
#開(kāi)啟PAM認(rèn)證


# If you want simple Unix (/etc/passwd) authentication, uncomment this

# UnixAuthentication            yes
#如果你想要有簡(jiǎn)單的Unix(/etc/passwd)的認(rèn)證


# Please note that LDAPConfigFile, MySQLConfigFile, PAMAuthentication and
# UnixAuthentication can be used only once, but they can be combined
# together. For instance, if you use MySQLConfigFile, then UnixAuthentication,
# the SQL server will be asked. If the SQL authentication fails because the
# user wasn't found, another try # will be done with /etc/passwd and
# /etc/shadow. If the SQL authentication fails because the password was wrong,
# the authentication chain stops here. Authentication methods are chained in
# the order they are given.



# 'ls' recursion limits. The first argument is the maximum number of
# files to be displayed. The second one is the max subdirectories depth

LimitRecursion              2000 8
#ls最多列出2000個(gè)文件.最深8層


# Are anonymous users allowed to create new directories ?

AnonymousCanCreateDirs      no
#匿名用戶(hù)可以創(chuàng)建目錄


# If the system is more loaded than the following value,
# anonymous users aren't allowed to download.


MaxLoad                     4
#當(dāng)system load超過(guò)4時(shí).使用者將不能再下載


# Port range for passive connections replies. - for firewalling.

# PassivePortRange          30000 50000
#被動(dòng)連接應(yīng)答范圍


# Force an IP address in PASV/EPSV/SPSV replies. - for NAT.
# Symbolic host names are also accepted for gateways with dynamic IP
# addresses.

# ForcePassiveIP                192.168.0.1



# Upload/download ratio for anonymous users.

# AnonymousRatio                1 10
# Anonymous連接上傳/下載比率


# Upload/download ratio for all users.
# This directive superscedes the previous one.

# UserRatio                 1 10
# 用戶(hù)上傳/下載比率(注:如果使用ldap,mysql,pgsql,pam不要啟用該功能,否則你在ldap
# 等中設(shè)置的Ratio無(wú)校)


# Disallow downloading of files owned by "ftp", ie.
# files that were uploaded but not validated by a local admin.

AntiWarez                   yes
#上傳的文件不能被下載(owner is ftp).等到local admin確認(rèn)


# IP address/port to listen to (default=all IP and port 21).

# Bind                      127.0.0.1,21
#要綁定和ip/port,在你的系統(tǒng)中有兩個(gè)FTP Server這樣你其中一個(gè)FTP就要使用其它端口。
#格式-> 127.0.0.1,21 如果只寫(xiě)port表All ip,port


# Maximum bandwidth for anonymous users in KB/s

# AnonymousBandwidth            8
#Anonymous 帶寬,單位KB/s


# Maximum bandwidth for *all* users (including anonymous) in KB/s
# Use AnonymousBandwidth *or* UserBandwidth, both makes no sense.

# UserBandwidth             8
#用戶(hù)帶寬,單位KB/s


# File creation mask. <umask for files>:<umask for dirs> .
# 177:077 if you feel paranoid.

Umask                       133:022
#上傳文件的Umask.(<umask for files>:<umask for dirs> )


# Minimum UID for an authenticated user to log in.

MinUID                      100
# UID至少多少才能登錄


# Allow FXP transfers for authenticated users.

AllowUserFXP                no
#支不支持FXP


# Allow anonymous FXP for anonymous and non-anonymous users.

AllowAnonymousFXP           no
#Anonymous支不支持FXP


# Users can't delete/write files beginning with a dot ('.')
# even if they own them. If TrustedGID is enabled, this group
# will have access to dot-files, though.

ProhibitDotFilesWrite       no
#(”.”)開(kāi)頭的文件能不能被讀/寫(xiě),UNIX Like下以點(diǎn)開(kāi)頭的文件%

論壇徽章:
0
18 [報(bào)告]
發(fā)表于 2006-06-20 11:45 |只看該作者
# the SQL server will be asked. If the SQL authentication fails because the
# user wasn't found, another try # will be done with /etc/passwd and
# /etc/shadow. If the SQL authentication fails because the password was wrong,
# the authentication chain stops here. Authentication methods are chained in
# the order they are given.



# 'ls' recursion limits. The first argument is the maximum number of
# files to be displayed. The second one is the max subdirectories depth

LimitRecursion              2000 8
#ls最多列出2000個(gè)文件.最深8層


# Are anonymous users allowed to create new directories ?

AnonymousCanCreateDirs      no
#匿名用戶(hù)可以創(chuàng)建目錄


# If the system is more loaded than the following value,
# anonymous users aren't allowed to download.


MaxLoad                     4
#當(dāng)system load超過(guò)4時(shí).使用者將不能再下載


# Port range for passive connections replies. - for firewalling.

# PassivePortRange          30000 50000
#被動(dòng)連接應(yīng)答范圍


# Force an IP address in PASV/EPSV/SPSV replies. - for NAT.
# Symbolic host names are also accepted for gateways with dynamic IP
# addresses.

# ForcePassiveIP                192.168.0.1



# Upload/download ratio for anonymous users.

# AnonymousRatio                1 10
# Anonymous連接上傳/下載比率


# Upload/download ratio for all users.
# This directive superscedes the previous one.

# UserRatio                 1 10
# 用戶(hù)上傳/下載比率(注:如果使用ldap,mysql,pgsql,pam不要啟用該功能,否則你在ldap
# 等中設(shè)置的Ratio無(wú)校)


# Disallow downloading of files owned by "ftp", ie.
# files that were uploaded but not validated by a local admin.

AntiWarez                   yes
#上傳的文件不能被下載(owner is ftp).等到local admin確認(rèn)


# IP address/port to listen to (default=all IP and port 21).

# Bind                      127.0.0.1,21
#要綁定和ip/port,在你的系統(tǒng)中有兩個(gè)FTP Server這樣你其中一個(gè)FTP就要使用其它端口。
#格式-> 127.0.0.1,21 如果只寫(xiě)port表All ip,port


# Maximum bandwidth for anonymous users in KB/s

# AnonymousBandwidth            8
#Anonymous 帶寬,單位KB/s


# Maximum bandwidth for *all* users (including anonymous) in KB/s
# Use AnonymousBandwidth *or* UserBandwidth, both makes no sense.

# UserBandwidth             8
#用戶(hù)帶寬,單位KB/s


# File creation mask. <umask for files>:<umask for dirs> .
# 177:077 if you feel paranoid.

Umask                       133:022
#上傳文件的Umask.(<umask for files>:<umask for dirs> )


# Minimum UID for an authenticated user to log in.

MinUID                      100
# UID至少多少才能登錄


# Allow FXP transfers for authenticated users.

AllowUserFXP                no
#支不支持FXP


# Allow anonymous FXP for anonymous and non-anonymous users.

AllowAnonymousFXP           no
#Anonymous支不支持FXP


# Users can't delete/write files beginning with a dot ('.')
# even if they own them. If TrustedGID is enabled, this group
# will have access to dot-files, though.

ProhibitDotFilesWrite       no
#(”.”)開(kāi)頭的文件能不能被讀/寫(xiě),UNIX Like下以點(diǎn)開(kāi)頭的文件是隱藏文件ls –a才能列出
#Pureftpd Quota模式下做產(chǎn)生” .ftpquota”文件。


# Prohibit *reading* of files beginning with a dot (.history, .ssh...)

ProhibitDotFilesRead        no
#(”.”)開(kāi)頭的文件能不能被讀/寫(xiě),UNIX Like下以點(diǎn)開(kāi)頭的文件是隱藏文件ls –a才能列出
#Pureftpd Quota模式下做產(chǎn)生” .ftpquota”文件。


# Never overwrite files. When a file whoose name already exist is uploaded,
# it get automatically renamed to file.1, file.2, file.3, ...

AutoRename                  no
#上傳文件若有相同文件名自動(dòng)改名(file.1,file.2...)


# Disallow anonymous users to upload new files (no = upload is allowed)

AnonymousCantUpload         no
#匿名用戶(hù)上傳文件


# Only connections to this specific IP address are allowed to be
# non-anonymous. You can use this directive to open several public IPs for
# anonymous FTP, and keep a private firewalled IP for remote administration.
# You can also only allow a non-routable local IP (like 10.x.x.x) to
# authenticate, and keep a public anon-only FTP server on another IP.

#TrustedIP                  10.1.1.1
#鎖IP


# If you want to add the PID to every logged line, uncomment the following
# line.

#LogPID                     yes
#Log文件添加PID


# Create an additional log file with transfers logged in a Apache-like format :
# fw.c9x.org - jedi [13/Dec/1975:19:36:39] "GET /ftp/linux.tar.bz2" 200 21809338
# This log file can then be processed by www traffic analyzers.

# AltLog                     clf:/var/log/pureftpd.log
#log存放地點(diǎn),注日志有幾種常用的格式
#clf 類(lèi)似apache格式,stats UNIX log格式,w3c 標(biāo)準(zhǔn)W3C格式,可能是HTML格式


# Create an additional log file with transfers logged in a format optimized
# for statistic reports.

# AltLog                     stats:/var/log/pureftpd.log
#log存放地點(diǎn),注日志有幾種常用的格式
#clf 類(lèi)似apache格式,stats UNIX log格式,w3c 標(biāo)準(zhǔn)W3C格式,可能是HTML格式


# Create an additional log file with transfers logged in the standard W3C
# format (compatible with most commercial log analyzers)

# AltLog                     w3c:/var/log/pureftpd.log

論壇徽章:
0
19 [報(bào)告]
發(fā)表于 2006-06-20 11:46 |只看該作者
#log存放地點(diǎn),注日志有幾種常用的格式
#clf 類(lèi)似apache格式,stats UNIX log格式,w3c 標(biāo)準(zhǔn)W3C格式,可能是HTML格式


# Disallow the CHMOD command. Users can't change perms of their files.

#NoChmod                     yes
#不給chmod指令的權(quán)限



# Allow users to resume and upload files, but *NOT* to delete them.

#KeepAllFiles                yes
#使用者可續(xù)傳.但不可刪除文件


# Automatically create home directories if they are missing

#CreateHomeDir               yes
#如果user的home不存在自動(dòng)建立(我把這個(gè)設(shè)為YES)


# Enable virtual quotas. The first number is the max number of files.
# The second number is the max size of megabytes.
# So 1000:10 limits every user to 1000 files and 10 Mb.

#Quota                       1000:10
#Quota <文件數(shù)>:<容量Megabytes >,F(xiàn)TP限制10M空間,可以上傳1000個(gè)文件(注:如
#果使用ldap,mysql,pgsql,pam不要啟用該功能,否則你在ldap等中設(shè)置的Quota無(wú)校)


# If your pure-ftpd has been compiled with standalone support, you can change
# the location of the pid file. The default is /var/run/pure-ftpd.pid

#PIDFile                     /var/run/pure-ftpd.pid
#記錄pure-ftpd的PID文件


# If your pure-ftpd has been compiled with pure-uploadscript support,
# this will make pure-ftpd write info about new uploads to
# /var/run/pure-ftpd.upload.pipe so pure-uploadscript can read it and
# spawn a script to handle the upload.

#CallUploadScript yes
#呼叫UploadScript


# This option is useful with servers where anonymous upload is
# allowed. As /var/ftp is in /var, it save some space and protect
# the log files. When the partition is more that X percent full,
# new uploads are disallowed.

MaxDiskUsage               99
#當(dāng)硬盤(pán)使用率到多少時(shí)將停止上傳


# Set to 'yes' if you don't want your users to rename files.

#NoRename                  yes
#用戶(hù)不能重命名文件名


# Be 'customer proof' : workaround against common customer mistakes like
# 'chmod 0 public_html', that are valid, but that could cause ignorant
# customers to lock their files, and then keep your technical support busy
# with silly issues. If you're sure all your users have some basic Unix
# knowledge, this feature is useless. If you're a hosting service, enable it.

CustomerProof              yes



# Per-user concurrency limits. It will only work if the FTP server has
# been compiled with --with-peruserlimits (and this is the case on
# most binary distributions) .
# The format is : <max sessions per user>:<max anonymous sessions>
# For instance, 3:20 means that the same authenticated user can have 3 active
# sessions max. And there are 20 anonymous sessions max.

# PerUserLimits            3:20
#<每個(gè)賬號(hào)最多可登入幾次:Anonymous最多可同時(shí)登入幾次>


# When a file is uploaded and there is already a previous version of the file
# with the same name, the old file will neither get removed nor truncated.
# Upload will take place in a temporary file and once the upload is complete,
# the switch to the new version will be atomic. For instance, when a large PHP
# script is being uploaded, the web server will still serve the old version and
# immediatly switch to the new one as soon as the full file will have been
# transfered. This option is incompatible with virtual quotas.

# NoTruncate               yes



# This option can accept three values :
# 0 : disable SSL/TLS encryption layer (default).
# 1 : accept both traditional and encrypted sessions.
# 2 : refuse connections that don't use SSL/TLS security mechanisms,
#     including anonymous sessions.
# Do _not_ uncomment this blindly. Be sure that :
# 1) Your server has been compiled with SSL/TLS support (--with-tls),
# 2) A valid certificate is in place,
# 3) Only compatible clients will log in.

# TLS                      1



# Listen only to IPv4 addresses in standalone mode (ie. disable IPv6)
# By default, both IPv4 and IPv6 are enabled.

# IPV4Only                 yes



# Listen only to IPv6 addresses in standalone mode (ie. disable IPv4)
# By default, both IPv4 and IPv6 are enabled.

# IPV6Only                 yes

# UTF-8 support for file names (RFC 2640)
# Define charset of the server filesystem and optionnally the default charset
# for remote clients if they don't use UTF-8.
# Works only if pure-ftpd has been compiled with --with-rfc2640

# FileSystemCharset        big5
# ClientCharset                big5

##############################################################################################################################################################

論壇徽章:
0
20 [報(bào)告]
發(fā)表于 2006-06-20 11:47 |只看該作者
###############################################################################


#################################啟動(dòng)pure-ftpd##################################
/usr/local/sbin/pure-config.pl /usr/local/etc/pure-ftpd.conf
也可以通過(guò)
/usr/local/etc/rc.d/pure-ftpd.sh start

提示一下信息證明pure-ftpd已經(jīng)工作
Running: /usr/local/sbin/pure-ftpd -A -c50 -B -C8 -D -E -fftp -H -I15  
-lmysql:/usr/local/etc/pureftpd-mysql.conf -L2000:8 -m4 -Q1:10 -s -U133:022  
-u100 -Ow3c:/var/log/pureftpd.log -j -k99 -Z




#################################測(cè)試pureftp####################################
ftp 192.168.0.205
Connected to 192.168.0.205.
220---------- 歡迎來(lái)到 Pure-FTPd [TLS] ----------
220-您是第 1 個(gè)使用者,最多可達(dá) 50 個(gè)連接
220-現(xiàn)在本地時(shí)間是 13:17。服務(wù)器端口: 21。
220-這是私人系統(tǒng) - 不開(kāi)放匿名登錄
220-這部主機(jī)也歡迎IPv6的連接
220 在 15 分鐘內(nèi)沒(méi)有活動(dòng),您被會(huì)斷線(xiàn)。
Name (192.168.0.205:chb):
輸入用戶(hù)名、密碼
##############################設(shè)置ftp管理的虛擬主機(jī)############################
ee /usr/local/etc/apache/httpd.conf

添加

<VirtualHost 192.168.0.205>
DocumentRoot "/home/chb/ftp"
ServerName www.chb.com
<Directory "/home/chb/ftp">
allow from all
Options +Indexes
</Directory>
</VirtualHost>

#######################增加二級(jí)登陸密碼以增強(qiáng)安全性############################


ee /web/ftp/.htaccess
添加以下內(nèi)容

AuthType Basic
AuthUserFile /usr/local/etc/pureftpd.passwd
AuthName  FTP服務(wù)器后臺(tái)管理登陸界面
require valid-user
satisfy any

cd /web/chinaPHP_Manager/ftp
chown www .htaccess
chmod 644 .htaccess

touch pureftpd.passwd

htpasswd -bc /usr/local/etc/pureftpd.passwd name password
chmod 644 /usr/local/etc/pureftpd.passwd




###################################增加ftp啟動(dòng)項(xiàng)###############################
ee /etc/rc.conf
添加
pureftpd_enable="YES"
您需要登錄后才可以回帖 登錄 | 注冊(cè)

本版積分規(guī)則 發(fā)表回復(fù)

  

北京盛拓優(yōu)訊信息技術(shù)有限公司. 版權(quán)所有 京ICP備16024965號(hào)-6 北京市公安局海淀分局網(wǎng)監(jiān)中心備案編號(hào):11010802020122 niuxiaotong@pcpop.com 17352615567
未成年舉報(bào)專(zhuān)區(qū)
中國(guó)互聯(lián)網(wǎng)協(xié)會(huì)會(huì)員  聯(lián)系我們:huangweiwei@itpub.net
感謝所有關(guān)心和支持過(guò)ChinaUnix的朋友們 轉(zhuǎn)載本站內(nèi)容請(qǐng)注明原作者名及出處

清除 Cookies - ChinaUnix - Archiver - WAP - TOP