Here’s How to Install Joomla with Apache on Debian 9

The world’s most popular and widely supported Open that can be used to build, organize, manage and publish content for websites, blogs, Intranets and mobile applications. It is written in PHP, uses object-oriented programming techniques and stores data in MySQL or PostgreSQL.

Here, we will learn how to install and configure Joomla on Debian 9.

Install Apache

sudo apt-get install apache2 libapache2-mod-php7.0 –y

Install php7

sudo apt-get install php7.0 php7.0-cli php7.0-mcrypt php7.0-intl php7.0-mysql php7.0-curl php7.0-gd php7.0-soap php7.0-xml php7.0-zip php7.0-readline php7.0-opcache php7.0-json php7.0-gd –y

Change to sudo nano /etc/php/7.0/apache2/php.ini as follows :

memory_limit = 256M
upload_max_filesize = 32M
post_max_size = 32M
date.timezone = Asia/Kolkata

Install and configure MariaDB

sudo apt-get install mariadb-server –y

After installing MariaDB, run MariaDB and enable it with the following command:

sudo systemctl start mysql
sudo systemctl enable mysql

You need to create a database for Joomla.

First, login to the MariaDB shell with the following command:

mysql -u root -p

Enter your root password, then create a database for Joomla with the following command:

MariaDB [(none)]> CREATE DATABASE joomla_db;

Next, create a user for Joomla and set a password with the following command:

MariaDB [(none)]> CREATE USER [email protected];
MariaDB [(none)]> SET PASSWORD FOR 'joomla'@'localhost' = PASSWORD("password");


you need to grant privileges to the joomla db with the following command:

MariaDB [(none)]> GRANT ALL PRIVILEGES ON joomla_db.* TO 'joomla'@'localhost' IDENTIFIED BY 'password' WITH GRANT OPTION;


Finally, exit the MariaDB shell with the following command:

MariaDB [(none)]> exit;

Install Joomla

To install Joomla, you need to download the latest version of Joomla. You can download it from the Git repository with the following command:


Once Joomla is downloaded, extract the downloaded archive to the Apache web root directory with the following command:


mkdir /var/www/html/joomla sudo tar -xvzf Joomla_3.7.3-rc1-Release_Candidate-Full_Package.tar.gz -C /var/www/html/joomla

Next, change the ownership of the joomla directory and give it proper permissions with the following command:

sudo chown -R www-data:www-data /var/www/html/joomla
sudo chmod -R 777 /var/www/html/joomla

Next, you need to create an Apache virtualhost file for Joomla. You can do this by creating a joomla.conf file in the /etc/apache2/sites-available/ directory:


nano /etc/apache2/sites-available/joomla.conf

Add the following line:

<VirtualHost *:80>

ServerAdmin [email protected]
DirectoryIndex index.php
DocumentRoot /var/www/html/joomla
<Directory /var/www/html/joomla>
Options FollowSymLinks
AllowOverride All
Order allow,deny
allow from all
ErrorLog /var/log/apache2/joomla-error_log
CustomLog /var/log/apache2/joomla-access_log common


Simpan dan tutup

Next, you need to disable the default virtualhost file and enable the Joomla virtualhost file. You can do this with the following command:

sudo a2dissite 000-default
sudo a2ensite joomla

Finally, reload apache to see the result

sudo systemctl restart apache2

Create by Ipadguides in category of Website