Install ProFTPd and MySQL in Ubuntu

Source: Internet
Author: User
Most of the time, for the sake of security, you do not want to create users in the Ubuntu system to use ftp. At this time, you can consider using proftpd and mysql to implement and using mysql to manage users. Based on the instructions in this article, you can quickly establish an ftp + mysql Server 1. Environment: Ubuntu10.04.164bitproftpd1.3.2mysql5.1.412. Install proftpdUbuntu on

Most of the time, for the sake of security, you do not want to create users in the Ubuntu system to use ftp. At this time, you can consider using proftpd and mysql to implement and using mysql to manage users.

Based on the instructions in this article, you can quickly create an ftp + mysql Server

1. Environment:

Ubuntu 10.04.1 64bit

Proftpd 1.3.2

Mysql 5.1.41

2. Install proftpd

On Ubuntu

Apt-get install proftpd-basic proftpd-mod-mysql-server

3. Modify the proftpd. conf configuration file.

To:

ServerIdent on "Serv-u ftp" ServerName "ftp.gaojinbo.com" DefaultRoot ~

4. Add a file

RootLogin off kernel off LoadModule kernel AuthOrder extends SQLBackend mysql kernel Backend servers users * groups * SQLConnectInfo ftpuser @ localhost root login SQLUserInfo login userid passwd uid gid homedir shell SQLGroupInfo login groupname gid members SQLLog PASS updatecount SQLNamedQuery updatecount UPDATE "countcount = count + 1, accessed = now () WHERE userid = '% U' "ftp_users SQLLog STOR, DELE modified SQLNamedQuery modified UPDATE" modified = now () WHERE userid =' % U' "ftp_users

5. Add User www

Useradd www

Add the ftp File Permission for www users. The uid and gid are 1001

6. Create a database

Mysql-uroot-pgaojinbo create database ftpuser default character set = UTF-8; use ftpuser create table ftp_users (userid varchar (30), passwd varchar (50), uid int (10 ), gid int (10), homedir varchar (50), shell varchar (50); insert into ftp_users values ('gaojinbo', password ('gaojinbo'), '123 ′, '000000', '/var/ftp/virtual/gaojinbo.com', '/bin/nologin'); create table ftp_groups (groupname varchar (50), gid int (10 ), members varchar (250); insert into ftp_groups values ('ftpgroup', '1', 'gaojinbo ');

Create user main directory

Mkdir-p/var/ftp/virtual/gaojinbo.com

7. Start proftpd and Test

/Etc/init. d/proftpd start

Or

Proftpd-nd6

Ftp localhost

User gaojinbo, password gaojinbo

In this way, ProFTPd and MySQL are installed in Ubuntu!

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.