Install LAMP server in Debian, Ubuntu, and CentOS
This is a simple tutorial about installing LAMP (Linux, Apache, MySQL, and PHP) and phpMyAdmin to help Linux newbie's to setup their own Web server. This tutorial specifically written for the following GNU/Linux distributions:
Installing LAMP in Debian Sarge
To install Apache, PHP, MySQL and phpMyAdmin in Debian Sarge, please type this command.
Installing LAMP in Debian Etch and Ubuntu Gutsy and Hardy Heron
The installation instruction for installing Apache, PHP, MySQL and phpMyAdmin in Debian Etch and Ubuntu is the same as above. The difference is in Debian Sarge, its using PHP4 and MySQL4 while in Debian Etch and Ubuntu is using PHP5 and MySQL5.
Installing LAMP in CentOS4
To install Apache, PHP, and MySQL in CentOS4 with phpMyAdmin, download and add the RPMforge repo.
rpm -ivh rpmforge-release-0.3.6-1.el4.rf.i386.rpm
We need to install RPMforge repository to install libmcrypt and phpMyAdmin using yum.
Now type:
This will install Apache2, PHP4 and MySQL4 packages. PhpMyAdmin needs the php-mcrypt package, but it is not available in the CentOS4 repository. We will download the php-mcrypt from sourceforge.net.
rpm -ivh php-mcrypt-4.3.9-3.2.1.i386.rpm
Installing LAMP in CentOS 5
Download the RPMforge repo for CentOS5 and install Apache, PHP, MySQL and phpMyAdmin.
rpm -ivh rpmforge-release-0.3.6-1.el5.rf.i386.rpm
yum install httpd php php-mysql php-gd php-mbstring php-mcrypt mysql mysql-server phpmyadmin
Configure the Apache and MySQL to run during startup in CentOS 4 and 5
chkconfig mysqld on
service http start
service mysqld start
To check whether your php installation is running and configured properly, create a file called "phpinfo.php" and put it in your /vaw/www/ directory for Debian/Ubuntu and /var/www/html for CentOS.
Edit the "phpinfo.php" and add this line:
Then open your web browser and point to http://localhost/phpinfo.php, you should see this page in your browser.
Configure phpMyAdmin in CentOS
To fix this problem, edit the file /usr/share/phpmyadmin/config.inc.php.
and put a blowfish secret
- $cfg['blowfish_secret'] = 'secret'; /* YOU MUST FILL IN THIS FOR COOKIE AUTH! */
Then refresh your browser....
Cheers!
You have now a working Linux, Apache, MySQL and PHP server.

Delicious
Digg
StumbleUpon
Furl
Facebook
Twitter
Google
Yahoo
Buzz Up!
LinkedIn
Technorati






Great Help
hi,
Thanks you have helped me a lot ....
:)
Thanks,
Mohit Sharma
fine
thanks for this great tutrial, on centos 5, only edith the file /etc/httpd/conf.d/phpmyadmin.conf, replace the lines:
Order Deny,Allow
Deny from all
Allow from 127.0.0.1
to
AllowOverride All
Alias /phpmyadmin /usr/share/phpmyadmin
Alias /phpMyAdmin /usr/share/phpmyadmin
Alias /mysqladmin /usr/share/phpmyadmin
working very fine.
for CentOS 5 change "service
for CentOS 5 change "service http start" to "service httpd start" Also, where is phpmyadmin stored, http://localhost/phpmyadmin is not working.
GD
How to to get run php script with GD in apache?
Great tutorial
Wow, thanks for great step by step tutorial.
Post new comment