Skip to main content

how to install Lamp on Linux Machine

Steps and necessary commands to install Lamp on Linux Machine.
Mkdir   /extracted
Mkdir  /extracted/http
Mkdir  /extracted/mysql
Mkdir  /extracted/php
Mkdir  /lamp
Mkdir  /lamp/http
Mkdir  /lamp/mysql
Mkdir  /lamp/php
Yum install gcc* libxml2* ncurses-devel* cmake* 
Cd  /extracted/http
Tar  –xzvf  httpd-2.2.15tar.gz
Cd  httpd-2.2.15
./configure      --prefix=/lamp/http   --enable-so  --enable-proxy=shared
Make install
/lamp/http/bin/apachaectl    start
Cd   /extracted/mysql
Tar  -xzvf   mysql-5.1.44.tar.gz
Cd   mysql-5.1.44
Groupadd   –r   mysql
Useradd   –r  -g  mysql  -d  /tmp  -s  /sbin/nologin
Cmake  .  –DCMAKE_INSTALL_PREFIX= /lamp/mysql 
Make install
Chown   –R  mysql   /lamp/mysql 
Chgrp  -R  mysql   /lamp/mysql 
Cd   /scripts
Mysql_install_db    --user=mysql
Support-files   /mysql.server    start
ln   /var/lib/mysql/mysql.sock    /tmp
/lamp/mysql/bin/mysqladmin   -u   root  password   “redhat”
Mysql   -u  root  -p
Mysql> show   databases;
Mysql> create database  ambu;
Mysql>  use ambu;
Mysql> create   table  demo;
Insert   into  demo(id,name)  values(1,”Vishnu”);
Select * from   demo;
Show  tables;
drop   table  demo;
drop   database ambu;
---before install php stop  the service of both mysql& apache
Cp  /lamp/http/bin/apachaetl   /etc/init.d/myserver
Cp   /lamp/mysql/support-files/mysql.server     /etc/init.d/mysql
Support-files   /mysql.server    stop
stop mysql    also
Cd   /extracted/php
Tar  -xzvf  /xxxx/php.x.x.tar.gz
Cd  php.x.x
./configure   --prefix=/lamp/php     --with-apxs2=/lamp/http/bin/apxs   --with-mysql=/lamp/mysql
Make install
Cp   php.ini-development     /usr/local/php.ini
Vim   /lamp/http/conf/httpd.conf
LoadModulephps_module   modules/
AddType application   /x-httpd-php   .php
line 176  directory index    index.php
Support-files   /mysql.server    start
Also  start  mysql    also



    Its nice post. I do not know everything.........
    plz give more information.............


Post a Comment

Popular posts from this blog

List Of Common Flowers in Kerala With Pictures

Kerala is one of the famous tourist spot situated on the south of India famous for its numerous wild life and thick vegetation. Like the Himalayan ranges on the north of India,

5 Common Examples Of Website Design Mistakes by Business Owners

This is a guest post by Sachin about five Common Examples Of Website Design Mistakes by Business Owners . When most business owners think about website design, they think about a brochure online. Online shopping sites are making a lot of money with the use of web-based applications to sell products, collect payments an arrange delivery. The only work left to do is pack and send the boxes. Smart applications can even print out the labels, so the only thing left to do it stick them on the box. Unfortunately, in many cases, websites are replacing people. For those of us left with a job, we can be thankful that many business owners make the following mistakes when it comes to websites and web design.

Don’t have one. This is the first and biggest problem of most business owners when it comes to website design. They think they don’t need one. Who can ever really do with less business? The reason why they have not been getting business from online sources in the past is because they have not …