Recent Posts

    How to Install LAMP on Linux Ubuntu



    LAMP is an abbreviation for mentioning Linux, Apache, MySQL and PHP which are open source based web development environments, where Linux is an operating system, Apache as a web server, MySQL as a relational database management system and PHP (Hyper Text Preprocessor) is an object oriented programming language.

    As Linux users maybe colleagues want to know how to install the LAMP. There are many approaches to installing LAMP servers on Linux. The simplest and most frequently used approach is to use the command line in Terminal.

    This tutorial will show you how to easily install a LAMP server on Linux Ubuntu.

    Note:
    This practice uses the Ubuntu 11.04 "Natty Nawhal" distro, whereas to install the LAMP server, first make sure you are connected to the Internet or DVD Ubuntu 11.04 repository.

    The steps are as follows:


    I. Installation

    1. Open Terminal via the menu: Applications → Accessories → Terminal
    2. Type the command below :

    $ sudo apt-get install lamp-server

    3. Enter a new password for the MySQL root user



    II. Testing


    A. Apache

    Test the Apache web server by using your favorite browser application (Firefox, Chrome, etc.) by typing http://127.0.0.1 or http: // localhost at the existing browser address.




    B. PHP

    To find out that the PHP installation and its supporting modules have been successfully integrated with the Apache web server, create a web page through the Terminal in the following way :

    1. sudo echo "<? phpinfo ()?> "> /var/www/phpinfo.php

    2. Restart service apache2

    $ sudo service apache2 restart

    or you can also use the command below:

    $ sudo /etc/init.d/apache2 restart

    3. Open a browser application such as Mozilla Firefox, and enter the address http://127.0.0.1/phpinfo.php or http://localhost/phpinfo.php


    If the browser window displays an information page like in the example image above, then the PHP module has been integrated with the Apache web server.


    C. MySQL

    To test the MySQL database, type the following command in Terminal :

    $ mysql -u root -p




    If the information appears like the example above, it means you have successfully run MySQL.

    Good luck, friends!!


    SUBSCRIBE TO NEW ARTICLE

    0 Response to "How to Install LAMP on Linux Ubuntu"

    Iklan Atas Artikel

    Iklan Tengah Artikel 1

    Iklan Tengah Artikel 2

    Iklan Bawah Artikel