X
    Categories: Tutorials

How to install Joomla 3 on Ubuntu 14.04

Joomla is a very popular and user friendly free and open source content management system, based on PHP that allows you to easily create and manage a dynamic web site. It is used all over the world to power everything from simple, personal web sites to complex corporate web applications. Joomla has many extensions suitable for different types of websites like social networking web sites, business portals, blogs, e-commerce web sites etc. that will provide the functionality that you may need, without having to build from scratch.
To install Joomla on an Ubuntu VPS follow the very easy steps described below.

This install guide assumes that Apache, MySQL and PHP are already installed and configured on your Linux VPS. At the time of writing this tutorial, the latest stable version of Joomla is 3.4.2 and it requires:

  • PHP >= 5.3.10+ with XML, MySQL and zlib extensions. Also, PHP must have Magic Quotes GPC Off.
  • Apache Web Server >= 2.x+ compiled with mod_rewrite module in order to use search engine friendly URLs.
  • MySQL >= 5.1+ installed on your Linux virtual server.

Download the latest version of Joomla available at http://www.joomla.org/download.html to the server and extract it using the following commands:

cd /root/
wget https://github.com/joomla/joomla-cms/releases/download/3.4.2/Joomla_3.4.2-Stable-Full_Package.zip -O joomla.zip
unzip joomla.zip -d joomla

Joomla requires a database to work as this is where data is saved, so create a new MySQL database on your server:

mysql -u root -p
mysql> CREATE DATABASE joomladb;
mysql> CREATE USER joomlauser@localhost;
mysql> SET PASSWORD FOR 'joomlauser'@'localhost' = PASSWORD("your-password");
mysql> GRANT ALL PRIVILEGES ON joomladb.* TO 'joomlauser'@'localhost' IDENTIFIED BY 'your-password' WITH GRANT OPTION;
mysql> FLUSH PRIVILEGES;
mysql> quit

Create a new virtual host directive in Apache. For example, create a new Apache configuration file named ‘joomla.conf’:

touch /etc/apache2/sites-available/joomla.conf
ln -s /etc/apache2/sites-available/joomla.conf /etc/apache2/sites-enabled/joomla.conf
vi /etc/apache2/sites-available/joomla.conf

then, add the following lines:

<VirtualHost *:80>
   ServerAdmin admin@yourdomain.com
   DocumentRoot /var/www/html/joomla/
   ServerName yourdomain.com
   ServerAlias www.yourdomain.com
      <Directory /var/www/html/joomla/>
          Options FollowSymLinks
          AllowOverride All
      </Directory>
   ErrorLog /var/log/apache2/yourdomain.com-error_log
   CustomLog /var/log/apache2/yourdomain.com-access_log common
</VirtualHost>

Move the Joomla installation files to the document root directory defined in the virtual host directive above:

mv /root/joomla/ /var/www/html/joomla

Edit the ‘/etc/php5/apache2/php.ini’ configuration file and add/modify the following settings:

magic_quotes_gpc = Off
post_max_size=128M
upload_max_filesize=128M
display_errors = Off
html_errors = Off
display_startup_errors = Off
log_errors = On
output_buffering = Off 

The webserver user (www-data) needs to be able to write to files and directories inside the ‘/var/www/joomla’ directory, so it can easily be accomplished by executing the following command:

chown www-data:www-data -R /var/www/html/joomla/

Restart the Apache web server for the changes to take effect:

service apache2 restart

Open http://your-domain.com in your popular web browser and start the installation process: enter the name of your web site, a short description of your web site, your admin user’s email address, username and password, then click ‘Next’. Now you need to set up the database configuration: enter your MySQL username, password and database name, then click ‘Next’. On the next page check if all Joomla requirements are met, then click ‘Install’.

Remove the the installation directory from your server using the ‘Remove installation directory’ button, or run the following command-line command:

rm -rf /var/www/html/joomla/installation/

That is it. The Joomla installation is now complete. You can now log in to the Joomla administrator back-end and start developing your web site.

Of course you don’t have to do any of this if you use one of our Linux VPS Hosting services, in which case you can simply ask our expert Linux admins to install Joomla for you. They are available 24×7 and will take care of your request immediately.

PS. If you liked this post please share it with your friends on the social networks using the buttons on the left or simply leave a reply below. Thanks.