How to Install Joomla on Ubuntu 23.10
Joomla is a free and open-source content management system for publishing web content on websites. Web content applications include discussion forums, photo galleries, e-Commerce, and user communities, and numerous other web-based applications.
Update the System,
apt update
apt upgrade
LAMP Stack Configuration
Joomla like any other CMS application, will require a web server with Database running on the system to support it. And since Joomla is built on PHP, we will need to install PHP as well.
Install Apache and PHP
We will now install Apache and PHP and other supporting packages by running the below command,
apt install apache2 libapache2-mod-php openssl php-imagick php-gd php-imap php-intl php-json php-ldap php-mbstring php-mysql php-pgsql php-smbclient php-ssh2 php-sqlite3 php-xml php-zip
Verify apache version using below command,
apache2 -version
Output:
root@ubuntu23:~# apache2 -version
Server version: Apache/2.4.57 (Ubuntu)
Server built: 2023-07-21T21:17:42
Now start and enable the Apache Web server,
systemctl start apache2
systemctl enable apache2
Verify Apache is up and running using below command,
systemctl status apache2
Output:
root@ubuntu23:~# systemctl status apache2
● apache2.service - The Apache HTTP Server
Loaded: loaded (/lib/systemd/system/apache2.service; enabled; preset: enab>
Active: active (running) since Fri 2023-10-20 08:14:53 UTC; 6min ago
Docs: https://httpd.apache.org/docs/2.4/
Main PID: 15570 (apache2)
Tasks: 6 (limit: 2226)
Memory: 20.0M
CPU: 347ms
CGroup: /system.slice/apache2.service
├─15570 /usr/sbin/apache2 -k start
├─15573 /usr/sbin/apache2 -k start
├─15574 /usr/sbin/apache2 -k start
├─15575 /usr/sbin/apache2 -k start
├─15576 /usr/sbin/apache2 -k start
└─15577 /usr/sbin/apache2 -k start
Oct 20 08:14:53 ubuntu23 systemd[1]: Starting apache2.service - The Apache HTTP>
Oct 20 08:14:53 ubuntu23 apachectl[15569]: AH00558: apache2: Could not reliably>
Oct 20 08:14:53 ubuntu23 systemd[1]: Started apache2.service - The Apache HTTP >
Open server IP address on your browser(http://Server_Ip) to see default Apache page.
Note: Replace "Server_Ip" with actual Ip address of the server.
Verify PHP using below command
php -v
Output:
root@ubuntu23:~# php -v
PHP 8.2.10-2ubuntu1 (cli) (built: Sep 5 2023 14:37:47) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.2.10, Copyright (c) Zend Technologies
with Zend OPcache v8.2.10-2ubuntu1, Copyright (c), by Zend Technologies
Install MariaDB
Let us install MariaDB on the server now with the following command,
apt install mariadb-server
MariaDB is not secured by default, As a precaution, we are secure the database engine using below command.
mysql_secure_installation
Create a Joomla Database
Login to MariaDB using the command
mysql -u root -p
Let us configure the Database so Joomla can connect to it and store the data.
For this, we will create a Database, create a User and grant certain Privileges to the User. Refer the below commands for the usecase.
CREATE DATABASE joomla;
GRANT ALL PRIVILEGES ON joomla.* TO 'joomla_user'@'localhost' IDENTIFIED BY 'StrongPassword';
FLUSH PRIVILEGES;
EXIT;
Download and Extract Joomla
Note: At the time of writing this article, Joomla 5 had just been released.
We will now download the latest version of Joomla from the Official site.
Download Joomla in Ubuntu using below command,
wget https://github.com/joomla/joomla-cms/releases/download/5.0.0/Joomla_5.0.0-Stable-Full_Package.zip
Once the download is complete. We need to unzip this to the /var/www/html/
directory. Make the directory called Joomla
.
apt install unzip
mkdir /var/www/html/joomla
Unzip the zipped Joomla file to ‘Joomla’ directory created above.
unzip Joomla_5.0.0-Stable-Full_Package.zip -d /var/www/html/joomla
After unzip, Set the directory ownership of the directory to Apache user and change the permissions using below command,
chown -R www-data:www-data /var/www/html/joomla
chmod -R 755 /var/www/html/joomla
Restart Apache Web server using following command,
systemctl restart apache2
Configuring Apache for Joomla
Configure the Apache webserver to serve Joomla webpages. For this create a virtual host's file for Joomla and name it joomla.conf
,
nano /etc/apache2/sites-available/joomla.conf
Add the following content into the file
<VirtualHost *:80>
ServerAdmin admin@dev.domainhere.info
DocumentRoot /var/www/html/joomla/
ServerName dev.domainhere.info
ServerAlias www.dev.domainhere.info
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
<Directory /var/www/html/joomla/>
Options FollowSymlinks
AllowOverride All
Require all granted
</Directory>
</VirtualHost>
Save and exit the file,
Replace dev.domainhere.info with your actual domain name.
Enable the virtual host file,
a2ensite joomla.conf
a2enmod rewrite
After this Restart Apache Webserver using below command,
systemctl restart apache2
Open your browser to load the site, http://dev.domainhere.info
.
Install SSL Certificate
Let us install the SSL Certificate from Let's Encrypt. For this, you will need to install certbot
via snapd
.
Installing snapd,
apt install snapd
Check the snapd for updates,
snap install core; sudo snap refresh core
Install Certbot
snap install --classic certbot
ln -s /snap/bin/certbot /usr/bin/certbot
Since we're using Apache web server, run the below command to get the certificate,
certbot --apache
The Certbot will take care of your renewal automatically before they expire, you would have to run the certbot again only if you make changes to your configuration. You can perform a test run with below command,
certbot renew --dry-run
Next, reload the page on the browser and it should then redirect and load the HTTPS site https://dev.domainhere.info
.
Joomla Configuration
On the browser, we will configure the remaining aspects of getting our Joomla CMS up and running
Upon loading the domain, you will be prompted with setting up Language and Site Name
Enter the required details such as Username, User Account, Super User Password, and Email Address, and click on Setup Database Connection button
Enter the Database information that was configured earlier,
Enter the username and password which was set earlier,
View of the Dashboard after loggin in,
Done! This concludes the topic of installing latest version of Joomla on Ubuntu 23.10.
CrownCloud - Get a SSD powered KVM VPS at $4.5/month!
Use the code WELCOME
for 10% off!
1 GB RAM / 25 GB SSD / 1 CPU Core / 1 TB Bandwidth per month
Available Locations: LAX | MIA | ATL | FRA | AMS