Learn how to install Joomla CMS on Linux Ubuntu 20.04 LTS in the cloud on Amazon Lightsail.
Joomla is an open-source content management system that is built on a model–view–controller (MVC) architecture. It provides a web application framework that allows users to create and manage websites, as well as powerful extensions for both the front-end and back-end of website creation. The CMS includes an interface to create and publish static pages, articles, blog posts or other types of content. It also includes an interface to manage a website, including the ability to add new pages and articles; upload files; manage permissions; configure menus, assign tags and keywords to articles, create polls or survey, and alot more. In this tutorial you will learn how to install Joomla CMS in the cloud on the Amazon Lightsail platform.
In order to complete this tutorial, the following is a list of items that may be needed or required. Please ensure to have these items available before taking implementation action on this tutorial to ensure success:
1) A desktop or laptop with at least 4GB of RAM, a dual-core processor, and at least 50GB of disk space.
2) An amazon free tier account
3) A Linux Ubuntu 20.04 LTS instance with at least 2GB of memory
4) An ssh client to connect to the instance via SSH. Putty or the built-in Linux / macOS terminal
5) An amazon route53 domain, the LAMP stack and the Joomla web application installation files.
1) Sign into your Amazon Web Services account and open the Lightsail dashboard
2) Create a new Linux Ubuntu 20.04 LTS instance, configure a custom hostname and install updates
3) Install the LAMP stack on the Joomla instance
4) Create a MariaDB database for Joomla
5) Download Joomla, create an Apache virtual host and complete the Joomla installation using the web-based installation wizard.
6) Secure Joomla with a free Lets encrypt SSL certificate.
Step 1: Sign into your Amazon Web Services account and open the Lightsail dashboard.
NB: Though this tutorial has been written using the amazon web services platform you can still use it to install Joomla on a different cloud platform. Jump to part 3 if you are using a different cloud provider or on-premise / on-device solution.
This first step is to sign into your Amazon Web Services account and open the Lightsail dashboard. To do this go to aws.amazon.com and click SIGN IN TO TH CONSOLE. Type in your login credentials to gain access to the dashboard. If you do not have an AWS account, click HERE to sign up for a free tier account.
Use the search box at the top of the page to search for “Lightsail” and click on the lightsail search result to open the dashboard.
Step 2: Create a new Linux Ubuntu 20.04 LTS instance, configure a custom hostname and install updates
Click on the CREATE INSTANCE button to open the instance, creation wizard. Click on the CHANGE AWS REGION AND AVAILABILITY ZONE link. Select any region that you would like and on the SELECT A PLATFORM section choose the LINUX / UNIX option. On the SELECT A BLUEPRINT section, click the OS ONLY button and select the UBUNTU 20.04 LTS blueprint.
Scroll down to the CHOOSE YOUR INSTANCE PLAN section and select the $10 PLAN which gives you “FIRST 3 MONTHS FREE!”. Type in a descriptive name for the instance on the IDENTIFY YOUR INSTANCE section and click CREATE INSTANCE
Once the instance has been created, we recommend that you configure a static public IP address on the instance. To do this, click on the NETWORKING tab and click CREATE STATIC IP. Select the JOOMLA instance on the ATTACH TO AN INSTANCE drop down and type in a descriptive name on the IDENTIFY YOUR STATIC IP field and click CREATE
Copy the public IP address for the JOOMLA INSTANCE and open the Amazon Route53 Service. Click HOSTED ZONES. Click on any hosted zone for your registered domain names and click CREATE RECORD. Type in a name on the RECORD NAME field and set the RECORD TYPE to A – ROUTES TRAFFIC TO AN IPV4 ADDRESS AND SOME AWS RESOURCES the paste in the public IP address on the VALUE field. Click CREATE RECORD to apply changes
Next, return to the Lightsail dashboard and click on the JOOMLA INSTANCE. Click on the CONNECT tab, scroll down and click DOWNLOAD DEFAULT KEY. Next, run the commands listed below to connect to the instance via SSH, configure a custom hostname and instance system and package updates.
Copy and paste the following configuration into the hosts configuration file. When you have pasted the configuration Press CONTROL + 0, press ENTER and press CONTROL + X to exit out of the file.
Set preserve_hostname to True. Press CONTROL + 0, press ENTER, and press CONTROL + X to exit the file.
Step 3: Install the LAMP Stack on the Joomla Instance
The next step is to install the LAMP stack on the Joomla Server. LAMP stands for Linux Apache MariaDB and PHP and it is a collection of software packages and a database engine that almost any web application needs. To install LAMP run the following commands:
Run the command show below to edit php.ini. You need to make the following changes:
memory_limit = 512M
upload_max_filesize = 256M
post_max_size = 256M
max_execution_time = 300
output_buffering = off
date.timezone = Africa/Harare
Run the command below to install MariaDB database management system:
Once the MariaDB database management system (DBMS) installation process is complete, run the following command to secure the installation:
Below are samples responses that you need to provide on each prompt from the script:
Enter current password for root (enter for none):
Set root password? [Y/n] n
Remove anonymous users? [Y/n] Y
Disallow root login remotely? [Y/n] Y
Remove test database and access to it? [Y/n] Y
Reload privilege tables now? [Y/n] Y
Step 4: Create a database for Joomla CMS
Step 5: Download Joomla, create an Apache virtual host and complete the Joomla installation using the web-based installation wizard.
Once the database creation process is complete, the next step is to download Joomla, create an Apache virtual host and complete the Joomla installation using the web-based installation wizard. Copy and paste the commands below:
Next, copy and paste the configuration below into the apache virtual host configuration file for joomla cms:
Copy and paste the commands below to enable the Joomla virtual host configuration files and restart apache2:
Open a new web browser window and go to http://your-joomla-server-domain.com. This should open the Joomla installer as shown below. Select a language and type in the name of your website on the SETUP SITE NAME field and click SETUP LOGIN DATA
Type a username, password and email address on the appropriate fields and click SETUP DATABASE CONNECTION
Type your MariaDB database username, password, and database name in the appropriate fields and click INSTALL JOOMLA
Step 6: Secure Joomla with a free Lets Encrypt SSL certificate.
You now need to secure Joomla with a free Lets Encrypt SSL certificate. This will ensure secure communications on port 443. Run the command below to install cerbot and the python3-certbot-apache package:
Once the certbot installation is complete, go to the lightsail dashboard and click on the Joomla instance. Click on the Networking tab. Scroll down to the IPv4 firewall and click Add rule. Set the Application to HTTPS and click Create. This will configure the IPv4 firewall to permit inbound port 443 connections to the Joomla instance
Next, run the following command to request a Lets Encrypt SSL certificate using certbot. During the request process ensure that you select “2: Redirect – Make all requests redirect HTTP traffic to HTTPS access…”