Vous êtes sur la page 1sur 8

how to install LAMP Apache, MySQL & PHP on...

http://blog.sudobits.com/2011/10/28/how-to-install...

Home Ubuntu Ubuntu 11.10 Ubuntu 11.04 Ubuntu 10.10 Ubuntu Themes Ubuntu wallpapers Linux Mint Applications Desktop GNOME KDE Multimedia Security Web Browsers Chrome Firefox News Tips and Tricks Programming Contact Us About Sudobits Blog | Open Source
UserGate Mail Server v2 Email management for SMB users Gateway antispam and antivirus www.entensys.com Online Trading Account @ Zero Account opening charges* with ICICIdirect.com *T&C apply. www.icicidirect.com/zeroacopening Resell SSL Certificates Competitive pricing, top quality products and convenient API www.thawte.com

how to install LAMP Apache, MySQL & PHP on Ubuntu 11.10


by Ramesh Jha on 2011/10/28 Ubuntu has become popular not only among desktop users but also among the web developers who uses Linux distribution to deploy their web application (on a VPS or dedicated host), although they preferred to use LTS (Long Term Support typically of ve years for Server Edition) version rather than a regular stable release because of obvious advantages increased stability (Although, from the

1 of 8

Monday 21 November 2011 10:40 PM

how to install LAMP Apache, MySQL & PHP on...

http://blog.sudobits.com/2011/10/28/how-to-install...

next release i.e Ubuntu 12.04 LTS, Desktop version will also get 5 years of support). Despite of that fact, a lot of users/developers also use Apache server on their localhost for testing/development (e.g wordpress developers use it) and this post is written for those who want to get started with Apache, PHP MySQL, phpMyAdmin , etc with Ubuntu 11.10. Apache is the most popular web server on this planet (total share is above 65%). It is an open source and cross-platform web server. Apache supports a lot of server side language and the features is extensible using modules. PHP dominates the web scripting world and MySQL is the most popular open source database. Most of the websites (including the blog youre reading right now) are based on the great combination of Linux, Apache, MySQL and PHP (Commonly called as LAMP). Setup LAMP in Ubuntu 11.10

step 1. Installing Apache

Open terminal (press Ctrl+Alt+t) and execute the command sudo apt-get install apache2

The above command will install some default modules, packages and libraries but you later install the ones you need. When installation is completed, type the address http://localhost in the browser address bar and you will get a default apache page like this -

2 of 8

Monday 21 November 2011 10:40 PM

how to install LAMP Apache, MySQL & PHP on...

http://blog.sudobits.com/2011/10/28/how-to-install...

step 2. Installing MySQL


Execute the command sudo apt-get install mysql-server

and enter the root password during installation procedure. Ive already covered a post in detail about how to install MySQL on Ubuntu 11.10.

step 3. Installing PHP


Execute the command sudo apt-get install php5 libapache2-mod-php5 php5-mysql

Then restart the Apache server to load php modules sudo /etc/init.d/apache2 restart

To test whether the PHP 5 has been successfully installed or not, create a le phpinfo.php and copy the following content (to the le) <?php print_r (phpinfo()); ?>

and put the le in root web directory (/var/www). Then open the address http://localhost/phpinfo.php, then it should display the php conguration details like this -

3 of 8

Monday 21 November 2011 10:40 PM

how to install LAMP Apache, MySQL & PHP on...

http://blog.sudobits.com/2011/10/28/how-to-install...

Thats All.. Linux (Ubuntu is itself a Linux based OS), Apache, MySQL and PHP i.e all the components of LAMP has been installed successfully. To manage MySQL database from a GUI, You may like to install phpMyAdmin The MySQL web administration tool, a great application for managing creating and maintaining MySQL database. How to install phpMyAdmin on Ubuntu 11.10 ? just execute the command sudo apt-get install phpmyadmin

When the installation is complete, move on to http://localhost/phpmyadmin and login (using the MySQL login username(default is root) and the password (you entered during installation)) to start using it.

Want to learn web server administration (with LAMP) on Ubuntu Server ?


Having apache, MySQL, PHP installed locally on your system is good for learning about the server administration and other cool/great stus related to Linux but VPS is very cheap these days so you may want to try Ubuntu (with Apache or other web server) on a VPS for much better (and real) experience Ive been using Linode VPS @ $19.95/month (512 MB RAM, 20 GB space and 200GB bandwidth) for a while, and I am loving it.

