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:
1 | yum install httpd php php-devel php-gd php-imap php-ldap php-mysql php-odbc php-pear php-xml php-xmlrpc php-mbstring php-soap php-mcrypt php-mhash |

Install httpd PHP MySQL vsftpd on CentOS
After finish, run command:
1 | chkconfig httpd --level 345 on |
And then:
1 | service httpd start |
Install Mysql:
1 | yum install mysql mysql-devel mysql-server |

Install httpd PHP MySQL vsftpd on CentOS
After finish, run command:
1 | mysqld --level 345 on |
And then:
1 | service mysqld start |
Create a new root password for mysqlserver: mysqladmin -u root password matkhau
Replace matkhau by your own
Install phpmyadmin:
Run command:
1 | rpm -ivh http:<code class="php comments">//ftp.jaist.ac.jp/pub/Linux/Fedora/epel/6/i386/epel-release-6-8.noarch.rpm |
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:
1 2 3 | yum update yum install phpMyAdmin Cd /usr/share/phpMyAdmin |
and
1 | mv config.sample.inc.php config.inc.php |

Install httpd PHP MySQL vsftpd on CentOS
1 2 | Vi config.inc.php service httpd restart |
In command type:
1 | vi /etc/httpd/conf/httpd.conf |
Add these lines at the end of file:
1 2 3 4 | <Directory "/usr/share/phpMyAdmin"> Order allow,deny Allow from all </Directory> |
Install FTP Server:
1 | yum -y install vsftpd |
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/public_html
useradd -d /home/bienthuy.com/public_html 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/public_html.
Change mod, owner for user bienthuy:
1 2 3 | chown –hR bienthuy:apache /home/bienthuy.com/public_html chmod -R g+w /home/bienthuy chmod g+s /home/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/public_html folder
Same tags:
- Joomla Fix Out of sort memory, consider increasing sort buffer size
- Cách tìm các files mới bị sửa, tạo mới trên server Linux
Other Posts you may be interested in:
- Hình nền girl xinh 4k cho laptop
- Que thử giới tính thai nhi có chính xác không?
- Ý nghĩa các sao, cúng Sao và giải hạn
- CSS3 – Text Shadow, Rounded Corners and Multiple Backgrounds
- PHP Smart download – Hide real files path
- NameCheap Coupon .Net only $3.88
- How to remove all attributes from a tag using PHP
Last updated on September 9th, 2014 at 04:12 pm