{"id":7580,"date":"2021-01-09T12:47:44","date_gmt":"2021-01-09T09:47:44","guid":{"rendered":"https:\/\/kifarunix.com\/?p=7580"},"modified":"2024-03-19T21:00:42","modified_gmt":"2024-03-19T18:00:42","slug":"easily-install-joomla-on-ubuntu","status":"publish","type":"post","link":"https:\/\/kifarunix.com\/easily-install-joomla-on-ubuntu\/","title":{"rendered":"Easily Install Joomla on Ubuntu 20.04|Ubuntu 18.04"},"content":{"rendered":"\n

In this tutorial, you will learn how to quickly and easily install Joomla on Ubuntu 20.04|Ubuntu 18.04 systems. Joomla<\/a> also spelled as Joomla!, is free and Open Source software, Content Management System (CMS) which enables you to build websites and powerful online applications.<\/p>\n\n\n\n

You can read more about Joomla! benefits and core features on Joomla! benefits and core features page<\/a>.<\/p>\n\n\n\n

Installing Joomla on Ubuntu 20.04\/18.04<\/h2>\n\n\n\n

Prerequisites<\/h3>\n\n\n\n

Joomla is PHP based and as always, you definitely need a LAMP\/LEMP stack installed on your Ubuntu 20.04 or Ubuntu 18.04 before you can run Joomla! software. Follow any of the guides below to install either LAMP or LEMP stack.<\/p>\n\n\n\n

Install LAMP Stack on Ubuntu 20.04<\/a><\/p>\n\n\n\n

How to Install LAMP Stack on Ubuntu 18.04 LTS<\/a><\/p>\n\n\n\n

Install and Setup LEMP Stack on Ubuntu 20.04<\/a><\/p>\n\n\n\n

How To Setup LEMP Stack on Ubuntu 18.04<\/a><\/p>\n\n\n\n

Read more on the Joomla! Technical requirements page<\/a>.<\/p>\n\n\n\n

Note, if you want to install PHP 7.4 on Ubuntu 18.04 (default repos provide PHP 7.2), simply install Ondrej third-party PHP PPA repos;<\/p>\n\n\n\n

apt install software-properties-common<\/code><\/pre>\n\n\n\n
add-apt-repository ppa:ondrej\/php --yes<\/code><\/pre>\n\n\n\n

Once you install this repo, then you can be able install PHP 7.3 or PHP 7.4 on Ubuntu 18.04.<\/p>\n\n\n\n

Install Joomla<\/h3>\n\n\n\n

Assuming you have already setup LAMP\/LEMP stack depending on your setup preferences, proceed to install Joomla! on Ubuntu 20.04|Ubuntu 18.04.<\/p>\n\n\n\n

Create Joomla Database and Database User<\/h4>\n\n\n\n

Joomla! CMS requires a database requires a database for storing data such as articles, menus, categories, and users. If you are using MariaDB or MySQL database, proceed as follows;<\/p>\n\n\n\n

Login to MySQL\/MariaDB;<\/p>\n\n\n\n

mysql<\/code><\/pre>\n\n\n\n

Or<\/p>\n\n\n\n

mysql -u root -p<\/code><\/pre>\n\n\n\n

Next, create a database and database user. Grant the database user all the rights on the specific Joomla! database. (Be sure to replace the database name, the database user name and the password appropriately<\/strong>).<\/p>\n\n\n\n

create database joomladb;<\/code><\/pre>\n\n\n\n
create user joomlaadmin@localhost identified by 'changeme';<\/code><\/pre>\n\n\n\n
grant all on joomladb.* to joomlaadmin@localhost with grant option;<\/code><\/pre>\n\n\n\n

Reload privilege tables and exit;<\/p>\n\n\n\n

flush privileges;\nquit<\/code><\/pre>\n\n\n\n

Configure PHP for Joomla! CMS<\/h4>\n\n\n\n

Install other required PHP extensions.<\/p>\n\n\n\n

apt install php-gmp php-xml php-gd php-mbstring php-imagick php-zip php-xmlrpc<\/code><\/pre>\n\n\n\n

Next, update the following PHP.ini settings with suggested\/recommended values;<\/p>\n\n\n\n

memory_limit = 256M\nupload_max_filesize = 128M\npost_max_size = 128M\nmax_execution_time = 300\noutput_buffering = Off<\/code><\/pre>\n\n\n\n

Downloading Joomla! Package Files<\/h4>\n\n\n\n

Next, download the current Joomla! 3.x release package files from the Joomla! 3.x downloads page<\/a>. As of this writing, Joomla_3.9.23 is the current stable release.<\/p>\n\n\n\n

You can simply run the wget command below to pull the Joomla! 3.9.23 package file. Be sure to replace the link for other versions;<\/p>\n\n\n\n

wget -P \/tmp https:\/\/downloads.joomla.org\/cms\/joomla3\/3-9-23\/Joomla_3-9-23-Stable-Full_Package.tar.gz<\/code><\/pre>\n\n\n\n

Extract Joomla! Package File to Web Root Directory<\/h4>\n\n\n\n

Once the download completes, extract Joomla! package file to your respective web root directory, \/var\/www\/html\/joomla<\/strong><\/code>, in our setup;<\/p>\n\n\n\n

mkdir \/var\/www\/html\/joomla<\/code><\/pre>\n\n\n\n
tar xzf \/tmp\/Joomla_3-9-23-Stable-Full_Package.tar.gz -C \/var\/www\/html\/joomla --strip-components=1<\/code><\/pre>\n\n\n\n

Once the files are in place, set the proper ownership for the Joomla! directory;<\/p>\n\n\n\n

chown -R www-data: \/var\/www\/html\/joomla<\/code><\/pre>\n\n\n\n

Configure Apache\/Nginx site configuration for Joomla!<\/h4>\n\n\n\n

Next, you need to create a site configuration for Joomla! depending on whether you are running Apache or Nginx web server.<\/p>\n\n\n\n

For Apache<\/h5>\n\n\n\n
vim \/etc\/apache2\/sites-available\/joomla.conf<\/code><\/pre>\n\n\n\n
<VirtualHost *:80>\n     ServerAdmin admin@kifarunix-demo.com\n     DocumentRoot \/var\/www\/html\/joomla\/\n     ServerName kifarunix-demo.com\n\n     ErrorLog ${APACHE_LOG_DIR}\/joomla-error.log\n     CustomLog ${APACHE_LOG_DIR}\/joomla-access.log combined\n\n     <Directory \/var\/www\/html\/joomla\/>\n            Options FollowSymlinks\n            AllowOverride All\n            Require all granted\n     <\/Directory>\n<\/VirtualHost><\/code><\/pre>\n\n\n\n

Save and exit the configuration.<\/p>\n\n\n\n

For Nginx<\/h5>\n\n\n\n
vim \/etc\/nginx\/sites-enabled\/joomla<\/code><\/pre>\n\n\n\n
server {\n    listen 80;\n    listen [::]:80;\n    root \/var\/www\/joomla;\n    index  index.php index.html index.htm;\n    server_name  kifarunix-demo.com;\n\n    client_max_body_size 100M;\n    autoindex off;\n\n    location ~* \/(images|cache|media|logs|tmp)\/.*.(php|pl|py|jsp|asp|sh|cgi)$ {\n      return 403;\n      error_page 403 \/403_error.html;\n    }\n\n    location \/ {\n        try_files $uri $uri\/ \/index.php?$args;\n    }\n\n    location ~ .php$ {\n        include snippets\/fastcgi-php.conf;\n        fastcgi_pass unix:\/run\/php\/php7.4-fpm.sock;\n        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;\n        include fastcgi_params;\n        fastcgi_read_timeout 600;\n        fastcgi_send_timeout 600;\n        fastcgi_connect_timeout 600;\n    }\n}<\/code><\/pre>\n\n\n\n

Save and exit the configuration file.<\/p>\n\n\n\n

Check for syntax on Apache;<\/p>\n\n\n\n

apachectl -t<\/code><\/pre>\n\n\n\n
Syntax OK<\/code><\/pre>\n\n\n\n

Check for syntax on Nginx;<\/p>\n\n\n\n

nginx -t<\/code><\/pre>\n\n\n\n
nginx: the configuration file \/etc\/nginx\/nginx.conf syntax is ok\nnginx: configuration file \/etc\/nginx\/nginx.conf test is successful<\/code><\/pre>\n\n\n\n

Disable the default sites;<\/p>\n\n\n\n

unlink \/etc\/nginx\/sites-enabled\/default<\/code><\/pre>\n\n\n\n
a2dissite 000-default.conf<\/code><\/pre>\n\n\n\n

Enable the Joomla! sites;<\/p>\n\n\n\n

ln -s \/etc\/nginx\/sites-available\/joomla \/etc\/nginx\/sites-enabled\/joomla<\/code><\/pre>\n\n\n\n
a2ensite joomla.conf<\/code><\/pre>\n\n\n\n

Restart Nginx (if you are using Nginx)<\/p>\n\n\n\n

systemctl restart nginx<\/code><\/pre>\n\n\n\n

Restart Apache (if you are using Apache)<\/p>\n\n\n\n

systemctl restart apache2<\/code><\/pre>\n\n\n\n

Accessing Joomla! Site on Browser<\/h3>\n\n\n\n

You can now access Joomla! from browser to finalize your site setup. Based on our setup, our URL is http:\/\/kifarunix-demo.com<\/strong><\/code>.<\/p>\n\n\n\n

Be sure to allow external access to the site on firewall, if UFW is running.<\/p>\n\n\n\n

ufw allow \"Apache Full\"<\/code><\/pre>\n\n\n\n

The navigate to and access Joomla site from browser.<\/p>\n\n\n\n

On the first page, you are welcomed by the Joomla site configuration wizard. Set the name of the site and administrator details.<\/p>\n\n\n

\n
\"Install<\/figure><\/div>\n\n\n

Click Next<\/strong> to configure database connection settings;<\/p>\n\n\n

\n
\"\"<\/figure><\/div>\n\n\n

Click Next and go through the setup overview and ensure that everything is fine.<\/p>\n\n\n

\n
\"\"<\/figure><\/div>\n\n\n

Click Install <\/strong>to Install Joomla!.<\/p>\n\n\n\n

Once the installation is done, you should see such a page;<\/p>\n\n\n

\n
\"\"<\/figure><\/div>\n\n\n

Next, remove installation folder by clicking Remove “installation” folder<\/strong>.<\/p>\n\n\n\n

Access your site by clicking on site<\/strong> with an eye icon.<\/p>\n\n\n\n

\"\"<\/figure>\n\n\n\n

And there you go. You can now proceed to develop your site. That marks the end of our guide on how to install Joomla.<\/p>\n\n\n\n

Reference and Further Reading<\/h3>\n\n\n\n

Installing Joomla<\/a><\/p>\n\n\n\n

Joomla! Documentation<\/a><\/p>\n\n\n\n

Other tutorials<\/h3>\n\n\n\n

Install Automad CMS on Debian 10\/Ubuntu 18.04<\/a><\/p>\n\n\n\n

Install WonderCMS with Nginx on Debian 10<\/a><\/p>\n\n\n\n

Install latest WordPress with LAMP Stack on Ubuntu 20.04<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"

In this tutorial, you will learn how to quickly and easily install Joomla on Ubuntu 20.04|Ubuntu 18.04 systems. Joomla also spelled as Joomla!, is free and<\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"rank_math_lock_modified_date":false,"footnotes":""},"categories":[1087,121],"tags":[2998,2995,3000,2999,2997,2996,67,1200],"class_list":["post-7580","post","type-post","status-publish","format-standard","hentry","category-cms","category-howtos","tag-cms","tag-install-joomla-ubuntu","tag-install-joomla-ubuntu-18-04","tag-install-joomla-ubuntu-20-04","tag-joomla","tag-joomla-ubuntu-installation","tag-ubuntu-18-04","tag-ubuntu-20-04","generate-columns","tablet-grid-50","mobile-grid-100","grid-parent","grid-50"],"_links":{"self":[{"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/posts\/7580"}],"collection":[{"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/comments?post=7580"}],"version-history":[{"count":4,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/posts\/7580\/revisions"}],"predecessor-version":[{"id":21977,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/posts\/7580\/revisions\/21977"}],"wp:attachment":[{"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/media?parent=7580"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/categories?post=7580"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/tags?post=7580"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}