To get started, log into the MySQL root (administrative) account by issuing the following command: sudo mysql -u root -p
To create a database, database user, and grant all privileges to the database user run the following commands:
mysql> CREATE DATABASE joomla DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci;
mysql> CREATE USER 'joomlauser'@'%' IDENTIFIED WITH mysql_native_password BY 'your_password';
mysql> GRANT ALL ON joomla.* TO 'joomlauser'@'%';
mysql> FLUSH PRIVILEGES;
mysql> \q
sudo apt update
sudo apt install php libapache2-mod-php php-dev php-bcmath php-intl php-soap php-zip php-curl php-mbstring php-mysql php-gd php-xml
We will now download the latest version of Joomla from the Official site. Use the following command to download Joomla:
sudo wget https://downloads.joomla.org/cms/joomla4/4-1-5/Joomla_4-1-5-Stable-Full_Package.zip
Extract file into the folder /var/www/html/joomla/
with the following command:
sudo apt -y install unzip
sudo unzip Joomla_4-1-5-Stable-Full_Package.zip -d /var/www/html/joomla
Enable permission for the Apache webserver user to access the files:
sudo chown -R www-data:www-data /var/www/html/joomla/
Navigate to /etc/apache2/sites-available
directory and run the following command to create a configuration file for your installation:
sudo nano /etc/apache2/sites-available/joomla.conf
Add the following content:
<VirtualHost *:80>
ServerAdmin webmaster@your-domain.com
ServerName your-domain.com
ServerAlias www.your-domain.com
DocumentRoot /var/www/html/joomla
<Directory /var/www/html/joomla/>
Options FollowSymlinks
AllowOverride All
Require all granted
</Directory>
ErrorLog ${APACHE_LOG_DIR}/your-domain.com_error.log
CustomLog ${APACHE_LOG_DIR}/your-domain.com_access.log combined
</VirtualHost>
Enable the Joomla virtual host: sudo a2ensite joomla.conf
Restart the Apache web server: sudo systemctl restart apache2
Open your browser type your domain e.g http://your-domain.com
and complete the required steps to finish the installation.
Note: Passwords must have at least 12 characters
Enter User, password as created below:
Wait for Joomla to install
Once the Joomla has been installed, you will get the following screen:
Top comments (0)