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:

[[email protected] ~]# yum install httpd Starting the server:
[[email protected] ~]# service httpd start

How to search all php modules availables:

[[email protected] ~]# yum search php-

How to install PHP:

[[email protected] ~]# yum install php

Installing php-mysql module:

[[email protected] ~]# yum install php-mysql

Installing the php-cli module:

[[email protected] ~]# yum install php-cli

Installing the net-snmp:

[[email protected] ~]# yum install net-snmp

Install php-snmp using the .rpm file:

[[email protected] ~]# rpm -ivh php-snmp-5.3.3-3.el6_1.3.x86_64.rpm

Install MySQL Server:

[[email protected] ~]# yum install mysql-server

Start the MySQL Server:

[[email protected] ~]# service mysqld start

Downloading the phpMyAdmin:

[[email protected] ~]# wget http://downloads.sourceforge.net/project/phpmyadmin/phpMyAdmin/4.1.6/phpMyAdmin-4.1.6-all-languages.tar.gz?r=http%3A%2F%2Fwww.phpmyadmin.net%2Fhome_page%2Fdownloads.php&ts=1391532364&use_mirror=ufpr

Extracting the .tar.gz file:

[[email protected] html]# tar -xzvf phpMyAdmin-4.1.6-all-languages.tar.gz

Removing the .tar.gz file:

[[email protected] html]# rm -rf *.tar.gz

If you want to rename the phpmyadmin folder:

[[email protected] html]# mv phpMyAdmin-4.1.6-all-languages/ phpmyadmin
[[email protected] html]# cd phpmyadmin/

Setting up the configuration file:

[[email protected] phpmyadmin]# mv config.sample.inc.php config.inc.php

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

[[email protected] /]# chkconfig httpd on
[[email protected] /]# chkconfig mysqld on

Last modified:


Share:
LinkedIn
WhatsApp