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

  免費注冊 查看新帖 |

Chinaunix

  平臺 論壇 博客 文庫
12345下一頁
最近訪問板塊 發(fā)新帖
查看: 33110 | 回復(fù): 43
打印 上一主題 下一主題

[FreeBSD] 《FreeBSD新手快速入門》第5篇__FreeBSD服務(wù)器之FTP服務(wù) [復(fù)制鏈接]

論壇徽章:
0
跳轉(zhuǎn)到指定樓層
1 [收藏(0)] [報告]
發(fā)表于 2007-11-29 13:28 |只看該作者 |倒序瀏覽
FreeBSD6.2架設(shè)之Pure-FTPd服務(wù)器

Pure-FTPd Server On FreeBSD6.2 HowTo

Mongolia



Index:
  • 簡介
  • Step 1 installation Apache22.
  • Step 2 installation MySQL Server.
  • Step 3 installation PHP.
  • Step 4 installation PureFTPd.
  • Step 5 creating a MySQL database.
  • Step 6 configuration of PureFTPd.
  • Setp 7 User manager for PureFTPd.
  • F.A.Q.
  • Links to other sources
為方便離線查看,現(xiàn)附上PDF文檔

[ 本帖最后由 freemongolia 于 2007-11-29 13:50 編輯 ]

Pure-FTPd Server On FreeBSD6.2 HowTo.pdf

193.23 KB, 下載次數(shù): 934

論壇徽章:
0
2 [報告]
發(fā)表于 2007-11-29 13:28 |只看該作者

簡介


Pure-FTPd is a free (BSD), secure, production-quality and standard-conformant FTP server. It doesn't provide useless bells and whistles, but focuses on efficiency and ease of use. It provides simple answers to common needs, plus unique useful features for personal users as well as hosting providers.

Pure-FTPd是一個自由的、安全的、高品質(zhì)的FTP Server。它,高效并且易于使用。Pure-FTPd提供多語言支持,包括簡體文、繁體中文,同時也支持UTF-8。本文使用FreeBSD6.2做為系統(tǒng),使用Pure-FTPd程序提供FTP服務(wù),并且結(jié)合MySQL Server做認(rèn)證。支持虛擬用戶、用戶帶寬控制、用戶磁盤限額。使用User manager for PureFTPd,提供后臺管理界面。
FreeBSD6.2+Apache22+PHP5+php5-extensions+ Pure-FTPd+ User manager for PureFTPd
軟件版本信息:
·FreeBSD 6.2-RELEASE
·Apache-2.2.3
·Mysql-server-5.0.27
·Php5-5.1.6_3
·Php5-extensions-1.0
·Pure-FTPd-1.0.21_1
·User manager for Pure-FTPd

論壇徽章:
0
3 [報告]
發(fā)表于 2007-11-29 13:29 |只看該作者


Step 1 Installation Apache22.


Installation of the Apache server:
跟隨下面步驟安裝 Apache2.
使用Ports方式安裝Apache22,(更易于以后的維護,比如升級、卸載),進入Apache22所在的Ports安裝目錄/usr/ports/www/apache22目錄,執(zhí)行make install clean進行安裝。
Shell:
whereis apache22
apache22: /usr/ports/www/apache22
cd /usr/ports/www/apache22
make install clean
系統(tǒng)要求選擇模塊,取消IPV6支持,其它保持默認(rèn)即可

Options for apache 2.2.6_2
[ ]
IPV6
Enable IPv6 support
安裝完成后,輸入rehash命令刷新
Shell:
To run apache www server from startup, add apache22_enable="YES"
in your /etc/rc.conf. Extra options can be found in startup script.
===>
Cleaning for autoconf-wrapper-20071109

===>
Cleaning for p5-gettext-1.05_1

===>
Cleaning for apache-2.2.6_2

rehash
系統(tǒng)提示,需要添加apache22_enable=”YES”/etc/rc.conf文件。
(具體信息可以查看cat /usr/local/etc/rc.d/apache22會有詳細(xì)說明)
Shell:
vi /etc/rc.conf
添加以下內(nèi)容
Editor:
#Apache22
apache22_enable="YES"
保存退出后,啟動Apache進行測試
輸入命令/usr/local/etc/rc.d/apache22 start啟動Apache
Shell:
/usr/local/etc/rc.d/apache22 start
Syntax OK
Starting apache22.

使用瀏覽器訪問FreeBSD服務(wù)器IP地址測試Apache是否工作正常
瀏覽器打開http://youipaddress
It works!
好了,Apache22安裝成功了。



[ 本帖最后由 freemongolia 于 2007-11-29 13:31 編輯 ]

