How to Install Joomla Server on Debian 11 Tutorial (Step by Step)

How to Install Joomla Server on Debian 11. This article will introduce what Joomla Server is with it’s main features and next steps will be to navigate how to install setup Joomla on Debian 11. 

What is Joomla Server?

Joomla is a free, open source, mobile ready and user friendly content management system (CMS) used to build your website. It is written in PHP and uses MySQL/MariaDB as a database backend. It allows you to choose from thousands of features and designs to customize Joomla and extend its functionality. With Joomla server you can build different kinds of websites, blogs and applications on the internet. It is built on a model view controller framework that helps you to build powerful online applications.

Joomla Server Features

  • Content Management.
  • It gives more flexibility for displaying non standard content types.
  • Article Management.
  • User Management.
  • SEO with Joomla you can get full control of site and article meta tags making search engine optimization. 
  • Banner management.
  • Search function.
  • Responsive web design.
  • Scalable MVC structure.
  • Cloud storage API.
  • Valid HTML and CSS.
  • Provides a lot of free and paid extensions and templates.
  • Provides multiple templates which you can use for different pieces of content.
  • Supports multiple languages.
  • Supports 2FA.

Follow this post below for steps how to install the Joomla server on Debian 11.

Install Joomla Server on Debian 11

Install Apache, MariaDB, and PHP

First, you will need to install the Apache web server and MariaDB database server on your server. You can install it using the following command:

				
					apt-get install apache2 mariadb-server -y
				
			

After installing both packages, run the following command to install PHP and other necessary PHP extensions:

				
					apt-get install php libapache2-mod-php php-cli php-mysql php-json php-opcache php-mbstring php-intl php-xml php-gd php-zip php-curl php-xmlrpc wget curl -y
				
			

Next after the installation is to verify the PHP version with the following command:

				
					php -v
				
			

You will get the following output:

				
					PHP 7.4.28 (cli) (built: Feb 17 2022 16:17:19) ( NTS )
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies
    with Zend OPcache v7.4.28, Copyright (c), by Zend Technologies
				
			

Next, edit the php.ini file and change some default settings:

				
					nano /etc/php/7.4/cli/php.ini
				
			

Change the following values:

				
					memory_limit = 256M
upload_max_filesize = 128M
post_max_size = 128M
max_execution_time = 300
output_buffering = Off
date.timezone = UTC
				
			

Save and close the file then start the Apache and MariaDB service with the following command:

				
					systemctl start apache2
systemctl start mariadb
				
			

Now, open your web browser and verify the Apache installation using the URL http://your-server-ip. You should see the Apache test page in the following screen:

The above screenshot confirms that the Apache webserver is installed and working properly.

Create a Database for Joomla

The MariaDB database is not secured by default, and the root password is not set. So it is recommended to secure it by running the mysql_secure_installation script:

				
					mysql_secure_installation
				
			

Answer all the questions to set a MariaDB root password and secure the installation:

				
					Enter current password for root (enter for none): 
OK, successfully used password, moving on...

Set root password? [Y/n] Y
New password: 
Re-enter new password: 
Password updated successfully!

Remove anonymous users? [Y/n] Y
Disallow root login remotely? [Y/n] Y    
Remove test database and access to it? [Y/n] Y
Reload privilege tables now? [Y/n] Y

				
			

Once the MariaDB is secured, connect to the MariaDB shell using the following command:

				
					mysql -u root -p
				
			

Once you are connected, create a database and user for Joomla with the following command:

				
					create database joomla;
create user joomla@localhost identified by 'joomlapassword';
				
			

Next, grant all the privileges to Joomla database with the following command:

				
					grant all on joomla.* to joomla@localhost with grant option;
				
			

Next, reload the privileges and exit from the MariaDB shell with the following command:

				
					flush privileges;
exit;
				
			

Download Joomla Source

First, go to the Joomla website and download the Joomla stable version with the following command:

				
					wget https://downloads.joomla.org/cms/joomla4/4-1-0/Joomla_4-1-0-Stable-Full_Package.tar.gz?format=gz -O Joomla_4-1-0-Stable-Full_Package.tar.gz
				
			

Once the download is completed, create a directory for Joomla and extract the downloaded file to the Joomla directory:

				
					mkdir /var/www/html/joomla
tar -xvzf Joomla_4-1-0-Stable-Full_Package.tar.gz -C /var/www/html/joomla/
				
			

Next, change the ownership and permission of the Joomla directory:

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

Configure Apache to Host Joomla

Following step is to create an Apache virtual host configuration file for Joomla. You can create it using the following command:

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

Add the following lines:

				
					<VirtualHost *:80>
     ServerAdmin admin@exampledomain.com
     DocumentRoot /var/www/html/joomla/
     ServerName joomla.exampledomain.com

     ErrorLog ${APACHE_LOG_DIR}/joomla-error.log
     CustomLog ${APACHE_LOG_DIR}/joomla-access.log combined

     <Directory /var/www/html/joomla/>
            Options FollowSymlinks
            AllowOverride All
            Require all granted
     </Directory>
</VirtualHost>
				
			

Save and close the file, then verify the Apache for any syntax error with the following command:

				
					apachectl -t
				
			

You will get the following output:

				
					Syntax OK
				
			

You have to activate the Joomla virtual host with the following command:

				
					a2ensite joomla.conf
				
			

Finally you have to restart the Apache service to apply the changes:

				
					systemctl restart apache2
				
			

You can check the status of the Apache using the command given below:

				
					systemctl status apache2
				
			