Related Articles
how to install webmin on ubuntu 10.04 server PHP 5.3.8 Released! Download it Now!! install apache in ubuntu 10.04 how to install MySQL server on Ubuntu 11.10 how to install MySQL on ubuntu 10.10 How to install PHP in Ubuntu 10.04 How to Install MySQL in Ubuntu 10.04
4 of 8 Monday 21 November 2011 10:40 PM

how to install LAMP Apache, MySQL & PHP on...

http://blog.sudobits.com/2011/10/28/how-to-install...

how to install phpmyadmin on ubuntu 11.04/10.10 How to install MySQL on Ubuntu 11.04 Tagged as: apache, LAMP mysql, php, web server ,
Like

and 2 others liked this. Login

Add New Comment


Please wait

Showing 7 comments
Hyubs Ursua

Sort by popular now

If your phpmyadmin doesn't work, open apache.conf: sudo gedit /etc/apache2/httpd.conf Type the following: Include /etc/phpmyadmin/apache.conf Note: My httpd.conf was blank from fresh install so don't be alarmed. Update: Forgot to tell that you need to restart your Apache after: sudo /etc/init.d/apache2 restart or sudo service apache2 restart

tenleftngers

Thank you! Most other blogs omit this step.

5 of 8

Monday 21 November 2011 10:40 PM

how to install LAMP Apache, MySQL & PHP on...

http://blog.sudobits.com/2011/10/28/how-to-install...

iSWORD

This should be added to the original post, because it's required every time. apache isn't congured to be used with phpmyadmin by default.

andrew

Thanks, great post.

Danny Crossley

Great, nice and easy.

Martin Redola

Only one command is necessary: sudo apt-get install lamp-server^

Giulio Giraldi

Thanks for the tutorial, when I run sudo apt-get install php5 libapache2-mod-php5 php5-mysql the version of PHP I get installed is 5.3.2-1ubuntu4.10 I could really make use of a newer version (5.3.2 has a bug that aects Mediawiki), how did you get that installed? thanks, Giulio

6 of 8

Monday 21 November 2011 10:40 PM

how to install LAMP Apache, MySQL & PHP on...

http://blog.sudobits.com/2011/10/28/how-to-install...

M Subscribe by email S RSS

Trackback URL

http://blog.sudobits.com/2011/10/28/how-to-install-

Previous post: How to install Ruby on Rails in Ubuntu 11.10 Next post: Best Applications and Tweaks for Ubuntu 11.10
Search

meet the author

Ramesh Jha is an open source ( in fact, open * ) enthusiast, Blogger and Programmer from Bihar, India. Read More

make it viral
3

Get Free updates


Your Email Address

Subscribe
Recent Posts
Ubuntu 11.10 or Linux Mint 11 ? Ruby Programming with Ubuntu 11.10 Firefox 8 Released! Download it Now! jQuery 1.7 released with a lot of new features OpenBSD 5.0 is released! Best Linux distribution for an old Computer Best Applications and Tweaks for Ubuntu 11.10 how to install LAMP Apache, MySQL & PHP on Ubuntu 11.10

7 of 8

Monday 21 November 2011 10:40 PM

how to install LAMP Apache, MySQL & PHP on...

http://blog.sudobits.com/2011/10/28/how-to-install...

Tips 'n' Tricks


Best Applications and Tweaks for Ubuntu 11.10 Top 10 Tips and Tricks for Ubuntu 11.10 Top 10 GNOME Shell Keyboard Shortcuts how to change Login screen in Ubuntu 11.10 how to backup Ubuntu 11.10 best laptop for Ubuntu how to download YouTube videos in Ubuntu 11.10 How to install Ubuntu 11.10 : From USB Drive or CD 10 things to do after installing Ubuntu 11.10 How to Login as root in Ubuntu 11.10

Archives

Select Month

2011-2013 sudoBits.COM | All Rights Reserved. | Privacy Policy | Sitemap | Feedback Contents of this blog can not be reproduced without the written permission from Ramesh Jha (My Bio)

8 of 8

Monday 21 November 2011 10:40 PM

Vous aimerez peut-être aussi