Post: How to install LAMP on CentOS 5
01-01-2013, 12:00 AM #1
Dan
I'm a god.
(adsbygoogle = window.adsbygoogle || []).push({});
You must login or register to view this content.


LAMP, which stands for Linux, Apache, MySQL, and PHP, is relatively easy to install on a Cent OS server.
Here are the commands to run:
First before everything run
    yum update

To update your current packages.

After that we will
Install Apache:
    sudo yum install httpd mod_ssl


Start Apache:
    sudo /etc/init.d/httpd start


Add ServerName:
    sudo vi /etc/httpd/conf/httpd.conf

Add server name after #ServerName You must login or register to view this content.

ServerName whateveryouwanthere

Restart Apache:
    sudo /etc/init.d/httpd restart


Install MySQL:
    yum install mysql-server
/etc/init.d/mysqld start


Install PHP:

Edit Repo file by running:
     sudo vi /etc/yum.repos.d/CentOS-Base.repo


Add this to the end of it:
    [c5-testing]
name=CentOS-5 Testing
baseurl=https://dev.centos.org/centos/$releasever/testing/$basearch/
enabled=1
gpgcheck=1
gpgkey=https://dev.centos.org/centos/RPM-GPG-KEY-CentOS-testing


Run:
     yum install php php-common php-gd php-mcrypt php-pear php-pecl-memcache php-mhash php-mysql php-xml php-mbstring


Install PHPMyAdmin:
     cd /var/www/html
wget https://downloads.sourceforge.net/project/phpmyadmin/phpMyAdmin/3.3.6/phpMyAdmin-3.3.6-english.tar.gz?r=http%3A%2F%2Fwww.phpmyadmin.net%2Fhome_page%2Fdownloads.php&ts=1283745912&use_mirror=voxel
tar zxvf phpMyAdmin-3.3.6-english.tar.gz
mv phpMyAdmin-3.3.6-english phpmyadmin
cd phpmyadmin
cp config.sample.inc.php config.inc.php

Edit config.inc.php for random string $cfg['blowfish_secret'] = ‘RandomStringHere’;

Restart server:
    service httpd restart


Note: This isn't the only way to do this.
(adsbygoogle = window.adsbygoogle || []).push({});

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo