Vsftpd和mysql配置
来自Ubuntu中文
安装vsftpd、mysql和phpmyadmin
Vsftp没有内置的MySQL支持,所以我们必须使用PAM来认证:
sudo apt-get install vsftpd libpam-mysql mysql-server mysql-client phpmyadmin
随后会询问下列问题:
New password for the MySQL "root" user: <-- yourrootsqlpassword Repeat password for the MySQL "root" user: <-- yourrootsqlpassword Web server to reconfigure automatically: <-- apache2
创建MySQL数据库
现在我们创建名为vsftpd的数据库和名为vsftpd的MySQL账户(用于vsftpd进程连接vsftpd数据库):
mysql -u root -p
CREATE DATABASE vsftpd; GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP ON vsftpd.* TO 'vsftpd'@'localhost' IDENTIFIED BY 'ftpdpass'; GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP ON vsftpd.* TO 'vsftpd'@'localhost.localdomain' IDENTIFIED BY 'ftpdpass'; FLUSH PRIVILEGES;
ftpdpass换成你想要的密码,然后创建表:
USE vsftpd;
CREATE TABLE `accounts` ( `id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY , `username` VARCHAR( 30 ) NOT NULL , `pass` VARCHAR( 50 ) NOT NULL , UNIQUE ( `username` ) ) ENGINE = MYISAM ;
quit;