論壇徽章:
0
4 [報告]
發(fā)表于 2007-11-29 13:32 |只看該作者

Step 2 Installation MySQL Server.


Installation of the MySQL server:
跟隨下面步驟安裝 MySQL.
使用Ports方式安裝MySQL,進入MySQL所在的Ports安裝目錄/usr/ports/www/apache22目錄,執(zhí)行make install clean進行安裝。
Shell:
whereis mysql50-server
mysql50-server: /usr/ports/databases/mysql50-server
cd /usr/ports/databases/mysql50-server/
make install clean
安裝完成后,輸入rehash命令刷新
Shell:
http://www.mysql.com/
===>
Cleaning for mysql-client-5.0.45_1

===>
Cleaning for mysql-server-5.0.45_1

rehash
系統(tǒng)提示,需要添加mysql_enable=”YES”/etc/rc.conf文件。
(具體信息可以查看cat /usr/local/etc/rc.d/mysql-server會有詳細(xì)說明)
Shell:
vi /etc/rc.conf
添加以下內(nèi)容
Editor:
#MySQL5.0
mysql_enable="YES"
保存退出后,啟動Mysql5.0進行測試
輸入命令/usr/local/etc/rc.d/mysql-server start啟動Mysql

檢測Mysql是否正常運行
可以通過監(jiān)聽端口和系統(tǒng)進程進行判斷
Shell:
netstat -an | grep "3306"
tcp4 0 0 *.3306 *.* LISTEN
ps -aux|grep mysql|grep -v grep
mysql 97589 0.0 0.3 1728 1376 p0 I 3:03PM 0:00.09 /bin/sh /usr/local/bin/mysqld_safe --defaults-extra-file=/va
mysql 97609 0.0 4.9 53844 25576 p0 S 3:03PM0:01.07 /usr/local/libexec/mysqld --defaults-extra-file=/var/db/mysq
系統(tǒng)顯示Mysql已在所有地址(0)上監(jiān)聽3306端口,并且也可以查到Mysql的進程。

更改Mysql密碼
Mysql安裝完成后,并沒有設(shè)定密碼。為增加數(shù)據(jù)庫安裝性,使用mysqladmin命令設(shè)定Mysql密碼
Shell:
mysqladmin -u root password '123456'  ('123456')是你要設(shè)定的密碼
驗證密碼是否設(shè)定常
Shell:
mysql -u root -p
Enter password:
Welcome to the MySQL monitor.
Commands end with ; or \g.

Your MySQL connection id is 3
Server version: 5.0.45 FreeBSD port: mysql-server-5.0.45_1

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> show databases;
+--------------------+
| Database
|

+--------------------+
| information_schema |
| mysql
|

| test
|

+--------------------+
3 rows in set (0.01 sec)

mysql> quit
Bye
密碼設(shè)定正確。至此Mysql安裝完成。


[ 本帖最后由 freemongolia 于 2007-11-29 13:34 編輯 ]

論壇徽章:
0
5 [報告]
發(fā)表于 2007-11-29 13:34 |只看該作者

Step 3 Installation PHP5.


Installation of the PHP5:
跟隨下面步驟安裝 PHP5.
使用Ports方式安裝PHP5,進入PHP5所在的Ports安裝目錄/usr/ports/www/php2執(zhí)行ake install clean進行安裝。
Shell:
whereis php5
php5: /usr/ports/lang/php5
cd /usr/ports/lang/php5/
make install clean

安裝時,會要求進行php5選項設(shè)定,這里選擇如下
Options for php5 5.2.5

[X]

APACHE

Build Apache module

[X]

MULTIBYTE

Enable zend multibyte support


安裝完成后,輸入rehash命令刷新
Shell:
***************************************************************
Make sure index.php is part of your DirectoryIndex.
You should add the following to your Apache configuration file:

AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps
***************************************************************
===>
Cleaning for pkg-config-0.22_1

===>
Cleaning for libxml2-2.6.30

===>
Cleaning for php5-5.2.5

rehash
系統(tǒng)提示,需要添加以上被標(biāo)記顏色到httpd.conf文件。
先備份httpd.conf文件
Shell:
cd /usr/local/etc/apache22/
cp httpd.conf httpd.conf.bak
編輯httpd.conf文件
Shell:
vi /usr/local/etc/apache22/httpd.conf
編輯/usr/local/etc/apache22/httpd.conf文件,以使Apache Server支持php

編輯/usr/local/etc/apache22/httpd.conf,在AddType application/x-gzip .gz .tgz(大約354)下面添加添加以下內(nèi)容
Editor:
index.php
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps

