Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1432143
  • 博文数量: 823
  • 博客积分: 10000
  • 博客等级: 上将
  • 技术积分: 5002
  • 用 户 组: 普通用户
  • 注册时间: 2008-08-28 17:39
文章分类

全部博文(823)

文章存档

2011年(1)

2008年(822)

我的朋友

分类: LINUX

2008-08-28 17:45:18

 

 前提是安装好:apachemysqlphp

InstallationofthePure-FTPd:

  跟随下面步骤安装Pure-FTPd

  使用Ports方式安装Pure-FTPd的Ports安装目录/usr/ports/www/apache22目录,执行makeinstallclean进行安装。

  Shell:

  whereispure-ftpd

  pure-ftpd:/usr/ports/ftp/pure-ftpd

  cd/usr/ports/ftp/pure-ftpd/

  makewith_language=simplified-chineseinstall

  

  安装时,会要求进行php5选项设定,这里选择如下

  Optionsforpure-ftpd1.0.21_1

  [X]MYSQLSupportforusersinMySQLdatabase

  [X]PRIVSEPEnableprivilegeseparation

  [X]PERUSERLIMITSPer-userconcurrencylimits

  [X]THROTTLINGBandwidththrottling

  [X]BANNERShowpure-ftpdwelcomeuponsessionstart

  [X]UTF8Supportforcharsetconversion(expreimental)

  安装完成后,输入rehash命令刷新

  Shell:

  ===>Compressingmanualpagesforpure-ftpd-1.0.21_1

  ===>Registeringinstallationforpure-ftpd-1.0.21_1

  rehash

  系统提示,需要添加pureftpd_enable=”YES”到/etc/rc.conf文件。

  (具体信息可以查看catcat/usr/local/etc/rc.d/pure-ftpd会有详细说明)

  Shell:

  vi/etc/rc.conf

  添加以下内容

  Editor:

  #Pure-FTPd

  pureftpd_enable="YES"

  保存退出。

  

  Step5CreatingaMySQLDatabase.

  

  CreatingaMySQLDatabase:

  跟随下面步骤创建一个MySQL数据库

  登陆网站下载script.mysql脚本文件。

  Shell:

  cd/root/

  fetch""

  使用下载的MySQL脚本文件,建立一个数据库

  Shell:

  mysql-uroot-p

  Enterpassword:此处输入你的MySQL密码

  至此数据库创建完成。

  数据内容:创建一个数据库Database:tpusers,Login=ftpPassword=tmppasswd,管理权限用户名是:Administrator密码:tmppasswd(采用MD5加密)

  

  Step6ConfigurationofPureFTPd.

  

  ConfigurationofPureFTPd:

  跟随下面步骤进行Pure-FTPd配置

  1、配置pure-ftpd.conf

  配置pure-ftpd.conf文件

  复制/usr/local/etc/pure-ftpd.conf.sample为pure-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(大约366行)

  Shell:

  vi/usr/local/etc/pure-ftpd.conf

  

  Editor:

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

  CreateHomeDiryes

  

  修改前:

  #MySQLconfigurationfile(seeREADME.MySQL)

  #MySQLConfigFile/etc/pureftpd-mysql.conf

  

  #Automaticallycreatehomedirectoriesiftheyaremissing

  #CreateHomeDiryes

  修改后:

  #MySQLconfigurationfile(seeREADME.MySQL)

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

  

  #Automaticallycreatehomedirectoriesiftheyaremissing

  CreateHomeDiryes

  保存退出后。

  

  2、配置pureftpd-mysql.conf

  从网站下载,pureftpd-mysql.conf文件

  Shell:

  cd/usr/local/etc/

  fetch""

  启动PurtFTPd

  Shell:

  /usr/local/etc/rc.d/pure-ftpdstart

  

  

  Step7UsermanagerforPureFTPd.

  

  InstallationUsermanagerofthePureFTPd:

  跟随下面步骤安装PureFTPd管理程序.

  使用Ports方式安装UsermanagerofthePureFTPd,进入UsermanagerofthePureFTPd所在的Ports安装目录cd/usr/ports/www/usermanager/执行makeinstallclean进行安装。

  Shell:

  whereisusermanager

  usermanager:/usr/ports/www/usermanager

  cd/usr/ports/www/usermanager/

  makeinstallclean

  安装完成后,输入rehash命令刷新

  Shell:

  *****************************************************************

  Pleasecheck/usr/local/www/data/UserManager/readme.txt

  Tousethismanager,youwillneedtocompileyour

  Pure-FTPdwith-DWITH_MYSQL

  *****************************************************************

  ''UsermanagerforPureFTPd''ismadebyM.Mastenbroek2002-2005

  Formoreinfolookat

  Version2.1

  Installation:

  Runtheinstallationwizardinstall.phpinyourwebbrowser.

  Theinstallationwizardwillleadyoustepbystep

  throughtheconfigurationoftheUsermanagerforPureFTPd.

  Running:

  TheUsermanagerforPureFTPdstartsfromtheindex.phpfile.

  *****************************************************************

  rehash

  系统提示,需要使用浏览器打开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

  添加以下内容

  Editor:

  Alias/ftp"/usr/local/www/data/UserManager/"

  

  AllowOverrideNone

  OptionsNone

  Orderallow,deny

  Allowfromall

  

  保存退出。

  使用浏览器打开

  根据向导进行安装设定,语言选择中文,并且更改管理员密码。最后记得删除install.php文件

  完成后打开登陆录后台设置页面,进行新增用户操作。

  Configuration''UsermanagerforPureFTPd''Step[1-7]

  

  Thisconfigurationscripthascarriedoutafewcheckstoseeifeverythingisreadytostarttheconfiguration.

  

  Checkingifconfig.phpexistsOK! 

  Checkingifconfig.phpiswritableOK! 

  CheckingifPHPExtensionMYSQLisenabledOK! 

  CheckingifPHPExtensionPCREisenabledOK! 

  CheckingifPHPExtensionPOSIXisenabledOK! 

  CheckingifPHPExtensionSESSIONisenabledOK! 

  

  Pleasechooseyourconfigurationtype:.选择Newinstallation,createanewdatabase.

  Step[3-7]输入正确的root用户和root的密码。

  SettingsMySQLdatabase.直接按默认设置(要是你改过密码,就输入你的密码)

  Step[4-7]语言选择中文,选择Quotasupport,Ratiosupport(上传下载比可以选择或不选择)按Save按钮保存配置文件,然后点Setp5进行下一步。

  Step[5-7]这里你可以更改管理员Administator的密码,也可以创建一个自己的帐号代替Administrator

  Step[6-7]系统有一些提示,说需要编辑那2个配置文件,因为前面已经编辑过了。所以直接下一步。

  Step[7-7]恭喜你安装完成了。建议把install.php文件更改一下名称。

  管理介面

  PureFTPd帳號管理按此以新增帳號

  帳號UIDGID家目錄上傳頻寬(KB/s)下載頻寬(KB/s)設定

  ftpuser16553431/www/ftp/ftpuser17575

  帳號启用

  密碼

  再次確認密碼

  UIDnobody

  GIDguest

  家目錄/www/ftp

  上傳頻寬(KB/s)

  80配額檔案數量

  下載頻寬(KB/s)

  5配額空間大小(MB)

  上下傳比[上:下]

  0:0

  IP位址*

  備註

  

  Step8写在最后.

  

  UsermanagerforPureFTPd后台管理程序,创建用户时需要手动指定FTP用户主目录。所以建立FTP用户时,需要先建立用户的FTP目录,并设置目录属性为nobody:guest

  例如:建立一个用户名为sunny的用户,主目录为/home/ftp/sunny

  Shell:

  mkdir-p/home/ftp/demo

  chownnobody:guestdemo

  

  查看用户在线状态

  通过''pure-ftpwho命令,查看在线用户状态。在/usr/local/www/apache22/cgi-bin目录下建立一个ftpstatus.c文件

  Shell:

  vi/usr/local/www/apache22/cgi-bin/ftpstatus.c

  内容如下:

  Editor:

  #include

  

  intmain(intargc,char*argv[])


FreeBSD架设之Pure-FTPd服务器FreeBSD架设之Pure-FTPd服务器FreeBSD架设之Pure-FTPd服务器FreeBSD架设之Pure-FTPd服务器FreeBSD架设之Pure-FTPd服务器FreeBSD架设之Pure-FTPd服务器FreeBSD架设之Pure-FTPd服务器FreeBSD架设之Pure-FTPd服务器FreeBSD架设之Pure-FTPd服务器FreeBSD架设之Pure-FTPd服务器
阅读(195) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~