Installing LAMP - tips

Thought of sharing some experience I came across when installing LAMP stack. My intension is not to give step by step procedure for "How to install LAMP stack" [LAMP it self provides very good documentation for that ], But some of the issues you may come across.
My LAMP stack compose with :
- Linux [Fedora 5] ;) yeah too old. Should have gone for 7
#uname -a
Linux petronas 2.6.15-1.2054_FC5smp #1 SMP Tue Mar 14 16:05:46 EST 2006 i686 i686 i386 GNU/Linux


- Apache 2.2.4 latest
- Mysql - 5.0.36 latest
- PHP - 5.2.3 latest.


1. If you are planning to install LAMP from the scratch, REMOVE default installations of Apache, Mysql and PHP which come with the Linux installation.

Check the existence of the packages using following commands :

rpm -qa | grep -i mysql

rpm -qa | grep -i apache

rpm -qa | grep -i httpd

rpm -qa | grep -i php


if you get any response for this with list of files, rpms, remove them using following :

rpm -e "file name"


But if you are a Fedora user, use "Yum" [fantastic tool for package management, less headache with dependencies],

yum remove "file name"


With this you can remove earlier installations, now you ready for the installation.

Installation links are :

Mysql : http://dev.mysql.com/doc/refman/5.0/en/installing.html
Apache : http://httpd.apache.org/docs/2.2/install.html
PHP : http://www.php.net/manual/en/install.unix.apache2.php


Mysql and Apache installation were very smooth, not much issues,

2. When you install , PHP if you come see following error message :

Configuring extensions
checking whether to enable LIBXML support... yes
checking libxml2 install dir... no
configure: error: xml2-config not found. Please check your libxml2 installation.



You may need to install libxml2 development packages, you might get this error even you have libxml2, do following in fedora,

yum install libxml2-devel


3. If you install PHP with mysql option, some times you might get following error,

checking for MySQL UNIX socket location... no
configure: error: Cannot find MySQL header files under yes.
Note that the MySQL client library is not bundled anymore.

If you install mysql without using RPMs there is a high probability of facing this issue, since PHP conigurator cannot locate the mysql.
Use following command to configure the PHP.

./configure --with-apxs2=/usr/local/apache/bin/apxs --with-mysqli=/usr/local/mysql



============================================

Comments

Anonymous said…
Hello,
Thanks for the information, was really helpful.
I could solve the issues using the given info.

TC, Alman
Anonymous said…
This comment has been removed by a blog administrator.
Anonymous said…
Поздравляю вас Старо-Новым годом, желаю вам в новом году успехов и спасибо что вы находите время поддерживать ваш замечательный блог!

Popular posts from this blog

Enabling high availability in Spring applications

Getting Screenshots in symbian phones

Good Article : About JSF & Struts [The add-and-remove pattern]