How to install LAMP and phpmyadmin on Ubuntu – set up your home or business LAN server

By Detector | 29 March 2010



If you are using Ubuntu 9.10+ there is easy way to install and configure most of LAMP options with only one terminal command. After that there is step by step illustrated tutorial so installing LAMP on your computer will be real pleasure. You must enter passwords for MySQL and phpmyadmin – for security reasons.

1. Open your terminal and enter:

sudo apt-get install tasksel
sudo tasksel

You will get the command screen like next one:

You can select from the list with your keyboard arrows and space. Select LAMP and press TAB and enter. After installation you must insert root mysql password:

That’s it. You are finished with installation. Let’s check if newly installed server works. Open Firefox and enter “http://localhost/” without quotes. You should get message – It works.

2. Restart apache before next test. In your terminal enter:

sudo /etc/init.d/apache2 restart

3. Next, check your PHP. We will create file test.php on our web folder. Enter in your terminal:

sudo gedit /var/www/test.php

On the newly opened window, enter next line and click save:

<?php phpinfo(); ?>

Go to your browser again and enter http://localhost/test.php You should get a page like this:

4. The final step is installing phpmyadmin for easy database control. In your terminal enter:

sudo apt-get install phpmyadmin

When the phpmyadmin is installed you will get next screen:

Choose Apache, then press TAB and enter. On next few screens you must enter as follows:

1.your administrator password
2.your MySQL password
3.your phpmyadmin password

For easy remembering I enter my root password on all fields. After phpmyadmin is configured, check it in your browser: http://localhost/phpmyadmin You will get the next screen.

To login type:
username: root
password: ******* “your root password set before”

If you use PHP, you may need cURL, a most popular extension. PHP CURL functions are available through the use of libcurl, and allow you to connect and communicate with web servers using many different types of protocols. Simply – open your terminal and copy/paste next code:

sudo apt-get install curl libcurl3 libcurl3-dev php5-curl php5-mcrypt

Next you need to restart apache and you are set.

sudo /etc/init.d/apache2 restart

You have now installed LAMP, phpmyadmin and cURL and you are ready to rock. If you need Zend optimizer and ionCube installation follow this DetectorPRO tutorial. Also you have set up your local home or business server. For Internet server you need to do few more things – not covered with this tutorial. If you have 2 or more computers over LAN – for example Desktop-Server (installed Ubuntu and LAMP) and laptop/notebook, and you want to check your web pages on your Desktop-Server, just point your laptop/notebook browser address to you Server IP address (check your IP with right click on panel network connections / connection information). And there it is, It Works message. Have fun testing and using it.

Tags | , , , , , , ,

| |

3 Responses to “How to install LAMP and phpmyadmin on Ubuntu – set up your home or business LAN server”

  1. Anonymous says:

    Thanks, thanks, excellent!!!

  2. Anonymous says:

    Very useful walkthrough.

    Do you know of any links that teach how to do the "few more things" to set up an internet server?

  3. mech says:

    very guide in teach us how to install LAMP and phpmyadmin on Ubuntu.

    thank man






Archives

Add to Technorati Favorites
website stats
TwitterCounter for @ukion