2013-10-21

LAMP is a combination of operating system and open-source software stack. The acronym LAMP is derived from first letters of Linux, Apache HTTP Server, MySQL database, and PHP, Perl or Python. We already have shown you how to install LAMP on many platforms.

In this tutorial, let us install LAMP server on Ubutu 13.10 Server edition. My testbox hostname and IP address are server.unixmen.com and 192.168.1.101/24, respectively.

Install Apache

Apache is an open-source multi-platform web server. It provides a full range of web server features including CGI, SSL and virtual domains.

To install Apache, enter the following command from your terminal:

Test Apache:

Open your web browser and navigate to http://localhost/ or http://server-ip-address/.

Install MySQL

MySQL is a relational database management system (RDBMS) that runs as a server providing multi-user access to a number of databases, though SQLite probably has more total embedded deployments

During installation, you’ll be asked to setup the MySQL root user password. Enter the password and click Ok.

Re-enter the password.

Now MySQL server has been installed.

You can verify the MySQL server status using command:

Sample output:

Note: If you want to use MariaDB instead of MySQL, then follow these steps to install MariaDB on Ubuntu 13.10 server.

Install MariaDB

MariaDB is a drop in replacement for MySQL. It is a robust, scalable and reliable SQL server that comes rich set of enhancements.

First you have to remove existing MySQL packages if any. To completely uninstall MySQL with configuration files, enter the following command:

Run the following command to remove unwanted packages.

Now add MariaDB PPA to install it. MariaDB PPA is not updated yet to Ubuntu 13.10, but it just worked fine using old PPA i.e Ubuntu 13.04.

Run the following commands to add PPA.

Update the software sources list and install MariaDB using following commands:

During installation you will be asked to set mysql ‘root’ user password.

Re-enter password:

You can check the MariaDB version using command:

Sample output:

Check if mariadb is running or not, using the following command:

Sample output:

Install PHP

PHP (recursive acronym for PHP: Hypertext Preprocessor) is a widely used open-source general purpose scripting language that is especially suited for web development and can be embedded into HTML.

Install PHP with following command:

Test PHP

Create a sample “testphp.php” file in Apache document root folder.

Add the following lines.

Restart apache2 service:

Navigate to  http://server-ip-address/testphp.php. It will display all the details about php such as version, build date and commands etc.

If you want to install all php modules, enter the command sudo apt-get install php* and restart the apache2 service. To verify for the modules, open web browser and navigate to http://server-ip-address/testphp.php. You will able to see all php modules.

Manage MySQL Databases (Optional)

Install phpMyAdmin:

phpMyAdmin is a free open-source web interface tool used to manage your MySQL databases. It is available in the Official Debian repositories. So install it with command:

Select the Web server you use, in my case it is apache2.

Select Yes to configure database for phpmyadmin wjth dbconfig-common.

Enter password of the database’s administrative user.

Enter MySQL application password phpmyadmin.

Re-enter the password.

The phpMyAdmin installation has been completed.

Access phpMyAdmin Web Console

Now you can access the phpmyadmin console by navigating to http://server-ip-address/phpmyadmin/ from your browser.

Enter your MySQL username and password which you have given in previous steps. In my case its “root” and “ubuntu”.

You will be redirected to PhpMyAdmin main web interface.

Now you can manage your MySQL databases from phpMyAdmin web interface.

That’s it. Your LAMP server is up and running now.

---------------------------------------------------------------------
Install LAMP Server (Apache, MySQL or MariaDB, PHP) On Ubuntu 13.10 Server

Show more