How to Install LAMP(Apache, MySql and Php) Server in Redhat Linux Step by Step Process Based from Terminal Command.
- Uninstall previous versions of apache and mysql
- rpm -e httpd mysql
- Download and install RPM packages of MySQL's server, client and dynamic shared libraries from mysql.com. do not opt to change the password on MySQL database unless you know what you're doing (I don't). If requested at first installation attempt, download the appropriate version of perl-dbi from rpmfind.net.
- rpm -ivh MySQL-client-5.0.20-0.glibc23.i386.rpm MySQL-server-5.0.20-0.glibc23.i386.rpm MySQL-shared-5.0.20-0.glibc23.i386.rpm
- Initialize mysql database after installation by typing..
- mysql_install_db
- Make sure /etc/ld.so.conf contains:
- /usr/lib
- Run ldconfig
- /sbin/ldconfig
- mv httpd-2.0.55.tar.gz /usr/local/; cd /usr/local/
- tar -xzvf httpd-2.0.55.tar.gz
- cd httpd-2.0.55
- ./configure --enable-so
- make
- make install
- Ensure Apache functions properly by starting, testing, and stopping it.
- /usr/local/apache2/bin/apachectl start
- /usr/local/apache2/bin/apachectl stop
- mv php-4.4.1.tar.gz /usr/local/; cd /usr/local/
- tar -xzvf php-4.4.1.tar.gz; cd php-4.4.1/
- ./configure --with-apxs2=/usr/local/apache2/bin/apxs --with-mysql
- make
- make install
- Add the following to your httpd.conf file:
- LoadModule php4_module modules/libphp4.so
- AddType application/x-httpd-php .php .phtml
- AddType application/x-httpd-php-source .phps
- Modify httpd.conf again, and then restart the httpd (/usr/local/apache2/bin/apachectl restart):
- DirectoryIndex index.html index.php
- To test your accomplishments, drop the following text into an index.php file within your DocumentRoot directory:
- <?php
- phpinfo();
- ?>
Thanking You
Hope U Like it......