Install LAMP Server (Apache, MySQL or MariaDB, PHP) On Ubuntu 13.10 Server
Last Updated on 05 November 2013
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.
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:
sudo apt-get install apache2
Open your web browser and navigate to http://localhost/ or http://server-ip-address/.
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
sudo apt-get install mysql-server mysql-client
During installation, you’ll be asked to setup the MySQL root user password. Enter the password and click Ok.
You can verify the MySQL server status using command:
sudo service mysql status
mysql start/running, process 3901
Note: If you want to use MariaDB instead of MySQL, then follow these steps to install MariaDB on Ubuntu 13.10 server.
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:
sudo apt-get purge mysql*
Run the following command to remove unwanted packages.
sudo apt-get autoremove
Now add MariaDB PPA to install it.
Run the following commands to add PPA.
sudo apt-get install software-properties-common sudo apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 0xcbcb082a1bb943db sudo add-apt-repository 'deb http://mariadb.biz.net.id//repo/5.5/ubuntu saucy main
Update the software sources list and install MariaDB using following commands:
sudo apt-get update sudo apt-get install mariadb-server mariadb-client
During installation you will be asked to set mysql ‘root’ user password.
Welcome to the MariaDB monitor. Commands end with ; or \g. Your MariaDB connection id is 34 Server version: 5.5.33a-MariaDB-1~raring-log mariadb.org binary distribution Copyright (c) 2000, 2013, Oracle, Monty Program Ab and others. Reading history-file /home/sk/.mysql_history Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
Check if mariadb is running or not, using the following command:
sudo service mysql status
* /usr/bin/mysqladmin Ver 9.0 Distrib 5.5.33a-MariaDB, for debian-linux-gnu on i686 Copyright (c) 2000, 2013, Oracle, Monty Program Ab and others. Server version 5.5.33a-MariaDB-1~raring-log Protocol version 10 Connection Localhost via UNIX socket UNIX socket /var/run/mysqld/mysqld.sock Uptime: 1 min 53 sec Threads: 1 Questions: 550 Slow queries: 0 Opens: 314 Flush tables: 4 Open tables: 22 Queries per second avg: 4.867
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:
sudo apt-get install php5 php5-mysql libapache2-mod-php5
Create a sample “testphp.php” file in Apache document root folder.
sudo nano /var/www/testphp.php
Add the following lines.
<?php phpinfo(); ?>
Restart apache2 service:
sudo service apache2 restart
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)
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:
sudo apt-get install phpmyadmin
Select the Web server you use, in my case it is apache2.
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”.
That’s it. Your LAMP server is up and running now.
Like us on Facebook
This week Top Posts
- Top Things To Do After Installing Ubuntu 13.10 'Saucy Salamander' : Ubuntu 13.10 Saucy Salamander will be released on coming October 17th with many new salient featur...0 comments |
- How To Show Username On Panel In Ubuntu 13.04/13.10 : By default usernames are not displayed on panel in Ubuntu 13.04 and 13.10, In this simple tutorial w...0 comments |
- cowsay And fortune Combined Together : Hi linux geeks! In this article I will teach you a nice trick you can perform in the terminal with ...0 comments |
- How To Upgrade From Ubuntu 13.04 Raring To Ubuntu 13.10 Saucy Salamander : Ubuntu 13.10 Saucy will be released on October 17th. Hope it will come with lot of improvements and ...0 comments |
- Install lamp with 1 command in Ubuntu 12.10, 13.04 Raring Ringtail & LinuxMint13 : Updated: 10/09/2012 :LAMP (Linux, Apache, MySQL and PHP) is an open source Web development platform ...0 comments |
- Install and Configure Samba share in Ubuntu 13.10 'Saucy Salamander' , 13.04| Howto : Updated 05-04-2013: One of the most asked features for Samba is a graphical user interface to help w...0 comments |
- cowsay And fortune Combined Together
- How To Show Username On Panel In Ubuntu 13.04/13.10
- Setup DNS Server On openSUSE 13.1
- TeamViewer 9 Final Has Been Released!
- Twelve Vulnerabilities Have Been Fixed In Ubuntu 12.04, Time To Update
- OpenLDAP Installation and Configuration in Ubuntu 12.10/13.04/13.10 And Debian 6/7
- Configure Your Browser To Use Tor On Ubuntu/Debian/Linux Mint
- Setup A Full Featured ITIL Management System Using Integria IMS On CentOS 6
- Install LibreOffice 4.1.3 in Elementary OS ‘Luna’
- How To Install Simple Scan in Crunchbang ‘Waldorf’
This work by unixmen.com is licensed under a Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported License.
Copyright © 2008-2013 Unixmen.com .