- Log into the Debian device
- Run the following commands in a terminal:
# update repositories and install any available software updates
sudo apt update
sudo apt upgrade -y
# install Apache HTTPD and MySQL
sudo apt-get install apache2 mariadb-server mariadb-client curl
# install PHP components
sudo apt install php php-mysql php-curl php-gd php-mbstring php-xml php-xmlrpc php-soap php-intl php-zip
# configure the MySQL database
sudo su
mysql_secure_installation - Press Enter to login as root
- Type Y and press Enter to set a root password, type the password twice to confirm
- Type Y and press Enter to remove anonymous users
- Type Y and press Enter to disallow root login remotely
- Type Y and press Enter to remove the test database
- Type Y and press Enter to reload privilege tables
- Run the following command to login into MySQL:
mysql -u root -p
- Authenticate with the root password set earlier
- Run the following commands to create the Joomla! database and database user
CREATE DATABASE joomla DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci;
GRANT ALL ON joomla.* TO 'joomla_rw'@'localhost' IDENTIFIED BY 'J00mla!!';
FLUSH PRIVILEGES;
EXIT;
exit - Continue with the following commands to download and extract Joomla! in the Apache webroot
# download latest joomla version
sudo wget -O joomla.tar.gz https://downloads.joomla.org/cms/joomla3/3-9-24/Joomla_3-9-24-Stable-Full_Package.tar.gz?format=gz
# extract joomla.tar.gz
sudo mkdir /var/www/joomla
sudo tar xzvf joomla.tar.gz --directory /var/www/joomla
# create a new joomla.conf file to configure the site
sudo nano /etc/apache2/sites-available/joomla.conf - Paste the following configuration into joomla.conf
Alias /joomla "/var/www/joomla/"
<Directory /var/www/joomla/>
AllowOverride All
</Directory> - Press CTRL+O, Enter, CTRL+X to write the changes to joomla.conf
- Continue with the following commands to enable the site and restart Apache:
# enable the Joomla site and required PHP modules
sudo a2ensite joomla
sudo a2enmod rewrite
# set the owner of the new joomla directory to www-data
sudo chown -R www-data:www-data /var/www/joomla
# restart apache2 service
sudo systemctl restart apache2 - Open a web browser and navigate to http://DNSorIP/joomla
- The Joomla! setup screen should be displayed
- Set the site title and create an administrative account login > Click the Next button
- Enter the database configuration as follows:
Database Type: MySQLi
Host Name: localhost
Username: joomla_rw
Password: J00mla!!
Database Name: joomla
Table Prefix: jmla_ - Click the Next button
- On the Overview page click the Install button
- Review the configuration and click the Install button
- When the installation completes, copy the output configuration.php and run the following in the terminal window
sudo nano /var/www/joomla/configuration.php
- Paste the copied configuration text
- Press CTRL+O, Enter, CTRL+X to write the changes to configuration.php
- Continue with deleting the installation directory by running the following command
sudo rm /var/www/joomla/installation -r
- Back in the web browser, click on the Site button
- Welcome to your very own, self-hosted Joomla! installation