Вы находитесь на странице: 1из 6

How To Install LAMP On Ubuntu 12.

04 | n00bs on Ubuntu

1 of 6

http://www.n00bsonubuntu.net/content/how-to-install-lamp-...

Home
Ubuntu
Applications
Games
Games
PlayDeb
S2 Games
Games On Wine
Internet
Chromium Browser
Evolution Mail
Filezilla
Firefox
Gwibber
Liferea
Office
LibreOffice
Sound & Video
Amarok
Banshee
Clementine
DeaDBeeF
Enna
Foobnix
Guayadeque
Kazam Screencaster
OpenShot
PiTiVi
VLC
XBMC
Xnoise
Wine
Eyecandy
GDM
Compiz
Themes
Plymouth
Scripts
Gallery
Ubuntu Gallery
Nightflys Gallery
Sexy Ubuntu
Gallery
By continuing to use the site, you agree to the use of cookies. more information
Ubuntu Desktop Wallpapers

Accept

Tuesday 07 August 2012 07:49 AM

How To Install LAMP On Ubuntu 12.04 | n00bs on Ubuntu

2 of 6

http://www.n00bsonubuntu.net/content/how-to-install-lamp-...

Recently Viewed
Hello I Am Back!
Vice, a Commodore 64 Emulator.
How To Install Ubuntu Tweak On Ubuntu 12.04
Install Drupal 6 On LAMP Server Ubuntu 10.04 LTS Lucid Lynx
Banshee 1.8.1 Released

Recent Comments
MediaServer on Vice, a Commodore 64 Emulator.
tinuz on How To Install Compiz And Enable Effects On Ubuntu 12.04
amit on How To Install Compiz And Enable Effects On Ubuntu 12.04
tinuz on Hello I Am Back!
bob on Hello I Am Back!
@n00bsonubuntu

Join the conversation


By continuing to use the site, you agree to the use of cookies. more information

Accept

How To Install LAMP On Ubuntu 12.04


Tuesday 07 August 2012 07:49 AM

How To Install LAMP On Ubuntu 12.04 | n00bs on Ubuntu

3 of 6

http://www.n00bsonubuntu.net/content/how-to-install-lamp-...

Author tinuz
Here is a guide to install LAMP on Ubuntu 12.04. LAMP stands for Linux, Apache, MySQL,
php (and/or Perl). When LAMP is installed you have all the needed packages on your system
to run a web server on your system.

To install LAMP open a terminal window (press Ctrl+Alt+T) and copy the following line:
sudo apt-get install lamp-server^

During the installation you will be asked to set a password for the root user for MySQL. Enter
the password you want to use for MySQL (dont leave it blank). Enter the same pasword to
confirm the used password and wait for the installer to finish installing the packages.
After installing the LAMP packages you need to test it, open your internet browser and enter
the following address:
http://localhost/

You should get a page with the following text:


It Works!

After testing the Apache web server works, you need to test your php installation. To do that
you need to create a file in /var/www called testing.php. To create the file copy+paste the
following line in your terminal window:
echo "<?php phpinfo(); ?>" | sudo tee /var/www/testing.php

By continuing to use the site, you agree to the use of cookies. more information

Accept

Go back to your web browser and enter the address http://localhost/testing.php/ and you

Tuesday 07 August 2012 07:49 AM

How To Install LAMP On Ubuntu 12.04 | n00bs on Ubuntu

4 of 6

http://www.n00bsonubuntu.net/content/how-to-install-lamp-...

should see a page displaying information about your php installation.


Now we are going to install phpMyAdmin which is an easy tool to create and/or edit your
databases. To install phpMyAdmin copy+paste the following line into your terminal window:
sudo apt-get install libapache2-mod-auth-mysql php5-mysql phpmyadmin

You will be asked if you want to continue and install the files press y key and then press
Enter. In the next step you will be asked to configere phpMyAdmin, its not a difficult task all
you have to do is to select apache2 and when asked if you want configure the database using
the dbconfig-common select OK unless you want to configure the database manually.
In the next step you will be asked to provide the password from the administrative account
to create a MySQL database and/or user. Use the same password you created when
configuring the MySQL package.
Now you will be asked to create a new password for the database administrative user to
connect to your phpmyadmin panel. Fill in a password and repeat it to confirm the
password. Now you are done all you have to do now is restart Apache, in your Terminal
window copy+paste the following line:
sudo /etc/init.d/apache2 restart

To create a database open your web browser and enter the following url:
http://localhost/phpmyadmin/

Username is root and the password is the password you created to login to phpmyadmin
now you can create or change a database.
When LAMP is installed and you want to login to http://localhost/phpmyadmin/ and you get
this error message:
Not Found
The requested URL /phpmyadmin/ was not found on this server.
Apache/2.2.17 (Ubuntu) Server at localhost Port 80
Open a terminal window and use the following commands to fix the problem:
sudo ln -s /etc/phpmyadmin/apache.conf /etc/apache2/conf.d/phpmyadmin.conf
sudo /etc/init.d/apache2 reload

Now you are finished with the installation of LAMP on your system and all there is to do is to
download, drupal, joomla or wordpress and extract it to the /var/www/ folder, create a
database and connect to the setup/installation page of your chosen cms. To connect to your
LAMP server youByneed
to enter:
continuing
to use the site, you agree to the use of cookies. more information
Accept
http://localhost/

Tuesday 07 August 2012 07:49 AM

How To Install LAMP On Ubuntu 12.04 | n00bs on Ubuntu

5 of 6

http://www.n00bsonubuntu.net/content/how-to-install-lamp-...

If you are in a network with more than 1 system and you want to connect to the site you just
installed you need to use the ip address of the system you installed LAMP on.
Views:11658
Share on:

[Translate]
Posted in Lamp, X-Slider | Tags: 12.04, apache, install, lamp, linux, mysql, phpmyadmin,
server, ubuntu
How To Install Ubuntu Tweak On Ubuntu 12.04
Ubuntu 12.10 Quantal Quetzal Alpha 1 Is Released

3 Responses to How To Install LAMP On Ubuntu 12.04


Sami:
28/05/2012 at 13:45
Hi, after I complete installing I have a problem.. I cannot access the files I am
working on in my www folder on localhost. Can you help me with that please? or Do I
need to do something else? Thanks.
[Translate]
Reply
Anderson Ren:
11/06/2012 at 04:39
Sami, try the command line below at your Terminal
$ sudo chown user.user -R /var/www
where user.user is your user name to login
I hope it helps you.
[Translate]
Reply
Anderson Ren:
11/06/2012 at 04:16
Hello, thanks for the post
it helped a lot
[Translate]
Reply

By continuing to use the site, you agree to the use of cookies. more information

Accept

Tuesday 07 August 2012 07:49 AM

How To Install LAMP On Ubuntu 12.04 | n00bs on Ubuntu

6 of 6

http://www.n00bsonubuntu.net/content/how-to-install-lamp-...

Leave a Reply
Name (required)

Mail (will not be published) (required)

Website

Submit Comment
Notify me of follow-up comments by email.
Notify me of new posts by email.

Who's Online
8 visitors online now
8 guests, 0 members
Map of Visitors
Search

Artificial intelligence is no match for natural stupidity

By continuing to use the site, you agree to the use of cookies. more information

Accept

Tuesday 07 August 2012 07:49 AM