3 main components to make joomla work are nginx, mariadb and php.
Install nginx
$ sudo apt install nginx
Install mariadb
$ sudo apt install mariadb-server
Install php and required components
$ sudo apt install php php-zlib php-xml php-json php-mcrypt
Download joomla
$ wget -c https://downloads.joomla.org/cms/joomla3/3-8-10/Joomla_3-8-10-Stable-Full_Package.tar.bz2
Extract joomla
$ mkdir joomla
$ tar -xvf Joomla_3-8-10-Stable-Full_Package.tar.bz2 -C joomla
Deploy to DocumentRoot
$ sudo mv joomla /var/www/html/
$ sudo chown www-data -R /var/www/html/joomla
Create database
$ sudo mysql
MariaDB [(none)]> create database joomla;
MariaDB [(none)]> grant all on joomla.* to joomla@localhost identified by 'password';
MariaDB [(none)]> flush privileges;
Edit nginx config as per below:
server {
listen 80;
listen [::]:80;
root /var/www/html/joomla;
index index.php index.html index.htm;
server_name 192.168.10.100;
location / {
try_files $uri $uri/ /index.php?$args;
}
location ~ \.php$ {
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/var/run/php/php7.2-fpm.sock;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
}
Test for syntax error
$ sudo nginx -t
Restart nginx
$ sudo systemctl restart nginx
Browse 192.168.10.100 and follow the joomla installation wizard until finish.
Tuesday, July 3, 2018
How to install joomla 3.8.10 on ubuntu 18.04
Thursday, May 31, 2018
Creating openstack new security group, and allowing inbound port
To see existing security group
$ openstack security group list
To create a new security group named ssh-allow
$ openstack security group create ssh-allow
To allow port 22 inbound (ingress)
$ openstack security group rule create --ingress --proto tcp --dst-port 22 ssh-allowTo see if our port allowance is successfully implemented (use --fit-width to format the output properly)
$ openstack security group show ssh-allow --fit-widthMonday, May 28, 2018
Setting up mongodb replication
Mongodb needs at least 2 servers, preferably 3, to setup a proper mongodb replication. In this article, we will use below hostname as our mongodb nodes:
192.168.0.10 mongo-1 (primary)
192.168.0.11 mongo-2
192.168.0.12 mongo-3
Make sure mongodb is installed in all servers.
Set mongodb repo:
mongo-1: $ cat
>name=MongoDB Repository
>baseurl=http://downloads-distro.mongodb.org/repo/redhat/os/x86_64/
>gpgcheck=0
>enabled=1
>EOF
mongo-1: $ sudo mv mongodb.repo /etc/yum.repos.d/
Install mongodb:
mongo-1: $ sudo yum install -y mongodb-org
Set /etc/hosts for each server as below:
mongo-1: $ cat
To ease up this installation, turn off firewall and set selinux to permissive mode, temporarily, in all servers.
mongo-1: $ sudo systemctl stop firewalld mongo-1: $ sudo setenforce 0
Edit /etc/mongod.conf in every server, to be similar as below (assuming we are using myreplica as our replSet)
mongo-1: $ sudo cat /etc/mongod.conf
Run rs.status() to see the status of our replica
myreplica:PRIMARY> rs.status()
192.168.0.11 mongo-2
192.168.0.11 mongo-2
Friday, May 25, 2018
Creating image from a running instance
Sometimes we want to spawn off a few new instances, with the same spec and operating systems, but we do not want to go through the hassle of setting up each OS manually, and then update it one by one. In order to do that efficiently, openstack provides a very good way, which is to create an image from a running instance, and this image can be used to spawn off new instances afterwards.
Before we turn any instance to an image, we need to know its instance ID
$ openstack server list
We can then create an image from the above instance ID
$ openstack server image create --name centos7-updated-20180525 21e78f23-8b67-423a-9622-d46c8487f829
To make sure our image is created correctly, check using:
$ openstack image list
To create a new instance from the image, please refer here
Creating a new instance on openstack
In order to create new instance (it is called server in openstack command), you need to know beforehand a few information to feed to the create instance command. Refer below for those information:
check available flavor
$ openstack flavor list
check available images
$ openstack image list
check available network
$ openstack network list
check available security group
$ openstack security group list
check available keypair
$ openstack keypair list
Once you get all the above information, to create the new instance, just use below command, providing the above information as option to openstack server create command
$ openstack server create \
--image centos-7-20180520 \
--key-name my-keypair \
--flavor m1.medium \
--security-group defaults \
--network private-140 \
thenewinstancename
To check whether your new instance has been created and active:
$ openstack server list