You will get the following output:

				
					● apache2.service - The Apache HTTP Server
     Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor preset: enabled)
     Active: active (running) since Fri 2022-03-11 04:31:48 UTC; 4s ago
       Docs: https://httpd.apache.org/docs/2.4/
    Process: 15510 ExecStart=/usr/sbin/apachectl start (code=exited, status=0/SUCCESS)
   Main PID: 15514 (apache2)
      Tasks: 6 (limit: 2341)
     Memory: 14.8M
        CPU: 83ms
     CGroup: /system.slice/apache2.service
             ├─15514 /usr/sbin/apache2 -k start
             ├─15515 /usr/sbin/apache2 -k start
             ├─15516 /usr/sbin/apache2 -k start
             ├─15517 /usr/sbin/apache2 -k start
             ├─15518 /usr/sbin/apache2 -k start
             └─15519 /usr/sbin/apache2 -k start

Mar 11 04:31:48 debian11 systemd[1]: Starting The Apache HTTP Server...
				
			

Access Joomla Web Interface

Now, open your web browser and access the Joomla web installer using the URL http://joomla.exampledomain.com. You will get the following screen:

Select your language, provide your site name and click on the Setup Login Data. You will get the following screen:

Provide your Joomla admin username, password, email address, and click on the Setup Database Connection. You will get the following screen:

Provide your database credentials and click on the Install Joomla. Once the Joomla has been installed, you will get the following screen:

Click on the Open Administrator. You will get the Joomla login screen:

Provide your Joomla admin user, password and click on the Log in. You will get the Joomla dashboard on the following screen:

Secure Joomla with Let's Encrypt SSL

Next, it is adviseable to install the Let’s Encrypt SSL on the Joomla website. You can install the Certbot Let’s Encrypt client package using the following command:

				
					apt-get install python3-certbot-apache -y
				
			

Once the Certbot package is installed, run the following command to download and install the Let’s Encrypt SSL for your website.

				
					certbot --apache -d joomla.exampledomain.com
				
			

You will be asked to provide your email and accept the term of service as shown below:

				
					Please read the Terms of Service at
https://letsencrypt.org/documents/LE-SA-v1.2-November-15-2017.pdf. You must
agree in order to register with the ACME server at
https://acme-v02.api.letsencrypt.org/directory
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
(A)gree/(C)ancel: A

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Would you be willing to share your email address with the Electronic Frontier
Foundation, a founding partner of the Let's Encrypt project and the non-profit
organization that develops Certbot? We'd like to send you email about our work
encrypting the web, EFF news, campaigns, and ways to support digital freedom.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
(Y)es/(N)o: Y
Plugins selected: Authenticator apache, Installer apache
Obtaining a new certificate
Performing the following challenges:
http-01 challenge for joomla.exampledomain.com
Enabled Apache rewrite module
Waiting for verification...
Cleaning up challenges
Created an SSL vhost at /etc/apache2/sites-available/joomla-le-ssl.conf
Enabled Apache socache_shmcb module
Enabled Apache ssl module
Deploying Certificate to VirtualHost /etc/apache2/sites-available/joomla-le-ssl.conf
Enabling available site: /etc/apache2/sites-available/joomla-le-ssl.conf

				
			

Next, select whether or not to redirect HTTP traffic to HTTPS as shown below:

				
					Please choose whether or not to redirect HTTP traffic to HTTPS, removing HTTP access.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
1: No redirect - Make no further changes to the webserver configuration.
2: Redirect - Make all requests redirect to secure HTTPS access. Choose this for
new sites, or if you're confident your site works on HTTPS. You can undo this
change by editing your web server's configuration.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Select the appropriate number [1-2] then [enter] (press 'c' to cancel): 2

				
			

Type 2 and hit Enter to install the Let’s Encrypt SSL for your website:

				
					Enabled Apache rewrite module
Redirecting vhost in /etc/apache2/sites-enabled/joomla.conf to ssl vhost in /etc/apache2/sites-available/joomla-le-ssl.conf

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Congratulations! You have successfully enabled https://joomla.exampledomain.com

You should test your configuration at:
https://www.ssllabs.com/ssltest/analyze.html?d=open.exampledomain.com
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

IMPORTANT NOTES:
 - Congratulations! Your certificate and chain have been saved at:
   /etc/letsencrypt/live/joomla.exampledomain.com/fullchain.pem
   Your key file has been saved at:
   /etc/letsencrypt/live/open.exampledomain.com/privkey.pem
   Your cert will expire on 2022-06-10. To obtain a new or tweaked
   version of this certificate in the future, simply run certbot again
   with the "certonly" option. To non-interactively renew *all* of
   your certificates, run "certbot renew"
 - If you like Certbot, please consider supporting our work by:

   Donating to ISRG / Let's Encrypt:   https://letsencrypt.org/donate
   Donating to EFF:                    https://eff.org/donate-le

				
			

You have done all the steps, now you can now access your Joomla website securely using the URL https://joomla.exampledomain.com.

Install Joomla Server on Debian 11 Conclusion

The Joomla CMS can be used for small and large dynamic web projects. By using Joomla pros and features you can combine numerous extensions available and your users can create rich content websites as well as powerful web applications and E-commerce components for webstore.

The above post explained how to install Joomla with Apache and Let’s Encrypt SSL on Debian 11. You can now start using Joomla CMS to host a powerful web application on the internet.

Avatar for Hitesh Jethva
Hitesh Jethva

I am a fan of open source technology and have more than 10 years of experience working with Linux and Open Source technologies. I am one of the Linux technical writers for Cloud Infrastructure Services.

5 2 votes
Article Rating
Subscribe
Notify of
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x