修改前:

# probably should define those extensions to indicate media types:

#

AddType application/x-compress .Z

AddType application/x-gzip .gz .tgz

修改后:

# probably should define those extensions to indicate media types:

#

AddType application/x-compress .Z

AddType application/x-gzip .gz .tgz

AddType application/x-httpd-php .php

AddType application/x-httpd-php-source .phps

先不要退出,添加'index.php' 'DirectoryIndex' 主目錄索引(大約212)

Editor:

DirectoryIndex index.php index.html index.htm

修改前:

#

<IfModule dir_module>

DirectoryIndex index.html

</IfModule>


#

修改后:

#

<IfModule dir_module>

DirectoryIndex index.php index.html index.htm

</IfModule>

#
保存退出后。

[ 本帖最后由 freemongolia 于 2007-11-29 13:36 編輯 ]

論壇徽章:
0
6 [報告]
發(fā)表于 2007-11-29 13:37 |只看該作者

Installation of the PHP5-Extensions:
跟隨下面步驟安裝 PHP5-Extensions.
使用Ports方式安裝PHP5-extensions,進入PHP5-extensions所在的Ports安裝目錄/usr/ports/lang/php5-extensions目錄,執(zhí)行make install clean進行安裝。
Shell:
whereis php5-extensions
php5-extensions: /usr/ports/lang/php5-extensions
cd /usr/ports/lang/php5-extensions/
make install clean
安裝時,會要求進行php5-extensions選項設(shè)定,這里選擇如下
Options for php5-extensions 1.0
[X]
MYSQL
MySQL database support
[X]
PCRE
Perl Compatible Regular Expression support
[X]
POSIX
POSIX-like functions
[X]
SESSION
session support
安裝完成后,輸入rehash命令刷新

Shell:
===>
Cleaning for php5-posix-5.2.5

===>
Cleaning for php5-session-5.2.5

===>
Cleaning for php5-extensions-1.1

rehash
復(fù)制/usr/local/etc/php.ini-dist/usr/local/etc/php.ini
Shell:
cp /usr/local/etc/php.ini-dist /usr/local/etc/php.ini
重新啟動Web Server
Execute the following command to start / restart the Apache webserver.
Shell:
/usr/local/etc/rc.d/apache22 restart
/usr/local/www/apache22/data/目錄下建立一個test.php文件進行php測試
建立的test.php文件內(nèi)容如下
Shell:
vi /usr/local/www/apache22/data/test.php

Editor:
<?
phpinfo();
?>
用瀏覽器打開http://yourip/test.php如顯示信息,證明php工作正常。

論壇徽章:
0
7 [報告]
發(fā)表于 2007-11-29 13:38 |只看該作者

Step 4 Installation Pure-FTPd.


Installation of the Pure-FTPd:
跟隨下面步驟安裝 Pure-FTPd
使用Ports方式安裝Pure-FTPdPorts安裝目錄/usr/ports/www/apache22目錄,執(zhí)行make install clean進行安裝。
Shell:
whereis pure-ftpd
pure-ftpd: /usr/ports/ftp/pure-ftpd
cd /usr/ports/ftp/pure-ftpd/
make with_language=simplified-chinese install

安裝時,會要求進行php5選項設(shè)定,這里選擇如下
Options for pure-ftpd 1.0.21_1
[X]
MYSQL
Support for users in MySQL database
[X]
PRIVSEP
Enable privilege separation
[X]
PERUSERLIMITS
Per-user concurrency limits
[X]
THROTTLING
Bandwidth throttling
[X]
BANNER
Show pure-ftpd welcome upon session start
[X]
UTF8
Support for charset conversion (expreimental)
安裝完成后,輸入rehash命令刷新
Shell:
===>
Compressing manual pages for pure-ftpd-1.0.21_1

===>
Registering installation for pure-ftpd-1.0.21_1

rehash
系統(tǒng)提示,需要添加pureftpd_enable=”YES”/etc/rc.conf文件。
(具體信息可以查看cat cat /usr/local/etc/rc.d/pure-ftpd會有詳細(xì)說明)
Shell:
vi /etc/rc.conf
添加以下內(nèi)容
Editor:
#Pure-FTPd
pureftpd_enable="YES"
保存退出。

論壇徽章:
0
8 [報告]
發(fā)表于 2007-11-29 13:38 |只看該作者

Step 5 Creating a MySQL Database.


