我就整理一下我的安装过程,当然也不是原创了。也提供了相关软件包永久下载
,mysql/php/apache安装就免了。我的mysql是使用源码安装!
相关软件:
---------------------------------------------------------------
proftpd-1.2.9.tar.gz
proftpd-mod-quotatab-1.2.11.tar.gz
ftpdb.sql
proftpd.conf
---------------------------------------------------------------
步骤如下:
代码: |
vi /etc/ld.so.conf 添加:/usr/local/mysql/lib tar zvxf proftpd-1.2.9.tar.gz |
-------------------------------Proftpd.conf----------------------------------
代码: |
# This is a basic ProFTPD configuration file (rename it to # 'proftpd.conf' for actual use. It establishes a single server # and a single anonymous login. It assumes that you have a user/group # "nobody" and "ftp" for normal operation and anon. ServerName "ltsnet" # Port 21 is the standard FTP port. # Umask 022 is a good standard umask to prevent new dirs and files # To prevent DoS attacks, set the maximum number of child processes # Set the user and group under which the server will run. # To cause every FTP user to be "jailed" (chrooted) into their home # A basic anonymous configuration, no upload directories. If you do not # We want clients to be able to login with "anonymous" as well as "ftp" # Limit the maximum number of anonymous logins # We want 'welcome.msg' displayed at login, and '.message' displayed # Limit WRITE everywhere in the anonymous chroot SQLAuthTypes Backend Plaintext SQLConnectInfo ftpdb@localhost root 123456 QuotaEngine on |
建ftpdb库,在phpMyAdmin中导入ftpdb.sql就ok。
--------------------------------------ftpdb.sql---------------------------------
代码: |
# 表的结构 `ftpgroup` # CREATE TABLE `ftpgroup` ( # INSERT INTO `ftpgroup` VALUES ('ftpgroup', 5500, 'ftpuser'); # -------------------------------------------------------- # CREATE TABLE `ftpquotalimits` ( # INSERT INTO `ftpquotalimits` VALUES ('test', 'user', 'true', 'hard', '9e+06', '2000', '9e+09', 2000, 2000, 2000); # -------------------------------------------------------- # CREATE TABLE `ftpquotatallies` ( # INSERT INTO `ftpquotatallies` VALUES ('test', 'user', '2000', '2000', '2000', 2000, 2000, 2000); # -------------------------------------------------------- # CREATE TABLE `ftpuser` ( # INSERT INTO `ftpuser` VALUES (1, 'test', '123456', 5500, 5500, '/home/test', '/sbin/nologin', 36, '2004-09-28 13:07:41', '2004-09-28 13:07:42'); |
quotalimits表
代码: |
name: - 用户帐号 quota type: - user, group, class, all (we use user) per_session: - true or false (we use true) limit_type: - 硬限制 or 软限制 (我们一般用硬限制) bytes_in_avail: - 允许上传的字节数 bytes_out_avail: - 允许下载的字节数 bytes_xfer_avail: - 允许传输的字节数(包括上传/下载) files_in_avail: - 允许上传的文件数 files_out_avail: - 允许下载的文件数 files_xfer_avail: - 允许传输的文件数(包括上传/下载) |
按这些步骤来安装,应该没问题。老实说用mysql和quota模块来验证用户和设置磁盘限额,但我总觉得还是不够完善,因为在这个方法中,数据库表里还没有相应的权限的字段,所以说相应用户的权限还是得用实际得用户即mysql对应得uid和gid来控制权限,那天要是mysql数据库也能完全控制权限就好了。