Skip to main content

How to install Lamp on linux mint 13


LAMP is basically a software bundle made up of open-source softwares ( Linux – Apache – Mysql or Marimba – Php / Perl / Python ) . LAMP refers to the first letters of each component .
This article explains the installation and configuration of LAMP on linux mint 13.

Install LAMP on linux mint 13.

LAMP installation in linux mint 13 is very simple, we can install using a single command .
Press ALT + CTR + T to open terminal.
Step 1 » Update the repository.
krizna@leela:~$ sudo apt-get update
Step 2 » Issue the below command to install apache,mysql and php along with dependencies.
krizna@leela:~$ sudo apt-get install lamp-server^Don’t forget to include ^ [caret symbol] at the end.

Step 3 » During the installation, you will be prompted to create root password to access mysql database. Type your password and complete the installation
Install LAMP linux mint 13Now you have successfully installed LAMP ( Apache , mysql and php ).
Step 4 » Now add the below line to /etc/apache2/httpd.conf file to avoid warning during apache service restart.
ServerName localhost
Step 5 » Restart apache service .
krizna@leela:~$ sudo /etc/init.d/apache2 restart


Now check the installed components one by one.
Apache testing
Step 6 » Open http://localhost or http://youripaddress ( in your browser. you can see the page like below.
Install LAMP linux mint 13
Mysql testing
Step 7 » Type the below command in the terminal and type your mysql root password which is created during the installation.You can login to your mysql database and can see the below things.
krizna@leela ~ $ mysql -u root -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or g.
Your MySQL connection id is 46
Server version: 5.5.32-0ubuntu0.12.04.1 (Ubuntu)
Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
Type 'help;' or 'h' for help. Type 'c' to clear the current input statement.

PHP testing
Step 8 » Create a file /var/www/phpinfo.php and add the below code .

Now open http://localhost/phpinfo.php in your browser. you can see the page like below.
Install LAMP linux mint 13
You can see all the configuration details in that page .

Testing All together

We can test mysql connectivity through php.
Create a file /var/www/dbtest.php and add the below code and replace your dbpassword in that code.

Now open http://localhost/dbtest.php in your browser. you can see the msg “Congrats! connection established successfully” ..
Install LAMP linux mint 13
you did it …
Good luck

  • Mark

    I did not see the httpd.conf in this path /etc/apache2/httpd.conf any ideas?