CentOS server 6.5 x64, install APACHE, PHP, MYSQL, FTP and PHPMyAdmin

After register and have droplet with minimum CentOS Server 6.5 installed, now we will setup it as a server. We will need to install Apache + PHP + MySQL + PHPMyAdmin + FTP Server. This tutorial i will introduce the Apache Server. Nginx server will have another tutorial.

Install Apache:

Install httpd PHP MySQL vsftpd on CentOS
Install httpd PHP MySQL vsftpd on CentOS

After finish, run command:

And then:

Install Mysql:

Install httpd PHP MySQL vsftpd on CentOS
Install httpd PHP MySQL vsftpd on CentOS

After finish, run command:

And then:

Create a new root password for mysqlserver: mysqladmin -u root password matkhau
Replace matkhau by your own

Install phpmyadmin:

Run command:

Or : rpm –Uvh http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm
Or : rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm
Next, we run:

and

Install httpd PHP MySQL vsftpd on CentOS
Install httpd PHP MySQL vsftpd on CentOS

In command type:

Add these lines at the end of file:

Install FTP Server:

After installation, Open the file /etc/vsftpd/vsftpd.conf which is the config file for vsftpd ( I mean FTP server ) .Find the below line

anonymous_enable=YES
Replace YES to NO to disable anonymous login ( Login without username and password ).
anonymous_enable=NO
Uncomment the below line to disable chroot access ( optional )
chroot_local_user=YES
Add these lines at the end of file:
pasv_enable=YES
pasv_min_port=64000
pasv_max_port=64321
port_enable=YES

Next we creat FTP user and add it to a folder:

mkdir /home/bienthuy.com
useradd -d /home/bienthuy.com bienthuy
And then we creat password for user bienthuy
passwd bienthuy
Changing password for user bienthuy.
New password:
You just created username bienthuy with home directory /home/bienthuy.com.

Change mod, owner for user bienthuy:

» Start vsftpd service by issuing the below command.
service vsftpd start
chkconfig –levels 235 vsftpd on
» That’s it, Now we can check the FTP access .Create some files in /home/bienthuy.com folder

Trả lời

Email của bạn sẽ không được hiển thị công khai. Các trường bắt buộc được đánh dấu *