|
全是英文的
我看起来很吃力..
唉..:confused:
=====================================
1. How do I use ProFTPD with mod_sql?
=====================================
The current supported version of mod_sql is distributed with ProFTPD.
Everything in this tarball belongs in the contrib subdirectory of the
ProFTPD source tree:
# cd contrib
# tar -xzvf mod_sql-3.2.3.tar.gz
To build ProFTPD with mod_sql support, call configure with the
following arguments (for example):
If you're using the MySQL backend:
./configure --with-modules=mod_sql:mod_sql_mysql
If you're using the Postgres backend:
./configure --with-modules=mod_sql:mod_sql_postgres
You will need to tell configure how to find your database-specific
libraries and header files; I use the MySQL backend and call configure
like this:
./configure --with-modules=mod_sql:mod_sql_mysql \
--with-includes=/usr/local/include \
--with-libraries=/usr/local/lib/mysql
Now, read the Directives section below.
===================================================
2. How do I setup my database for use with mod_sql?
===================================================
I'm assuming you know how to use your database system.
At the minimum, mod_sql must be able to access a table with two
columns: userid and passwd. For full functionality, you probably need
to do more, including creating another database table to hold group
information.
In the following table headings, 'COLUMN' is the column name, 'TYPE'
is the datatype expected (text or numeric), 'R' means "required
column", 'N' means "if this column exists, are NULL values
allowed". and 'USE' gives a *very* brief description of what goes in
there.
USERTABLE: This table *MUST* exist in the database.
COLUMN TYPE R N USE
---------------------------------------------------------
userid text Y N user's login id
uid num N Y user's uid
gid num N Y user's gid
passwd text Y N user's password
shell text N Y user's shell
homedir** text N Y user's homedir
count num N N login counter
**see the description of the directives SQLHomedir and SQLHomedirField
GROUPTABLE: For full functionality of this module, this table should
exist. If you elect *NOT* to create it, you *MUST* set the
'SQLDoGroupAuth' directive to 'OFF'.
COLUMN TYPE R N USE
---------------------------------------------------------
groupname text Y N group's name
gid num Y N group's gid
members text Y Y group's members
Note: multiple members per group must be separated by commas and
should not include whitespace.
Note: mod_sql will concatenate all matching group rows -- that is, you
can have multiple rows for each group with only one member per group,
or you can have a single row with multiple groups, or you can mix and
match. |
|