Chinaunix首页 | 论坛 | 博客
  • 博客访问: 704951
  • 博文数量: 98
  • 博客积分: 3145
  • 博客等级: 中校
  • 技术积分: 1902
  • 用 户 组: 普通用户
  • 注册时间: 2008-12-15 12:52
文章分类
文章存档

2021年(1)

2020年(1)

2016年(8)

2015年(3)

2014年(1)

2013年(5)

2012年(4)

2011年(9)

2010年(12)

2009年(42)

2008年(12)

我的朋友

分类: LINUX

2008-12-15 17:27:59

下载安装软件

#cd /opt/distfiles

下载mysql

#wget

下载pureftp

#wget ftp://ftp.pureftpd.org/pub/pure-ftpd/releases/pure-ftpd-1.0.21.tar.gz

下载webpureftp

#wget http://blogimg.chinaunix.net/blog/upfile2/081215163458.gz

安装软件

安装配置mysql

#cd /opt/distfiles

#tar zxvf mysql-5.0.67.tar.gz

#cd mysql-5.0.67

编译:

#./configure \

--prefix=/opt/modules/mysql5 \

 --with-mysqld-user=mysql \

--without-debug \

--with-big-tables \

 --with-charset=latin1 \

--with-collation=latin1_swedish_ci \

--with-extra-charsets=all \

--with-pthread \

--enable-static \

--enable-thread-safe-client \

--with-client-ldflags=-all-static \

--with-mysqld-ldflags=-all-static \

--enable-assembler \

--without-ndb-debug

#make &&make install

初始化:

#groupadd mysql

#useradd mysql –g mysql

#chown –R mysql.mysql /opt/modules/mysql5/

# /opt/modules/mysql5/bin/mysql_install_db --user=mysql

# /opt/modules/mysql5/share/mysql/mysql.server start

# /opt/modules/mysql5/bin/mysqladmin -u root password 'new-password'

#cp support-files/my-large.cnf /etc/my.cnf

#/opt/modules/mysql5/share/mysql/mysql.server restart

安装配置pureftp

#tar zxvf pure-ftpd-1.0.21.tar.gz

#cd pure-ftpd-1.0.21

#./configure \

 --prefix=/opt/modules/pureftpd \

 --with-mysql=/opt/modules/mysql5/ \

 --with-cookie \

 --with-throttling \

 --with-ratios \

 --with-altlog \

 --with-ratios \

 --with-quotas \

 --with-ftpwho \

 --with-largefile \

 --with-virtualhosts \

 --with-virtualchroot \

 --with-diraliases \

 --with-debug \

make &&make install

配置:

创建配置文件:

#vi /etc/pureftpd-mysql.conf

内容:

#MYSQLServer     localhost

#MYSQLPort       3306

MYSQLSocket     /tmp/mysql.sock

MYSQLUser       root

MYSQLPassword   rootpw

MYSQLDatabase   pureftpd

MYSQLCrypt      cleartext

MYSQLGetPW      SELECT Password FROM users WHERE User="\L"

MYSQLGetUID     SELECT Uid FROM users WHERE User="\L"

MYSQLGetGID     SELECT Gid FROM users WHERE User="\L"

MYSQLGetDir     SELECT Dir FROM users WHERE User="\L"

MySQLGetQTASZ  SELECT QuotaSize FROM users WHERE User="\L"

MySQLGetQTAFS  SELECT QuotaFiles FROM users WHERE User="\L"

 

#cd configuration-file

#cp pure-ftpd.conf /etc/

#vi pure-config.pl

加入pure-ftpd路径:

my $PUREFTPD;

-x && ($PUREFTPD=$_, last) for qw(

        ${exec_prefix}/sbin/pure-ftpd

        /opt/modules/pureftpd/sbin/pure-ftpd

);

 

#chmod 755 pure-config.pl

#./pure-config.pl /et       c/pure-ftpd.conf

#vi pure-ftpd.conf

内容:

ChrootEveryone              yes

BrokenClientsCompatibility     no

MaxClientsNumber            50

Daemonize                   yes

MaxClientsPerIP             8

VerboseLog                 yes

DisplayDotFiles             yes

AnonymousOnly               no

NoAnonymous                yes

SyslogFacility             daemon

DontResolve                no

MaxIdleTime                 15

MySQLConfigFile               /etc/pureftpd-mysql.conf

LimitRecursion              2000 8

AnonymousCanCreateDirs      no

MaxLoad                     4

AntiWarez                   yes

Bind                      127.0.0.1,21

Umask                       133:022

MinUID                      100

AllowUserFXP                no


AllowAnonymousFXP           no

ProhibitDotFilesWrite       no

ProhibitDotFilesRead        no

AutoRename                  no

AnonymousCantUpload        yes

AltLog                     clf:/opt/modules/pureftpd/log/pureftpd.log

NoChmod                    no

CreateHomeDir               yes

PIDFile                     /var/run/pure-ftpd.pid

MaxDiskUsage               99

CustomerProof              yes

 

安装配置web pureftpd 管理

安装webpureftp需要先安装apache或者lighttpdWEB服务器,创建一个目录

下载ftp_v_cn1.3.1.tar.gz

这个是支持中文的pureftpd WEB管理程序(自己汉化的,希望大家笑纳)

#tar zxvf 081215163458.gz

#mv ftp /opt/www/html/

#vi /opt/www/html/ftp/config.php

内容:

$LANG = $DUTCH;                     // Language (Options are $DUTCH, $ENGLISH, //$PT_BR, $RUSSIAN

                                      //           $SPANISH, $COREAN, //$FRENCH, $HUNGARIAN, //$GERMAN

                                      //           $TURKISH,$CN(中文), $DANISH //or $NORWEGIAN)

 

  $LocationImages =  "images";        // Location of images

 

  $DBHost = "127.0.0.1";              // Ip-adres of MySQL server

                                      // (Don~Rt change this if you are using the default //database)

 

  $DBLogin = "ftp";                   // Username of MySQL user

 

  $DBPassword = "tmppasswd";          // Password of MySQL user

 

  $DBDatabase = "ftpusers";           // Name of database

 

  $FTPAddress = "myipaddress.com:21"; // Domain name or ip-address of your ftp server

 

  $DEFUserID = "65534"; // nobody     // Default user id of virtual ftp user.

 

  $DEFGroupID = "31";   // guest      // Default group is of virtual ftp user.

 

  $UsersFile = "/etc/passwd";        // The unix user file

 

  $GroupFile = "/etc/group";         // The unix group file

 

  /* This list of users will not appear in the dropdown menu. */

  $BlacklistUsers = array ('adm','bin','bind','daemon','gopher','halt','kmem','lp',

                           'mailnull','man','named','nfsnobody','nscd','operator',

                           'pop','root','rpc','rpcuser','rpm','shutdown','smmsp',

                           'sshd','sync','toor','tty','uucp','vcsa','xfs');

 

  /* This list of groups will not appear in the dropdown menu. */

  $BlacklistGroups = array ('adm','bin','bind','daemon','dialer','dip','disk','floppy','gopher','kmem',

                           'lock','lp','mailnull','man','named','mem','network','news',

                           'nscd','ntp','operator','pcap','root','rpc','rpcuser','rpm','slocate','smmsp',

                           'sshd','staff','sys','tty','utmp','uucp','vcsa','wheel','xfs');

 

配置apachelighttpd将访问目录配置到/opt/www/html/ 下面,之后通过

进行访问

之后就按照提示进行配置就可以了

阅读(2097) | 评论(0) | 转发(0) |
0

上一篇:Vsftp安装步骤

下一篇:更新系统时间

给主人留下些什么吧!~~