Rodolfo Bandeira

Rodolfo Bandeira

software, electronics, security, devops, thoughts

How To Install Linux, Apache, MySQL, PHP (LAMP) on CentOS 6

This is a very simple steps to configure a CentOS server. Apache, PHP, MySQL

Installing the Apache HTTP Server:

[root@srvcob ~]# yum install httpd Starting the server:
[root@srvcob ~]# service httpd start

How to search all php modules availables:

[root@srvcob ~]# yum search php-

How to install PHP:

[root@srvcob ~]# yum install php

Installing php-mysql module:

[root@srvcob ~]# yum install php-mysql

Installing the php-cli module:

[root@srvcob ~]# yum install php-cli

Installing the net-snmp:

[root@srvcob ~]# yum install net-snmp

Install php-snmp using the .rpm file:

[root@srvcob ~]# rpm -ivh php-snmp-5.3.3-3.el6_1.3.x86_64.rpm

Install MySQL Server:

[root@srvcob ~]# yum install mysql-server

Start the MySQL Server:

[root@srvcob ~]# service mysqld start

Downloading the phpMyAdmin:

[root@srvcob ~]# wget

Extracting the .tar.gz file:

[root@srvcob html]# tar -xzvf phpMyAdmin-4.1.6-all-languages.tar.gz

Removing the .tar.gz file:

[root@srvcob html]# rm -rf *.tar.gz

If you want to rename the phpmyadmin folder:

[root@srvcob html]# mv phpMyAdmin-4.1.6-all-languages/ phpmyadmin
[root@srvcob html]# cd phpmyadmin/

Setting up the configuration file:

[root@srvcob phpmyadmin]# mv

Set the httpd and mysqld to start automatctly if the server has restarted:

[root@srvcob /]# chkconfig httpd on
[root@srvcob /]# chkconfig mysqld on

Last modified: