Install and configure Joomla on your LAMP server - Ubuntu

Difficulty: 1
Time: 10 minutes

Joomla is an open source content management system (CMS) that helps you build websites and online applications. Joomla is a flexible platform boasting more than 10,000 addons, used for sites of all types - ranging from simple blogs to large-scale business sites. Currently the 2nd most popular CMS in the industry, Joomla sits on top of a robust PHP codebase that is used with a backend database such as MySQL.

Install LAMP

To use this article, you need to have a LAMP stack installed on your server.

We also recommend setting up an Apache virtual host for the domain name you want to use, which includes pointing your domain name to it.

Server Setup

Before you can install Joomla, there are a few things you need to do to prep your server.

Install Git and PHP extensions

  1. Update your server's software:
    sudo apt-get update
  2. Install Git:
    sudo apt-get install git php5-mysql
  3. Make sure Apache and MySQL are running:
    sudo service apache2 start
    sudo service mysql start

Download Joomla to your web root

  1. Navigate to your virtual host directory for the domain name:
    cd your domain's Apache virtual host directory

    Note: If you didn't set up a virtual host directory, you can use cd /var/www/html

  2. Download Joomla:
    sudo git clone -b master
    This command will automatically download to the joomla-cms directory
  3. Use mv to move these files to your web root:
    sudo mv joomla-cms/* /your domain's Apache virtual host directory
  4. Change directory permissions of your Apache web root so that it can properly run the install:
    sudo chown -R www-data:www-data your domain's Apache virtual host directory

Set up the MySQL database

Next, we will set up the MySQL database, username, and password that you will use with your Joomla application. Make sure you note them because Joomla requires you to enter the credentials to complete the installation.

  1. Login to MySQL:
    sudo mysql -u root -p
  2. When prompted, enter the MySQL root password that you set during the MySQL installation.
  3. Create a new MySQL database:
    CREATE DATABASE your joomla database;
  4. Create a new MySQL user:
    CREATE USER your joomla user@localhost;
  5. Set the password for this user:
    SET PASSWORD FOR your joomla user@localhost= PASSWORD(your joomla password);
  6. Grant all privileges to this new user:
    GRANT ALL PRIVILEGES ON your joomla database.* TO your joomla user@localhost IDENTIFIED BY 'your joomla password';
  7. Confirm that the changes to this user are properly applied:
    your joomla user@localhost;
    If the changes worked, you should see output that looks something like this:
    GRANT USAGE ON *.* TO 'joomlauser'@'localhost' IDENTIFIED BY PASSWORD '*36F5DACB9CB45B4C150F4DCDCAF9A50D5A1C2D07'
    GRANT ALL PRIVILEGES ON `joomla`.* TO 'joomlauser'@'localhost'
    If the changes did not apply properly, refresh the MySQL cache and try again:
  8. Once you confirm that the changes worked, exit MySQL:

Configure Apache and PHP

Now that we have the database set up, the last thing we need to do before installing Joomla is tweak the Apache and PHP configuration to optimize it for Joomla.

  1. Open your php.ini file:
    sudo vim /etc/php5/apache2/php.ini
  2. Uncomment the following line by removing the ; from the beginning of the line:
  3. Change the output_buffering value from 4096 to Off:
    output_buffering = Off
    Joomla recommends disabling PHP output buffering for better performance.
  4. Save and close the file:
  5. Restart Apache:
    sudo service apache2 restart

Install Joomla

You are now ready to use your browser to install Joomla.

  1. In your browser, navigate to http://your domain name or IP address. You will see the Joomla installation page.
  2. Enter the Main Configuration information for your website. This will include the administrator login credentials you want to use for running Joomla. Once all this information has been entered, click Next.
  3. Enter the Database configuration details. These are the MySQL credentials you created earlier in the guide. For the Database Type, use MySQLi. Once all information has been entered, click Next.
  4. Choose a Sample Data option. If you are an experienced developer, you may simply wish to use the bare framework. If you are learning to use the Joomla platform, you will probably want to use either the Learn Joomla English or Default English options.
  5. Once you have selected and confirmed all other final options, click Install
  6. Joomla will finish installing; it usually only takes a matter of seconds.
  7. Once this is finished, click Remove Installation Folder. This must be done before you will be able to use Joomla.

Joomla is now finished installing! You can log in to your administrator page by navigating to http://your domain name or IP address/administrator, and using the admin credentials you created during the install.

Next steps

Now that you have finished setting up your Joomla application, you should take a look at some of the starter guides at Joomla boasts and extensive community site and knowledge base to help you find the answers you need for both site development and ongoing administration.

Var den här artikeln till hjälp?
Tack för din feedback. Ring vårt supportnummer eller starta chattalternativet ovan om du vill prata med en medarbetare på kundtjänst.
Vi är glada att vi kunde hjälpa till! Finns det något mer vi kan göra för dig?
Det var tråkigt att höra. Berätta vad som var krångligt eller varför lösningen inte hjälpte dig med problemet.