We’ll show you, How to Install Joomla 3 on Debian 9. Joomla is on of the most popular free and open-source CMS (Content Management System) that allows you to easily create and manage dynamic websites. It is written in PHP, and it can store its data in either MySQL or PostgreSQL database. In this tutorial, we will show you how to install Joomla 3 on Debian 9 using LAMP (Linux, Apache, MariaDB, PHP). Installing Joomla 3 on Debian 9, is easy and should take less then 10 minutes.
1. Getting Started
First, you need to login to your server via SSH as user root:
ssh root@IP_ADDRESS -p PORT_NUMBER
and replace “IP_ADDRESS” and “PORT_NUMBER” with your actual server IP address and SSH port number.
Before we begin with the installation, let’s make sure that your Debian 9 server is up-to-date by running the following commands:
apt-get update apt-get upgrade
2. Install Apache
To install the Apache web server, run the following command:
apt-get install apache2
After the installation is completed, you can enable the service to start automatically upon system boot with:
systemctl enable apache2
To verify that the Apache server is running, you can run the following command:
systemctl status apache2
2. Install PHP 7.0
Next, we will install PHP 7 with some additional PHP modules:
apt-get install php7.0 libapache2-mod-php7.0 php7.0-mysql php7.0-cli php7.0-common php7.0-json php7.0-opcache php7.0-readline php7.0-gd php7.0-mcrypt php7.0-intl php7.0-curl php7.0-zip
3. Install MariaDB
The next step is to install the MariaDB database server. To do this, run the following command:
apt-get install mariadb-server
After the installation is completed, you can start the database server and enable it to automatically start upon boot, with:
systemctl start mariadb systemctl enable mariadb
You can also run the “mysql_secure_installation” script provided by MariaDB in order to secure your installation:
After you have answered all the questions you can now go ahead and login to MariaDB as root using your root password, with the following command:
mysql -u root -p
To create a new database for our Joomla installation, run the following commands:
CREATE DATABASE joomla_db; GRANT ALL PRIVILEGES ON joomla_db.* TO 'joomla_user'@'localhost' IDENTIFIED BY 'PASSWORD'; FLUSH PRIVILEGES; exit;
Make sure to replace “PASSWORD” with an actual, strong password.
4. Install Joomla 3 on Debian 9
Now that your LAMP server is ready, we can finally install Joomla.
You can download the latest stable version with the following command:
Create a new joomla directory inside the Apache document root directory on your server and unpack the archive:
mkdir /var/www/html/joomla unzip Joomla_3-8-3-Stable-Full_Package.zip -d /var/www/html/joomla
Change the ownership of the joomla directory:
chown -R www-data:www-data /var/www/html/joomla
5. Set up Apache Virtual Host
If you want to access your Joomla installation using your own domain name, you will also need to create an Apache virtual host file:
And enter the following content inside this file:
<VirtualHost *:80> ServerAdmin email@example.com DocumentRoot /var/www/html/joomla ServerName yourdomain.com ServerAlias www.yourdomain.com <Directory /var/www/html/joomla> Options FollowSymLinks AllowOverride All Order allow,deny allow from all </Directory> ErrorLog /var/log/apache2/joomla-error_log CustomLog /var/log/apache2/joomla-access_log common </VirtualHost>
6. Enable the Virtual Host File
and do not forget to replace “yourdomain.com” with your own domain name. Finally, you need to enable the virtual host file with:
ln -s /etc/apache2/sites-available/joomla.conf /etc/apache2/sites-enabled/joomla.conf
7. Restart Apache
Restart your Apache with:
systemctl restart apache2
8. Complete the Joomla Installation via Web Browser
That’s it. You can now go to http://yourdomain.com and follow the on-screen instructions to complete the Joomla installation.
Of course, you don’t have to install Joomla 3 on Debian 9, if you use one of our managed VPS hosting services, in which case you can simply ask our expert Linux admins to install Joomla 3 on Debian 9, for you. They are available 24×7 and will take care of your request immediately.
PS. If you liked this post on how to install Joomla 3 on Debian 9, please share it with your friends on the social networks using the buttons on the left or simply leave a reply below. Thanks.