Installing LAMP stack in Ubuntu

Posted on Tuesday, December 10, 2013
Installing LAMP stack in Ubuntu

In today’s world websites and web applications are one of the most common things we interact in our lives. LAMP stack is one of the technologies combinations the run behind the scenes. LAMP stack play major roll in development of great websites or web applications.  LAMP stack is a bundle of open source software used to create one of the powerful web servers. The acronym stands for Linux, Apache, MySQL, and PHP. Diagram for LAMP stack:

There are two ways to install LAMP stack in ubuntu :

Installing each package individually :

For installing each package individually follow the following steps:

First of all install Apache web-server, generally recognized as the world's most popular Web server by executing this command to your terminal. For our example we are using latest Apache2.

sudo apt-get install apache2

 

Time to test open your browser and hit the following URL you will see a message saying "It works!”

localhost/

 

Second install PHP open source general-purpose scripting language that is especially suited for web development and can be embedded into HTML. For our example we are using latest version of PHP i.e. PHP5

sudo apt-get install php5 libapache2-mod-php5

 

For connecting Apache2 and PHP5 we also install libraries in above command. After this restart your Apache2 services by following command.

sudo /etc/init.d/apache2 restart

 

Time to test create file with info.php name in your /var/www/ directory and write the following code in it.

Creating file:

sudo gedit /var/www/info.php

<?php<!--?php phpinfo(); ?-->?>

Save the file. Now open your browser and hit following URL to see given page.

localhost/info.php

 

Third it’s time for our MySQL world's second most widely used open-source relational database management system. Execute the following command to you terminal.

sudo apt-get install mysql-server

 

For connecting MySQL and PHP5 we need to install libraries by executing following command.

sudo apt-get install php5-mysql

 

Again we have to restart our Apache2 web-server by following command.

sudo /etc/init.d/apache2 restart

 

You can also install User interface of MySQL by executing following command to your terminal.

sudo apt-get install phpmyadmin

 

Time to test hit following URL to your browser and see the given page.

localhost/phpmyadmin

 

Now we have completed our installation of LAMP stack.

Installing complete package in one go:

For installing complete package in one go follow the following steps:

First we need to install a ubuntu’s tasksel tool which is used for installing multiple related packages as a co-ordinate "task" onto your system. For installing tasksel execute following command to you terminal.

sudo apt-get install tasksel

 

Second time for LAMP stack in one go execute following command.

sudo tasksel install lamp-server

 

Now we get our completed LAMP stack in two steps.

Tags

Comments

Jessica (not verified)

Wednesday, March 22, 2017

Exceptional custom dissertation writing carrier in online
on line have a many writing services this service to offer for accurate and pleasant of essay papers can be provided. in which types of essay papers you want you put the order into that writing service they may provide some sample papers you have to selected for which forms of essays you want your essays structure you want this all info will furnished that creator they may create to your paper. And you may immediately verbal exchange for author this facility we will arranged for you.

And the writers can get your personal ideas you have any thoughts on your essay or a thesis papers provide your mind for writers they may write on your thesis paper or an essay papers. Custom dissertation writing provider that is one of the most famous writing service in on-line many students are get papers in this writing service.

In case you need any papers we can provided in our service absolutely plagiarism loose, being a custom essay writing provider, we write papers from scratch. In our writers strictly comply with your commands to create an ideal custom essay papers.

dissertation writing service alternatives up only qualified personnel in order which will experience of first-class dealing with us. Becoming an author for our firm may be very tough, the once who get well-known for cream of industry. And one shall for positive gain by means of ordering his papers from the satisfactory scribes.

Add new comment

Restricted HTML

  • Allowed HTML tags: <a href hreflang> <em> <strong> <cite> <blockquote cite> <code> <ul type> <ol start type> <li> <dl> <dt> <dd> <h2 id> <h3 id> <h4 id> <h5 id> <h6 id>
  • Lines and paragraphs break automatically.
  • Web page addresses and email addresses turn into links automatically.
CAPTCHA
This question is for testing whether or not you are a human visitor and to prevent automated spam submissions.