装了个ftp-server,这里只是一些简易的安装过程,其它功能和配置还需要大家去寻找相关文档。
1.mysql install
shell> groupadd mysql
shell> useradd -g mysql mysql
shell> gunzip < mysql-VERSION.tar.gz | tar -xvf -
shell> cd mysql-VERSION
shell> ./configure --prefix=/usr/local/mysql
shell> make
shell> make install
shell> cp support-files/my-medium.cnf /etc/my.cnf
shell> cd /usr/local/mysql
shell> bin/mysql_install_db
shell> chown -R root .
shell> chown -R mysql var
shell> chgrp -R mysql .
shell> bin/mysqld_safe --user=mysql &
shell> cp /root/mysql-4.0.18/support-files/mysql.server /etc/init.d/mysql.server
shell> update-rc.d mysql.server defaults 99 (开机时启动mysql)
shell> chmod +x mysql.serve
shell> /usr/local/mysql//bin/mysqladmin -u root password 'new-password'
增加环境变量(./profile)
PATH=.:$PATH:/usr/local/mysql/bin
export PATH
---------------------------------------------------------------------------------------------
2.Istall pureftpd
./configure --prefix=/usr/local/pureftpd/
--with-mysql=/usr/local/mysql/
--with-diraliases
--with-throttling
--without-inetd
--without-shadow
--with-quotas
--with-ftpwho
--with-language=mimplified-chinese
--with-welcomemsg
--with-cookie
make && make install
-------------------------------------------------------------------------------------------
3.在mysql里建表
mysql -uroot -p
create database pureftpd
grant all on pureftpd.* to pureftpd@localhost identified by "password";
use pureftpd
CREATE TABLE users (
User varchar(16) NOT NULL default '',
Password varchar(64) NOT NULL default '',
Uid int(11) NOT NULL default '-1',
Gid int(11) NOT NULL default '-1',
Dir varchar(128) NOT NULL default '',
PRIMARY KEY (User)
);
quit
----------------------------------------------------------------------------------------------
配置pureftpd和mysql
cp ../root/pure-ftpd-1.0.17a/configuration-file/pure-config.pl /usr/local/sbin/
cp ../root/pure-ftpd-1.0.17a/configuration-file/pure-ftpd.conf /etc/
cp ../root/pure-ftpd-1.0.17a/pureftpd-mysql.conf /etc
chmod +x /usr/local/sbin/pure-config.pl
vi pure-ftpd.conf
MySQLConfigFile /etc/pureftpd-mysql.conf 去掉#
vi pureftpd-mysql.conf
MYSQLServer localhost
MYSQLPort 3306
MYSQLSocket /tmp/mysql.sock
MYSQLUser "pureftpd"
MYSQLPassword "password"
MYSQLDatabase pureftpd
MYSQLCrypt cleartext
MYSQLGetPW SELECT Password FROM ftp WHERE User="\L"
MYSQLGetGID SELECT Gid FROM ftp WHERE User="\L"
MYSQLGetDir SELECT Dir FROM ftp WHERE User="\L"
---------------------------------------------------------------------------------------------
pureftpd的启动
cp /root/pure-ftpd-1.0.17a/contrib/redhat.init /etc/init.d/pureftp-server
vi /etc/init.d/pureftp-server
#. /etc/rc.d/init.d/functions 将这一行注释掉
wq!
update-rc.d pureftp-server defaults 98
运行 /etc/init.d/pureftp-server
1.mysql install
shell> groupadd mysql
shell> useradd -g mysql mysql
shell> gunzip < mysql-VERSION.tar.gz | tar -xvf -
shell> cd mysql-VERSION
shell> ./configure --prefix=/usr/local/mysql
shell> make
shell> make install
shell> cp support-files/my-medium.cnf /etc/my.cnf
shell> cd /usr/local/mysql
shell> bin/mysql_install_db
shell> chown -R root .
shell> chown -R mysql var
shell> chgrp -R mysql .
shell> bin/mysqld_safe --user=mysql &
shell> cp /root/mysql-4.0.18/support-files/mysql.server /etc/init.d/mysql.server
shell> update-rc.d mysql.server defaults 99 (开机时启动mysql)
shell> chmod +x mysql.serve
shell> /usr/local/mysql//bin/mysqladmin -u root password 'new-password'
增加环境变量(./profile)
PATH=.:$PATH:/usr/local/mysql/bin
export PATH
---------------------------------------------------------------------------------------------
2.Istall pureftpd
./configure --prefix=/usr/local/pureftpd/
--with-mysql=/usr/local/mysql/
--with-diraliases
--with-throttling
--without-inetd
--without-shadow
--with-quotas
--with-ftpwho
--with-language=mimplified-chinese
--with-welcomemsg
--with-cookie
make && make install
-------------------------------------------------------------------------------------------
3.在mysql里建表
mysql -uroot -p
create database pureftpd
grant all on pureftpd.* to pureftpd@localhost identified by "password";
use pureftpd
CREATE TABLE users (
User varchar(16) NOT NULL default '',
Password varchar(64) NOT NULL default '',
Uid int(11) NOT NULL default '-1',
Gid int(11) NOT NULL default '-1',
Dir varchar(128) NOT NULL default '',
PRIMARY KEY (User)
);
quit
----------------------------------------------------------------------------------------------
配置pureftpd和mysql
cp ../root/pure-ftpd-1.0.17a/configuration-file/pure-config.pl /usr/local/sbin/
cp ../root/pure-ftpd-1.0.17a/configuration-file/pure-ftpd.conf /etc/
cp ../root/pure-ftpd-1.0.17a/pureftpd-mysql.conf /etc
chmod +x /usr/local/sbin/pure-config.pl
vi pure-ftpd.conf
MySQLConfigFile /etc/pureftpd-mysql.conf 去掉#
vi pureftpd-mysql.conf
MYSQLServer localhost
MYSQLPort 3306
MYSQLSocket /tmp/mysql.sock
MYSQLUser "pureftpd"
MYSQLPassword "password"
MYSQLDatabase pureftpd
MYSQLCrypt cleartext
MYSQLGetPW SELECT Password FROM ftp WHERE User="\L"
MYSQLGetGID SELECT Gid FROM ftp WHERE User="\L"
MYSQLGetDir SELECT Dir FROM ftp WHERE User="\L"
---------------------------------------------------------------------------------------------
pureftpd的启动
cp /root/pure-ftpd-1.0.17a/contrib/redhat.init /etc/init.d/pureftp-server
vi /etc/init.d/pureftp-server
#. /etc/rc.d/init.d/functions 将这一行注释掉
wq!
update-rc.d pureftp-server defaults 98
运行 /etc/init.d/pureftp-server
