2

I want to install Joomla on Ubuntu with Apache webserver. How I can do this? What's the correct process?

I installed latest Ubuntu 24.04 after this I watch some video how to install apache2 and it works. But now, I don't know, how to install php and mysql perfectly. After this I want install Joomla but every tutorial is so different and sometimes just don't work.

Can someone tell me how to do this?

sotirov
  • 4,455
  • Joomla's installation is different from Ubuntu packages like Apache2. First make sure you have a website working, i.e. that files you have in your website root folder show up in your browser. Then copy the contents of the Joomla zip file to that root folder. Then visit your website for instructions. You will need to learn a lot in the process. – Jos Apr 28 '24 at 08:47
  • When configuring Apache, PHP, and MySQL for the first time, I recommend the DigitalOcean documentation as it is available in many languages for many versions of Ubuntu. For Joomla, the Ubuntu Community Wiki has a page that shows the basic steps. Joomla is a very complicated system with lots of components so, if you're going to run a Joomla site, it would be a good idea to get some practice with server administration – matigo May 01 '24 at 00:05

1 Answers1

2

Install Apache

sudo apt install apache2

Install and configure MySQL

  1. Install MySQL

    sudo apt install mysql-server
    sudo mysql_secure_installation
    sudo service mysql restart
    
  2. Connect to the server

    sudo mysql -u root
    
  3. Once you're logged in, you can create a new database, a new user and grant privileges. Replace your_database, your_user and your_password with what you want to use.

    CREATE DATABASE your_database;
    CREATE USER 'your_user'@'localhost' IDENTIFIED BY 'your_password';
    GRANT ALL PRIVILEGES ON your_database.* TO 'your_user'@'localhost';
    FLUSH PRIVILEGES;
    EXIT;
    

Install PHP and required modules

Ubuntu 24.04 php package installs php8.3, which is the recommended version by Joomla requirements for Joomla 5.x:

sudo apt install php

Acouring to the Joomla requirements, for Joomla 5.x you need to install these PHP modules - json, simplexml, dom, zlib, gd, mysqlnd or pdo_mysql or pdo_pgsql:

sudo apt install php-json php-xml php-zip php-gd php-mysql
sudo service apache2 restart

Install Joomla

At the time of writing this, the latest version of Joomla is 5.1 and all my examples are for it.

  1. By default your Apache webserver public directory is /var/www/html, so go there and remove the default index.html:

    cd /var/www/html
    sudo rm index.html
    
  2. Download Joomla from https://downloads.joomla.org/:

    cd /var/www/html
    sudo wget https://downloads.joomla.org/cms/joomla5/5-1-0/Joomla_5-1-0-Stable-Full_Package.zip
    
  3. Extract the files. You may need to install unzip.

    sudo apt install unzip
    
    

    cd /var/www/html sudo unzip Joomla_5-1-0-Stable-Full_Package.zip

    sudo rm Joomla_5-1-0-Stable-Full_Package.zip

  4. Change the ownership of /var/www/html.

    sudo chown -R www-data:www-data /var/www/html
    
  5. Finish the installation by opening the Joomla Installer. It should be accessible by opening http://your_server_ip_address/. For example http://192.168.0.244/ if your server IP address is 192.168.0.244.

sotirov
  • 4,455