Creating a MySQL Database:
跟隨下面步驟創(chuàng)建一個MySQL數(shù)據(jù)庫
登陸http://machiel.generaal.net/files/pureftpd/v2.x/script.mysql網(wǎng)站下載script.mysql腳本文件。
Shell:
cd /root/
fetch "http://machiel.generaal.net/files/pureftpd/v2.x/script.mysql"

使用下載的MySQL腳本文件,建立一個數(shù)據(jù)庫
Shell:
mysql -u root -p < /root/script.mysql
Enter password:此處輸入你的MySQL密碼

至此數(shù)據(jù)庫創(chuàng)建完成。
數(shù)據(jù)內(nèi)容:創(chuàng)建一個數(shù)據(jù)庫Database:tpusersLogin = ftp Password = tmppasswd ,管理權(quán)限用戶名是:Administrator密碼:tmppasswd(采用MD5加密)

論壇徽章:
0
9 [報告]
發(fā)表于 2007-11-29 13:39 |只看該作者

Step 6 Configuration of PureFTPd.


Configuration of PureFTPd:
跟隨下面步驟進行Pure-FTPd配置
1、配置pure-ftpd.conf
配置pure-ftpd.conf文件
復(fù)制/usr/local/etc/pure-ftpd.conf.samplepure-ftpd.conf
Shell:
cd /usr/local/etc/
cp /usr/local/etc/pure-ftpd.conf.sample /usr/local/etc/pure-ftpd.conf

編輯pure-ftpd.conf 文件MySQLConfigFile位置(大約116)
編輯pure-ftpd.conf 文件CreateHomeDir (大約3366)
Shell:
vi /usr/local/etc/pure-ftpd.conf


Editor:
MySQLConfigFile          /usr/local/etc/pureftpd-mysql.conf
CreateHomeDir           yes


修改前:

# MySQL configuration file (see README.MySQL)

# MySQLConfigFile                   /etc/pureftpd-mysql.conf


# Automatically create home directories if they are missing

#CreateHomeDir                      yes


修改后:

# MySQL configuration file (see README.MySQL)

MySQLConfigFile                      /usr/local/etc/pureftpd-mysql.conf


# Automatically create home directories if they are missing

CreateHomeDir                                  yes

保存退出后。

2、配置pureftpd-mysql.conf
http://machiel.generaal.net/files/pureftpd/v2.x/pureftpd-mysql.conf網(wǎng)站下載,pureftpd-mysql.conf文件
Shell:
cd /usr/local/etc/
fetch http://machiel.generaal.net/files/pureftpd/v2.x/pureftpd-mysql.conf

啟動PurtFTPd
Shell:
/usr/local/etc/rc.d/pure-ftpd start



[ 本帖最后由 freemongolia 于 2007-11-29 13:41 編輯 ]

論壇徽章:
0
10 [報告]
發(fā)表于 2007-11-29 13:41 |只看該作者

Step 7 User manager for PureFTPd.


Installation User manager of the PureFTPd:
跟隨下面步驟安裝 PureFTPd管理程序.
使用Ports方式安裝User manager of the PureFTPd,進入User manager of the PureFTPd所在的Ports安裝目錄cd /usr/ports/www/usermanager/執(zhí)行make install clean進行安裝。
Shell:
whereis usermanager
usermanager: /usr/ports/www/usermanager
cd /usr/ports/www/usermanager/
make install clean
安裝完成后,輸入rehash命令刷新
Shell:
*****************************************************************
Please check /usr/local/www/data/UserManager/readme.txt
To use this manager, you will need to compile your
Pure-FTPd with -DWITH_MYSQL
*****************************************************************
'User manager for PureFTPd' is made by M.Mastenbroek 2002 - 2005
For more info look at http://machiel.generaal.net
Version 2.1
Installation:
Run the installation wizard install.php in your web browser.
The installation wizard will lead you step by step
through the configuration of the User manager for PureFTPd.
Running:
The User manager for PureFTPd starts from the index.php file.
*****************************************************************
rehash
系統(tǒng)提示,需要使用瀏覽器打開install.php進行安裝。
編輯/usr/local/etc/apache22/httpd.conf文件,添加虛擬目錄
Shell:
cp /usr/local/etc/apache22/httpd.conf /usr/local/etc/apache22/httpd.conf.bak
vi /usr/local/etc/apache22/httpd.conf
添加以下內(nèi)容
Editor:
Alias /ftp "/usr/local/www/data/UserManager/"
<Directory "/usr/local/www/data/UserManager">
AllowOverride None
Options None
Order allow,deny
Allow from all
</Directory>
保存退出。
您需要登錄后才可以回帖 登錄 | 注冊

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

  

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

清除 Cookies - ChinaUnix - Archiver - WAP - TOP