Mar
3
Install and Configure LAMP on Ubuntu
March 3, 2008 |
In this article, I will share my experience install and configure LAMP on Ubuntu Linux.
1. Launch Terminal
First open up Applications->Accessories->Terminal.
2. Install Apache
Type the following line of command:
sudo apt-get install apache2
3.Install PHP5
Execute the following command by typing the following line in the Terminal and hit enter:
sudo apt-get install php5 libapache2-mod-php5
4. To Stop/Restart Apache
Execute the following command in the Terminal:
Stop/Restart Apache
5.Install MySQL Server
sudo apt-get install mysql-server
6.Set mysql root password
You’ll need to set a password for local computer gets root access.
a. First type the follwing line and hit enter to avoid being prompted for password:
sudo su
b. now you must kill the running mysql server. The process id is grabbed from /var/run/mysqld/ and inserted into the kill statement. Note there are ticks (`) around the process id, not single quotes (’).
kill `cat /var/run/mysqld/mysqld.pid`
c. Now you need to run a command to cause the server not to use the privilege system at all, which gives anyone with access to the server unrestricted access to all databases.
mysqld –skip-grant-tables & mysql -u root
d. Set the password:
UPDATE mysql.user SET Password=PASSWORD (’newpassword’) WHERE User = ‘root’;
e. execute the following commands one by one to finish the password setup.
exit
kill `cat /var/run/mysqld/mysqld.pid`
mysqld &
mysql -u root -p
7.Install MySQL Administrator
sudo apt-get install mysql-admin
8. Refresh Gnome Panel
killall gnome-panel
9. Install MySQL for Apache HTTP Server
sudo apt-get install libapache2-mod-auth-mysql php5-mysql phpmyadmin
10. To get PHP to work with MySQL, open the php.ini file
gksudo gedit /etc/php5/apache2/php.ini
11. Add the following line somewhere in the opened up file:
extension=mysql.so
12. Restart Apache
sudo /etc/init.d/apache2 restart
Now you are done!
Related Articles:
Install and Configure phpMyAdmin on Ubuntu LAMP
Create a Subdomain Virtual Host on Ubuntu
Similar Posts
- Install and Configure phpMyAdmin on Ubuntu LAMP
- Ubutu Root Password
- Linux Ubuntu Install Setup PHP cURL
- Install and Use Skype on Ubuntu
- Install and Use Audacity on Ubuntu
- Create a Subdomain Virtual Host on Ubuntu
- Install and Configure Wine on Ubuntu
- Ubuntu Hardy Broadcom Wireless Setup
- Ubuntu Configure Disable Touchpad
- Ubuntu Seperate Audio From Video
- Burn Blu-Ray Disc on Ubuntu
- Create Compile and Run .NET on Ubuntu
- Transfer music mp3 to and from iPod Ubuntu
- Install IE6 using IEs 4 Linux on Ubuntu
- Install and Play Enemy Territory Quake Wars on Ubuntu
- Install Photoshop on Ubuntu
- Play iTunes m4a Files on Linux Ubuntu
- Ubuntu Convert Ogg Flac to mp3
- Install Google Earth on Ubuntu
- Install and Play Counter Strike on Ubuntu
- Switch Ubuntu Server to Desktop
- Install Java Plugin on Ubuntu Firefox
- Ubuntu Best CHM Viewer
- Using Gmail With Evolution on Ubuntu
- Make Acer Extensa headphone speakers Work on Ubuntu
- Install Flash CS on Ubuntu
- Install Adobe AIR for Linux Beta on Ubuntu
- Install Run and Play Doom 3 on Ubuntu
- Install and Play Quake III Arena on Ubuntu
- Install and Play Quake 4 on Ubuntu
- Ubuntu Change Password
- Use aMule as eMule alternative on Ubuntu
- Install and Play Unreal Tournament on Ubuntu
- Install and Play Quake 2 on Ubuntu
- Ubuntu Install Chinese Input
- Install and Play Red Alert 2 on Ubuntu
- Install and Play Diablo II on Ubuntu
- Open VCD Using VLC on Ubuntu
- Manipulate Files Directories using Unix Shell
- Virus on Ubuntu Wine
- Manage Ubuntu Repository
- Ubuntu Upgrade From Gutsy to Hardy Problem Fix
- Check RAM Usage on Ubuntu
- Create Read View Edit Excel File on Ubuntu
- Ubuntu’s Equivalent to Task Manager
- Assign Change Ubuntu Keyboard Shortcuts
- Install and Run RealPlayer on Ubuntu
- Install BitTorrent GUI Azureus on Ubuntu
- Install and Use Google Talk to Chat on Ubuntu
- Install Use ICQ on Ubuntu
Comments
7 Comments so far



































This is so far the most complete guide I have found. There are many instruction out there, your one is similar to the one i read at http://www.supriyadisw.net/2006/12/lamp-installation-on-ubuntu, but yours is far more precise. It’s like a combination of all the incomplete blog tutorials. Good job!
[...] you already have LAMP installed and configured on your machine, if not, please read this post - Install and Configure LAMP on Ubuntu [...]
[...] In this article, I will teach you how to create a virtual host named http://www.wordpress.example.com on your local machine, which will point to a local folder named wordpress under a specified location like /home/host/ on your machine. The wordpress folder will be your working folder for all the files run on the virtual host, and you’ll load the sample pages through http://www.wordpress.example.com. I assume that you already have LAMP installed and configured on your machine, if not, then read this article first: Install and Configure LAMP on Ubuntu [...]
Hi, tis s a wonderful work.. bt, i want to know how to proceed after this in Ubuntu. How to launch LAMP in Ubuntu? Plz do help me, im totally new to both Ubuntu and LAMP. Im getting ample info. for XAMP installation. bt, nothin regarding LAMP.
hi, Siva shankari maybe you can read Related Articles - Create a Subdomain Virtual Host on Ubuntu, it teaches you how to actually run PHP code and execute it from browser.
really really helped me .. thank you very much..
regards
rakesh
Wonderful job. Keep it up.. Regards…