ubuntu 20.04 | LinuxHostSupport Linux Tutorials and Guides Wed, 01 Feb 2023 11:22:39 +0000 en-US hourly 1 https://wordpress.org/?v=6.6.1 How to Install Grafana on Ubuntu 20.04 https://linuxhostsupport.com/blog/how-to-install-grafana-on-ubuntu-20-04/ https://linuxhostsupport.com/blog/how-to-install-grafana-on-ubuntu-20-04/#comments Mon, 30 May 2022 17:30:00 +0000 https://linuxhostsupport.com/blog/?p=1673 Grafana is a free, open-source, and composable observability and data visualization platform. It is used for monitoring, analysis, and visualization of real-time system data. Its frontend is written in Typescript while the backend is written in Go. It can be used with time series databases such as InfluxDB, Prometheus, and Elasticsearch. It provides a beautiful […]

The post How to Install Grafana on Ubuntu 20.04 appeared first on LinuxHostSupport.

]]>
Grafana is a free, open-source, and composable observability and data visualization platform. It is used for monitoring, analysis, and visualization of real-time system data. Its frontend is written in Typescript while the backend is written in Go. It can be used with time series databases such as InfluxDB, Prometheus, and Elasticsearch. It provides a beautiful dashboard that allows users to create and edit both log and data graphs and create metrics.

In this post, we will explain how to install Grafana on Ubuntu 20.04.

Prerequisites

  • A Ubuntu 20.04 VPS with root access enabled or a user with sudo privileges.

Log in via SSH and Update your System

First, you will need to log in to your Ubuntu 20.04 VPS via SSH as the root user:

ssh root@IP_ADDRESS -p PORT_NUMBER
Next, run the following commands to upgrade all installed packages on your VPS:

apt-get update -y

Once all the packages are updated, restart your system to apply the changes.

Add Grafana Repository

By default, the Grafana package is not included in the Ubuntu 20.04 default repository. So you will need to add the Grafana official repository to your system.

First, install all required dependencies using the following command:

apt-get install wget curl gnupg2 apt-transport-https software-properties-common -y

Next, download and add the Grafana GPG key with the following command:

wget -q -O - https://packages.grafana.com/gpg.key | apt-key add -

Next, add the Grafana repository to APT using the following command:

echo "deb https://packages.grafana.com/oss/deb stable main" | tee -a /etc/apt/sources.list.d/grafana.list

Once the repository is added to your system, you can update it with the following command:

apt-get update -y

Install Grafana

Now, you can install the Grafana by running the following command:

apt-get install grafana -y

Once the Grafana package is installed, verify the Grafana version with the following command:

grafana-server -v

You will get the following output:

Version 8.4.5 (commit: 4cafe613e1, branch: HEAD)

Now, start the Grafana service and enable it to start at system reboot:

systemctl start grafana-server
systemctl enable grafana-server

You can now check the status of the Grafana with the following command:

systemctl status grafana-server

You will get the following output:

● grafana-server.service - Grafana instance
     Loaded: loaded (/lib/systemd/system/grafana-server.service; disabled; vendor preset: enabled)
     Active: active (running) since Wed 2022-04-06 14:39:27 UTC; 5s ago
       Docs: http://docs.grafana.org
   Main PID: 2761 (grafana-server)
      Tasks: 9 (limit: 2348)
     Memory: 32.2M
     CGroup: /system.slice/grafana-server.service
             └─2761 /usr/sbin/grafana-server --config=/etc/grafana/grafana.ini --pidfile=/run/grafana/grafana-server.pid --packaging=deb cfg:>

Apr 06 14:39:29 ubuntu2004 grafana-server[2761]: logger=sqlstore t=2022-04-06T14:39:29.83+0000 lvl=info msg="Created default admin" user=admin
Apr 06 14:39:29 ubuntu2004 grafana-server[2761]: logger=sqlstore t=2022-04-06T14:39:29.83+0000 lvl=info msg="Created default organization"
Apr 06 14:39:29 ubuntu2004 grafana-server[2761]: logger=plugin.manager t=2022-04-06T14:39:29.89+0000 lvl=info msg="Plugin registered" pluginI>
Apr 06 14:39:29 ubuntu2004 grafana-server[2761]: logger=plugin.finder t=2022-04-06T14:39:29.9+0000 lvl=warn msg="Skipping finding plugins as >
Apr 06 14:39:29 ubuntu2004 grafana-server[2761]: logger=query_data t=2022-04-06T14:39:29.9+0000 lvl=info msg="Query Service initialization"
Apr 06 14:39:29 ubuntu2004 grafana-server[2761]: logger=live.push_http t=2022-04-06T14:39:29.91+0000 lvl=info msg="Live Push Gateway initiali>
Apr 06 14:39:30 ubuntu2004 grafana-server[2761]: logger=server t=2022-04-06T14:39:30.11+0000 lvl=info msg="Writing PID file" path=/run/grafan>
Apr 06 14:39:30 ubuntu2004 grafana-server[2761]: logger=http.server t=2022-04-06T14:39:30.12+0000 lvl=info msg="HTTP Server Listen" address=[>
Apr 06 14:39:30 ubuntu2004 grafana-server[2761]: logger=ngalert t=2022-04-06T14:39:30.13+0000 lvl=info msg="warming cache for startup"
Apr 06 14:39:30 ubuntu2004 grafana-server[2761]: logger=ngalert.multiorg.alertmanager t=2022-04-06T14:39:30.13+0000 lvl=info msg="starting Mu>

At this point, Grafana is started and listens on port 3000. You can check it with the following command:

ss -antpl | grep 3000

You should see the following output:

LISTEN    0         4096                     *:3000                   *:*        users:(("grafana-server",pid=2761,fd=8))                                       

Configure Nginx as a Reverse Proxy for Grafana

Next, you will need to install the Nginx as a reverse proxy for Grafana. First, install the Nginx package using the following command:

apt-get install nginx -y

Once the Nginx is installed, create an Nginx virtual host configuration file:

nano /etc/nginx/conf.d/grafana.conf

Add the following lines:

Server {
        server_name grafana.example.com;
        listen 80 ;
        access_log /var/log/nginx/grafana.log;

    location / {
                proxy_pass http://localhost:3000;
        proxy_set_header Host $http_host;
                proxy_set_header X-Forwarded-Host $host:$server_port;
                proxy_set_header X-Forwarded-Server $host;
                proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        }
}

Save and close the file then verify the Nginx configuration file using the following command:

nginx -t

You will get the following output:

nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful

Finally, restart the Nginx service to apply the changes:

systemctl restart nginx

Access Grafana Dashboard

Now, open your web browser and access the Grafana dashboard using the URL http://grafana.example.com. You will be redirected to the Grafana login page:

Provide default admin username and password as admin/admin and click on the Log in button. You should see the Grafana password change screen:

Change your default password and click on the Submit button. You should see the Grafana dashboard on the following screen:

Of course, if you are one of our Ubuntu Hosting customers, you don’t have to install Grafana on your Ubuntu 20.04 VPS – simply ask our admins, sit back, and relax. Our admins will install Grafana on Ubuntu 20.04 for you immediately.

PS. If you liked this post about how to install Grafana on Ubuntu 20.04 VPS, please share it with your friends on the social networks using the buttons below, or simply leave a comment in the comments section. Thanks.

The post How to Install Grafana on Ubuntu 20.04 appeared first on LinuxHostSupport.

]]>
https://linuxhostsupport.com/blog/how-to-install-grafana-on-ubuntu-20-04/feed/ 7
How to Install Varnish 7 on AlmaLinux https://linuxhostsupport.com/blog/how-to-install-varnish-7-on-almalinux/ https://linuxhostsupport.com/blog/how-to-install-varnish-7-on-almalinux/#respond Sun, 15 May 2022 17:30:00 +0000 https://linuxhostsupport.com/blog/?p=1670 Varnish is a free, and open-source web application accelerator used for caching website content in memory. It is designed for HTTP to speed up caching of heavy dynamic websites. It is capable of speeding up your website page loading time by a factor of 10x to 300x. This will helps you with your Search Engine […]

The post How to Install Varnish 7 on AlmaLinux appeared first on LinuxHostSupport.

]]>
Varnish is a free, and open-source web application accelerator used for caching website content in memory. It is designed for HTTP to speed up caching of heavy dynamic websites. It is capable of speeding up your website page loading time by a factor of 10x to 300x. This will helps you with your Search Engine Results Page and also improve the user experience on your website.

In this post, we will show you how to install Varnish 7 on AlmaLinux.

Prerequisites

  • An AlmaLinux VPS with root access enabled or a user with sudo privileges.

Log in via SSH and Update your System

First, you will need to log in to your AlmaLinux VPS via SSH as the root user:

ssh root@IP_ADDRESS -p PORT_NUMBER
Next, run the following commands to upgrade all installed packages on your VPS:

dnf update -y

Once all the packages are updated, restart your system to apply the changes.

Add Varnish Repo

By default, the latest version of Varnish is not included in the AlmaLinux default repo. So you will need to disable the default Varnish repo. You can disable it with the following command:

dnf module disable varnish

You will get the following output:

AlmaLinux - AppStream                                                                                     5.6 MB/s | 9.7 MB     00:01    
AlmaLinux - BaseOS                                                                                        8.8 MB/s | 6.8 MB     00:00    
AlmaLinux - Extras                                                                                         28 kB/s |  12 kB     00:00    
Dependencies resolved.
==============================================================================================================================================
 Package                           Architecture                     Version                           Repository                         Size
==============================================================================================================================================
Disabling modules:
 varnish                                                                                                                                     

Transaction Summary
==============================================================================================================================================

Is this ok [y/N]: y
Complete!

Next, install the EPEL repository and add the Varnish 7 repo with the following command:

dnf install epel-release -y
curl -s https://packagecloud.io/install/repositories/varnishcache/varnish70/script.rpm.sh | bash -

Install Varnish 7

Now, you can run the following command to install the Varnish 7 on your server.

dnf install varnish -y

Once the Varnish is installed, you can verify the Varnish version using the following command:

rpm -qi varnish

You will get the Varnish package information in the following output:

Name        : varnish
Version     : 7.0.2
Release     : 1.el8
Architecture: x86_64
Install Date: Wednesday 06 April 2022 03:21:17 PM UTC
Group       : System Environment/Daemons
Size        : 8907085
License     : BSD
Signature   : (none)
Source RPM  : varnish-7.0.2-1.el8.src.rpm
Build Date  : Wednesday 12 January 2022 02:25:34 PM UTC
Build Host  : 7fc509e75620
Relocations : (not relocatable)
URL         : https://www.varnish-cache.org/
Summary     : High-performance HTTP accelerator
Description :
This is Varnish Cache, a high-performance HTTP accelerator.

Manage Varnish Service

By default, the Varnish service is managed by systemd. You can start the Varnish service with the following command:

systemctl start varnish

To enable the Varnish service, run the following command:

systemctl enable varnish

To check the status of the Varnish service, run the following command:

systemctl status varnish

You will get the following output:

● varnish.service - Varnish Cache, a high-performance HTTP accelerator
   Loaded: loaded (/usr/lib/systemd/system/varnish.service; disabled; vendor preset: disabled)
   Active: active (running) since Wed 2022-04-06 15:21:40 UTC; 6s ago
  Process: 25005 ExecStart=/usr/sbin/varnishd -a :6081 -a localhost:8443,PROXY -p feature=+http2 -f /etc/varnish/default.vcl -s malloc,256m (>
 Main PID: 25006 (varnishd)
    Tasks: 217
   Memory: 108.5M
   CGroup: /system.slice/varnish.service
           ├─25006 /usr/sbin/varnishd -a :6081 -a localhost:8443,PROXY -p feature=+http2 -f /etc/varnish/default.vcl -s malloc,256m
           └─25017 /usr/sbin/varnishd -a :6081 -a localhost:8443,PROXY -p feature=+http2 -f /etc/varnish/default.vcl -s malloc,256m

Apr 06 15:21:39 rockylinux systemd[1]: Starting Varnish Cache, a high-performance HTTP accelerator...
Apr 06 15:21:40 rockylinux varnishd[25006]: Version: varnish-7.0.2 revision 9b5f68e19ca0ab60010641e305fd12822f18d42c
Apr 06 15:21:40 rockylinux varnishd[25006]: Platform: Linux,4.18.0-348.12.2.el8_5.x86_64,x86_64,-junix,-smalloc,-sdefault,-hcritbit
Apr 06 15:21:40 rockylinux varnishd[25006]: Child (25017) Started
Apr 06 15:21:40 rockylinux varnishd[25006]: Child (25017) said Child starts
Apr 06 15:21:40 rockylinux systemd[1]: Started Varnish Cache, a high-performance HTTP accelerator.

Configure Varnish

By default, Varnish listens on port 6081. You can check it with the following command:

ss -antpl | grep varnish

You will get the following output:

LISTEN 0      128          0.0.0.0:6081       0.0.0.0:*    users:(("cache-main",pid=25017,fd=6),("varnishd",pid=25006,fd=6))
LISTEN 0      128             [::]:6081          [::]:*    users:(("cache-main",pid=25017,fd=7),("varnishd",pid=25006,fd=7))

Now, you will need to configure Varnish to listen on port 80. You can do it by editing the Varnish configuration file:

nano /usr/lib/systemd/system/varnish.service

Replace the port 6081 with 80 as shown below:

ExecStart=/usr/sbin/varnishd \
          -a :80 \
          -a localhost:8443,PROXY \
          -p feature=+http2 \
          -f /etc/varnish/default.vcl \
          -s malloc,2g

Save and close the file then reload the systemd daemon to apply the changes:

systemctl daemon-reload

Next, you will also need to edit the Varnish VCL configuration file and define your Nginx backend.

nano /etc/varnish/default.vcl

Define your Nginx backend as shown below:

backend default {
    .host = "127.0.0.1";
    .port = "8080";
}

Save and close the file when you are finished.

Note: Replace 127.0.0.1 with your Nginx web server IP.

Configure Varnish for Nginx

First, install the Nginx web server package with the following command:

dnf install nginx -y

Once the Nginx is installed, you will need to edit the Nginx configuration file and change the listen port from 80 to 8080:

nano /etc/nginx/nginx.conf

Change the default port from 80 to 8080:

    listen       8080 default_server;
        listen       [::]:8080 default_server;

Save and close the file then restart the Nginx service to apply the changes:

systemctl restart nginx

Finally, restart the Varnish service to apply the changes:

systemctl restart varnish

Verify Varnish

At this point, Varnish is installed and configured to work with Nginx. Now it’s time to verify it.

You can verify it using the curl command as shown below:

curl -I http://your-server-ip

If everything is fine, you will get the following output:

HTTP/1.1 200 OK
Server: nginx/1.14.1
Date: Wed, 06 Apr 2022 15:25:48 GMT
Content-Type: text/html
Content-Length: 3429
Last-Modified: Thu, 10 Jun 2021 09:09:03 GMT
ETag: "60c1d6af-d65"
X-Varnish: 2
Age: 0
Via: 1.1 varnish (Varnish/7.0)
Accept-Ranges: bytes
Connection: keep-alive

Of course, if you are one of our Linux VPS hosting customers, you don’t have to install Varnish 7 on your AlmaLinux VPS – simply ask our admins, sit back, and relax. Our admins will install Varnish 7 on AlmaLinux for you immediately.

PS. If you liked this post about how to install Varnish 7 on AlmaLinux VPS, please share it with your friends on the social networks using the buttons below, or simply leave a comment in the comments section. Thanks.

The post How to Install Varnish 7 on AlmaLinux appeared first on LinuxHostSupport.

]]>
https://linuxhostsupport.com/blog/how-to-install-varnish-7-on-almalinux/feed/ 0
How to Install Webuzo v3 on Ubuntu 20.04 https://linuxhostsupport.com/blog/how-to-install-webuzo-v3-on-ubuntu-20-04/ https://linuxhostsupport.com/blog/how-to-install-webuzo-v3-on-ubuntu-20-04/#comments Sat, 30 Apr 2022 17:30:00 +0000 https://linuxhostsupport.com/blog/?p=1657 In this tutorial, we are going to explain how to install Webuzo v3 control panel on Ubuntu 20.04. Webuzo is a hosting control panel that allows the developers and administrators to easily manage their domains, create databases, deploy a variety of applications create users and etc. With Webuzo can be managed different applications such as […]

The post How to Install Webuzo v3 on Ubuntu 20.04 appeared first on LinuxHostSupport.

]]>
In this tutorial, we are going to explain how to install Webuzo v3 control panel on Ubuntu 20.04.

Webuzo is a hosting control panel that allows the developers and administrators to easily manage their domains, create databases, deploy a variety of applications create users and etc. With Webuzo can be managed different applications such as MySQL, MongoDB as databases, Nginx, LighTTPD as webservers, PHP, Ruby, Perl as languages and etc.

Installing the Webuzo control panel is done with an installation script and can take up to 15 minutes. Let’s get started!

Prerequisites

  • A server with Ubuntu 20.04 as OS
  • User privileges: root or non-root user with sudo privileges

Step 1. Update the System

Webuzo control panel requires a fresh installation of Ubuntu 20.04. Since we have a fresh installation we need to update the system before we take any steps about the installation process.

sudo apt update -y && sudo apt upgrade -y

Step 2. Remove Unnecessary installations

Webuzo v3 control panel has its own way of configuring the PHP, MySQL, and Apache or Nginx, so we need to remove them completely before we download and run the installation script.

sudo apt purge php* mysql* apache2* nginx* -y

Step 3. Install Webuzo v3 Control Panel

First, we need to download the installation script. Execute the command below for the installation script to be downloaded in the root directory on your server:

wget http://files.webuzo.com/install.sh

Once, the script is downloaded, make it executable:

chmod +x install.sh

Before you execute the script it is good to be mentioned, that the Webuzo v3 control panel can be installed with the LAMP(Linux, Apache, MySQL, PHP) or LEMP(Linux, Nginx, MySQL, PHP) stack. In this tutorial, we are going to install the Webuzo with the LAMP stack.

Run the installation script with the arguments as explained below:

./install.sh --v3 --lamp

This should be the first output after execution of the script:

 Welcome to Webuzo Installer
--------------------------------------------------------
 Installation Logs : tail -f /root/webuzo-install.log
--------------------------------------------------------

1) Installing Libraries and Dependencies

After successful installation the following message will be displayed:

----------------------------------------------------------------
 /$      /$ /$ /$  /$   /$ /$  /$
| $  /$ | $| $_____/| $__  $| $  | $|_____ $  /$__  $
| $ /$| $| $      | $  \ $| $  | $     /$/ | $  \ $
| $/$ $ $| $   | $ | $  | $    /$/  | $  | $
| $_  $| $__/   | $__  $| $  | $   /$/   | $  | $
| $/ \  $| $      | $  \ $| $  | $  /$/    | $  | $
| $/   \  $| $| $/|  $/ /$|  $/
|__/     \__/|________/|_______/  \______/ |________/ \______/
----------------------------------------------------------------
Congratulations, Webuzo has been successfully installed

You can now configure Softaculous Webuzo at the following URL :
https://162.246.248.185:2005/

----------------------------------------------------------------
Thank you for choosing Webuzo !
----------------------------------------------------------------

Step 4. Access the Webuzo GUI

To access the Webuzo control panel, access your server IP address on port 2004

http://YOUR_SERVER_IP:2004

As username, you can use the root user, and the root password of your server.

After successful login you should see the screen as described in the picture below:

Step 5. The Webuzo Panel Menu

In the next paragraphs we are going to explain the most important options that the Webuzo control panel offers, to make the work easier for developers and system administrators.

USERS:The first section on the left menu is the users section. In this section, we can list the users, add new users, see the domains, suspend the existing users, and email them as well. Also, in this section, the admins can grant shell access to the users.

PLANS:The second option in this menu is the section for the plans. We can add a new plan, list plans, add and disable some features and etc. By adding a new plan we can name it, add some features like disk quota, max FTP accounts, max addon domains, define the home directory, max email accounts, and so on. Adding a new plan has a variety of options and to understand them in more detail you will have to spend some time in this section.

RESELLERS: Next section is the reseller section where we can list the resellers, add some privileges to the resellers, and email them at once. One user can become a reseller, simply by checking one checkbox while we add a new user.

SETTINGS: This is one of the most important sections, where the administrator can change the root password of the server, configure the backup strategy, set the server’s timezone, update the Webuzo control panel, set the nameservers, manage the PHP settings and etc.

NETWORKING: In this section, we can add new IP, set the IP range, change the resolver configuration and change the server’s hostname.

The rest of the sections in the panel menu are for storage, emails, security, plugins, SQL services, support and Softaculous. Now when you successfully installed the Webuzo control panel, and manage to login in you can easily access these sections.

That’s it! In this tutorial, we explained the process of installing the Webuzo v3 control panel and its features. Of course, you do not have to install it by yourself if you do not have experience with Linux servers and control panels. All you need to do is to sign up for one of our SSD VPS plans and submit a support ticket. Our professional admins are 24/7 available for you.

If you liked this post on how to install Webuzo v3 on Ubuntu 20.04, please share it with your friends on the social networks using the buttons on the left or simply leave a reply below. Thanks.

The post How to Install Webuzo v3 on Ubuntu 20.04 appeared first on LinuxHostSupport.

]]>
https://linuxhostsupport.com/blog/how-to-install-webuzo-v3-on-ubuntu-20-04/feed/ 3
How to Install Checkmk on Ubuntu 20.04 https://linuxhostsupport.com/blog/how-to-install-checkmk-on-ubuntu-20-04/ https://linuxhostsupport.com/blog/how-to-install-checkmk-on-ubuntu-20-04/#respond Tue, 15 Mar 2022 17:30:00 +0000 https://linuxhostsupport.com/blog/?p=1647 In this tutorial, we are going to show you how to install Checkmk monitoring software on Ubuntu 20.04. Checkmk is a free open-source monitoring server tool written in C++ and Python. It is a leading tool for infrastructure and application monitoring that has a simple configuration, flexibility, and scalability. With Checkmk we can monitor web […]

The post How to Install Checkmk on Ubuntu 20.04 appeared first on LinuxHostSupport.

]]>
In this tutorial, we are going to show you how to install Checkmk monitoring software on Ubuntu 20.04.

Checkmk is a free open-source monitoring server tool written in C++ and Python. It is a leading tool for infrastructure and application monitoring that has a simple configuration, flexibility, and scalability. With Checkmk we can monitor web servers, database servers, cloud infrastructure, network services, containers, and many more things.

Installing Checkmk monitoring tool on Ubuntu 20.04 is a very easy and straightforward process, which can take up to 10 minutes. Let’s get started with the installation. Enjoy!

Prerequisites

  • Fresh install of Ubuntu 20.04
  • User privileges: root or non-root user with sudo privileges

Update the System

In order for our system to be up to date before the installation we are going to update it with the command below:

sudo apt update -y && sudo apt upgrade -y

Download the Installation package

Once, the system is up to date, first we need to download the Checkmk installation package from their official site

cd /opt
wget https://download.checkmk.com/checkmk/1.6.0p27/check-mk-raw-1.6.0p27_0.focal_amd64.deb

Once, you execute the command above, check the downloaded file in the “/opt” directory

ls -al

You should receive the following output

root@vps:/opt# ls -al
total 76500
drwxr-xr-x  2 root root     4096 Feb  4 00:01 .
drwxr-xr-x 19 root root     4096 Jan  5 22:29 ..
-rw-r--r--  1 root root 78321766 Sep 30 05:10 check-mk-raw-1.6.0p27_0.focal_amd64.deb

Install Checkmk

Once you verify that the file is successfully downloaded you can execute the command below for the installation process to start.

sudo apt install ./check-mk-raw-1.6.0p27_0.focal_amd64.deb

After a couple of minutes, the Checkmk will be installed on your server.

The Available Commands

To check the available commands you need to execute the “omd” command on your terminal and the following output will appear.

root@vps:~# omd
Usage (called as root):

 omd help                               Show general help
 omd setversion VERSION                 Sets the default version of OMD which will be used by new sites
 omd version    [SITE]                  Show version of OMD
 omd versions                           List installed OMD versions
 omd sites                              Show list of sites
 omd create     SITE                    Create a new site (-u UID, -g GID)
 omd init       SITE                    Populate site directory with default files and enable the site
 omd rm         SITE                    Remove a site (and its data)
 omd disable    SITE                    Disable a site (stop it, unmount tmpfs, remove Apache hook)
 omd enable     SITE                    Enable a site (reenable a formerly disabled site)
 omd mv         SITE NEWNAME            Rename a site
 omd cp         SITE NEWNAME            Make a copy of a site
 omd update     SITE                    Update site to other version of OMD
 omd start      [SITE] [SERVICE]        Start services of one or all sites
 omd stop       [SITE] [SERVICE]        Stop services of site(s)
 omd restart    [SITE] [SERVICE]        Restart services of site(s)
 omd reload     [SITE] [SERVICE]        Reload services of site(s)
 omd status     [SITE] [SERVICE]        Show status of services of site(s)
 omd config     SITE ...                Show and set site configuration parameters
 omd diff       SITE ([RELBASE])        Shows differences compared to the original version files
 omd su         SITE                    Run a shell as a site-user
 omd umount     [SITE]                  Umount ramdisk volumes of site(s)
 omd backup     SITE [SITE] [-|ARCHIVE_PATH] Create a backup tarball of a site, writing it to a file or stdout
 omd restore    [SITE] [-|ARCHIVE_PATH] Restores the backup of a site to an existing site or creates a new site
 omd cleanup                            Uninstall all Check_MK versions that are not used by any site.

General Options:
 -V                     set specific version, useful in combination with update/create
 omd COMMAND -h, --help          show available options of COMMAND

Create a Monitoring Server

In order can test the functionality of the Checkmk installation we need to create a test monitoring server. We will use the “rosehosting” as the name of our server. You can use any name you want.

sudo omd create rosehosting

You should receive the following output with the credentials.

root@vps:~# sudo omd create rosehosting
Adding /opt/omd/sites/rosehosting/tmp to /etc/fstab.
Creating temporary filesystem /omd/sites/rosehosting/tmp...OK
Restarting Apache...OK
Created new site rosehosting with version 1.6.0p27.cre.

  The site can be started with omd start rosehosting.
  The default web UI is available at http://your_hostname/rosehosting/

  The admin user for the web applications is cmkadmin with password: agKZHrpI
  (It can be changed with 'htpasswd -m ~/etc/htpasswd cmkadmin' as site user.
)
  Please do a su - rosehosting for administration of this site.

Once, the new instances is created, we need to start it.

omd start rosehosting

You should receive the following output:

root@vps:~# omd start rosehosting
Starting mkeventd...OK
Starting rrdcached...OK
Starting npcd...OK
Starting nagios...OK
Starting apache...OK
Initializing Crontab...OK

Once the instance is started you can access it using the URL provided in the previous paragraph after successful creation along with the credentials.

After successful login you should see the following screen.

That’s it. You successfully installed and created your first Checkmk instance on your Ubuntu 20.04 server. Now you can easily monitor the web servers, database servers and etc on your own. Of course, if you find some difficulties while installing the Checkmk you do not have to install it by yourself. You can always contact our system admins and with their expertise, they will install Checkmk for you. All you need to do is to contact our support. We are available 24/7.

PS. If you liked this post, on how to install Checkmk on Ubuntu 20.04, please share it with your friends on the social networks using the buttons on the left or simply leave a reply below. Thanks.

The post How to Install Checkmk on Ubuntu 20.04 appeared first on LinuxHostSupport.

]]>
https://linuxhostsupport.com/blog/how-to-install-checkmk-on-ubuntu-20-04/feed/ 0
How To Install Drupal 9 CMS on Ubuntu 20.04 https://linuxhostsupport.com/blog/how-to-install-drupal-9-cms-on-ubuntu-20-04/ https://linuxhostsupport.com/blog/how-to-install-drupal-9-cms-on-ubuntu-20-04/#comments Mon, 28 Feb 2022 18:30:00 +0000 https://linuxhostsupport.com/blog/?p=1639 Drupal is open-source software that has many features, like easy content authoring, reliable performance, and excellent security. With Drupal tools, you can build the versatile, structured content that dynamic web experiences need. As an open-source web content management system (CMS) written in PHP, it is a great alternative to another CSM like WordPress or Joomla. […]

The post How To Install Drupal 9 CMS on Ubuntu 20.04 appeared first on LinuxHostSupport.

]]>
Drupal is open-source software that has many features, like easy content authoring, reliable performance, and excellent security. With Drupal tools, you can build the versatile, structured content that dynamic web experiences need. As an open-source web content management system (CMS) written in PHP, it is a great alternative to another CSM like WordPress or Joomla. In this tutorial, we will show you how to install Drupal 9 on Ubuntu 20.04 (Focal Fossa).

Prerequisites

  • Ubuntu 20.04
  • root SSH access or a regular user with sudo privileges

1. Log in via SSH and update the system

Log in to your Ubuntu 20.04 VPS with SSH as a root user or as a regular user with sudo privileges

ssh master@IP_Address -p Port_number

Remember to replace IP_Address and Port_Number with your server’s actual IP address and SSH port number respectively.

You can check whether you have the proper Ubuntu version installed on your server with the following command:

$ lsb_release -a

You should get this output:

No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 20.04.3 LTS
Release: 20.04
Codename: focal

Then, run the following command to make sure that all installed packages on the server are updated to the latest available version

$ sudo apt update && sudo apt upgrade

2. Install and Configure Web server

Drupal 9 supports many webservers, like Apache, nginx, LiteSpeed, even Microsoft IIS. In this tutorial, we will show you how to install Drupal 9 using apache or nginx on your Ubuntu 20.04. Drupal will be installed in directory /var/www/html/drupal. For this purpose, we need to create the directory.

$ sudo mkdir /var/www/html/drupal

a. apache

If you want to use Apache, run this command to install it from the repository.

$ sudo apt install apache2

Once installed, Apache will run and we can start creating a virtual host.

$ sudo nano /etc/apache2/sites-available/drupal.conf

Paste the following in to /etc/apache2/sites-available/drupal.conf file.

<VirtualHost *:80>
     ServerName drupal.rosehosting.com
     ServerAlias drupal.rosehosting.com
     ServerAdmin admin@otodiginet.com
     DocumentRoot /var/www/html/drupal/

     CustomLog ${APACHE_LOG_DIR}/access.log combined
     ErrorLog ${APACHE_LOG_DIR}/error.log

      <Directory /var/www/html/drupal>
            Options Indexes FollowSymLinks
            AllowOverride All
            Require all granted
            RewriteEngine on
            RewriteBase /
            RewriteCond %{REQUEST_FILENAME} !-f
            RewriteCond %{REQUEST_FILENAME} !-d
            RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
      </Directory>
</VirtualHost>

Save the file then exit from nano editor. To enable the virtual host, let’s run this command:

$ sudo a2ensite drupal

As you can see in the Apache virtual host above, it contains RewriteRule. By default, the Apache mod rewrite in Ubuntu is not enabled. So, we need to enable the module and restart Apache.

$ sudo a2enmod rewrite
$ sudo systemctl restart apache2

b. nginx

If you want to use nginx instead of apache, run this command to install it.

$ sudo apt install nginx

Now, let’s create an nginx server block to proceed with Drupal 9 installation.

$ sudo nano /etc/nginx/sites-enabled/drupal.conf

Paste the following contents in to the file

server {
    listen 80;
    
    root /var/www/html/drupal;

    index index.php index.html index.htm;

    server_name drupal.rosehosting.com;

    location / {
        try_files $uri $uri/ /index.php$is_args$args;
    }

    location = /favicon.ico { log_not_found off; access_log off; }
    location = /robots.txt { log_not_found off; access_log off; allow all; }
    location ~* \.(css|gif|ico|jpeg|jpg|js|png)$ {
        expires max;
        log_not_found off;
    }

    location ~ \.php$ {
        try_files $uri =404;
        fastcgi_split_path_info ^(.+\.php)(/.+)$;
        fastcgi_pass unix:/var/run/php/php7.4-fpm.sock;
        fastcgi_index index.php;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        include fastcgi_params;
    }
}

Save the file then exit.

3. Install Database Server

Drupal 9 requires MariaDB 10.3+ or MySQL/Percona 5.7.8+ or higher, PostgreSQL 10.0 or higher, SQLite 3.26 or higher, the database server is needed to store your Drupal data. In this step, we will install MariaDB from Ubuntu repository.

Run the following command to install the MariaDB server from the official Ubuntu repositories:

$ sudo apt install mariadb-server mariadb-client -y

Once installed, MariaDB will run and it’s already configured to run after reboot, by default.

Next, secure the MariaDB installation using the following command:

$ sudo mysql_secure_installation

This script will set the MariaDB root password, disable remote root login and remove anonymous users as shown below:

Enter current password for root (enter for none):
Set root password? [Y/n] Y
New password:
Re-enter new password:
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

4. Create a Database

Login to the MySQL cli as the root user and execute the following commands:

$ mysql -u root -p

You will be prompted for your MySQL root password, you create the password in the previous step. And, once logged in, run these commands.

mysql> CREATE DATABASE drupal9;
mysql> CREATE USER 'drupal9_user'@'IP_address' IDENTIFIED BY 'm0d1fyth15';
mysql> GRANT ALL PRIVILEGES ON drupal9.* TO 'drupal9_user'@'IP_address';
mysql> FLUSH PRIVILEGES;
mysql> \q

Make sure to replace the ‘IP_address‘ is the IP address of your Ubuntu 20.04 server where Drupal 9 will be installed, or you can also use ‘localhost’. Do not forget to replace the PASSWORD ‘m0d1fyth15’ with a stronger and unique one.

5. Install PHP

In this section, we will install PHP 7.4. Rung the command below to install PHP 7.4

$ sudo apt install php7.4 libapache2-mod-php7.4 php7.4-{common,mbstring,xmlrpc,soap,gd,xml,intl,mysql,cli,zip,curl,fpm} -y

If you choose to use Apache, run this command and restart Apache.

$ sudo a2enmod php7.4
$ sudo systemctl restart apache2

If you choose nginx, simply restart nginx after installing PHP 7.4

$ sudo systemctl restart nginx

6. Install Drupal 9

In this section, we will download and install Drupal 9. At the time of writing this blog post, Drupal 9.3.3 is the latest version, you can check it at their release page at https://www.drupal.org/project/drupal. According to their documentation, this Drupal version 9.3.x will receive security coverage until December 8, 2022.

$ cd /var/www/html
$ sudo wget https://ftp.drupal.org/files/projects/drupal-9.3.3.tar.gz

Once downloaded, we need to extract the compressed file.

$ sudo tar xzvf drupal-9.3.3.tar.gz -C /var/www/html/drupal --strip-components=1

Then, change the permissions.

$ sudo chown -R www-data. /var/www/html/drupal

Navigate to http://yourdrupaldomain.com and initiate the installation.

Choose your desired language then click on the save and continue button.

In this article, we choose ‘Standard’ then continue.
If everything is okay, you will be brought to this step. If not, you would want to fix the issues shown in the ‘Verify requirements’ step. Fill the database details in the provided blank fields then click on save and continue button and wait until the installation finishes.

Once completed, you will be brought to the last step to configure your Drupal website.

Fill the details then click on the save and continue button to finalize the installation. And that’s it, you will be automatically redirected to your Drupal website’s backend.

7. Install Free SSL Certificate

In this modern era, it is recommended to secure your website with an SSL certificate. This is not a mandatory step, but it provides secure connections for your Drupal instance.

First, install the Certbot client in your system to manage the SSL:

$ apt install python3-certbot-apache python3-certbot-nginx

Depends on what your webserver is, you can run one of these commands.

$ sudo certbot --apache
$ sudo certbot --nginx

Follow the steps when installing a free SSL certificate from Let’s Encrypt. You would see the output similar to this:

master@ubuntu20:~# sudo certbot --apache
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Plugins selected: Authenticator apache, Installer apache
Enter email address (used for urgent renewal and security notices) (Enter 'c' to
cancel): 

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Please read the Terms of Service at
https://letsencrypt.org/documents/LE-SA-v1.2-November-15-2017.pdf. You must
agree in order to register with the ACME server at
https://acme-v02.api.letsencrypt.org/directory
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
(A)gree/(C)ancel: a
There seem to be problems with that address. Enter email address (used for
urgent renewal and security notices)

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Would you be willing to share your email address with the Electronic Frontier
Foundation, a founding partner of the Let's Encrypt project and the non-profit
organization that develops Certbot? We'd like to send you email about our work
encrypting the web, EFF news, campaigns, and ways to support digital freedom.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
(Y)es/(N)o: n

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Choose the domain/subdomain your are installing Drupal 9 for, and certbot will install the SSL certificate for it. You can also choose whether to redirect the HTTP traffic to HTTPS or not.

That’s it! You have successfully installed Drupal 9 on your Ubuntu 20.04 machine.

Of course, you don’t have to install Drupal 9 on your Ubuntu 20.04 server if you have a server with us, in which case you can simply ask our expert Linux hosting admins to set all of this up for you, quickly and easily. They are available 24×7 and will respond to your request immediately.

PS. If you liked this post, please share it with your friends on the social networks using the buttons below, or simply leave a comment down in the comments section. Thank you.

The post How To Install Drupal 9 CMS on Ubuntu 20.04 appeared first on LinuxHostSupport.

]]>
https://linuxhostsupport.com/blog/how-to-install-drupal-9-cms-on-ubuntu-20-04/feed/ 4
How to Install and Configure HAProxy on Ubuntu 20.04 https://linuxhostsupport.com/blog/how-to-install-and-configure-haproxy-on-ubuntu-20-04/ https://linuxhostsupport.com/blog/how-to-install-and-configure-haproxy-on-ubuntu-20-04/#comments Sun, 30 Jan 2022 18:30:00 +0000 https://linuxhostsupport.com/blog/?p=1629 HAProxy or High Availability Proxy, is a well-known open-source TCP/HTTP load balancer and proxy solution which is able to handle a lot of traffic. HAProxy consumes a very low amount of memory, and it is commonly used to improve the performance of servers by distributing the workload across multiple servers to handle a large number […]

The post How to Install and Configure HAProxy on Ubuntu 20.04 appeared first on LinuxHostSupport.

]]>
HAProxy or High Availability Proxy, is a well-known open-source TCP/HTTP load balancer and proxy solution which is able to handle a lot of traffic. HAProxy consumes a very low amount of memory, and it is commonly used to improve the performance of servers by distributing the workload across multiple servers to handle a large number of concurrent connections. If you have busy websites, you can install and configure HAProxy as the reverse proxy to your webservers.

In this tutorial, we will show you how to install and configure HAProxy on Ubuntu 20.04, one of the most popular operating systems in the world.

Prerequisites

  • 3 Ubuntu 20.04 VPS, one for HAProxy and we will use the other two as the webservers.
  • SSH root access or a normal SSH user with sudo privileges.

Step 1. Login and Update the System

Log in to your Ubuntu 20.04 VPS as a root user or as a regular user with sudo privileges. In this tutorial, we will use a sudoer user called ‘master’.

ssh master@IP_Address -p Port_number

Do not forget to replace “master” with a user that has sudo privileges, or root. Additionally, replace “IP_Address” and “Port_Number” with your server’s IP address and SSH port.

Run this command to check whether you have the proper Ubuntu version installed on your server:

$ lsb_release -a

You should see this output:

No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 20.04.3 LTS
Release: 20.04
Codename: focal
install and configure haproxy on ubuntu 20.04

Now, run the following command to update all installed packages to the latest available version.

$ sudo apt update && sudo apt upgrade

Step 2. Install HAProxy

HAProxy is available on the default Ubuntu 20.04 repository. However, the available package is not the most recent stable version. Let’s check the HAProxy version if we want to install it from Ubuntu 20.04 repository.

$ sudo apt show haproxy
set up and configure haproxy on ubuntu 20.04

You can check the latest stable version at http://www.haproxy.org/#down. In this article, we are going to install HAPproxy 2.5, let’s run the following command to proceed with the installation.

$ sudo apt install software-properties-common


The software-properties-common package is probably already installed on your server, but there will be no issue if you run this command again.

$ sudo add-apt-repository ppa:vbernat/haproxy-2.5

This command puts the Personal Package Archive (PPA) into the list of apt sources. After adding the PPA to our APT source list, we can run the command below to complete the installation. You can replace the version number in the command above if you want to use another version of HAProxy.

$ sudo apt update
$ sudo apt install haproxy

Once installed, we can check the version by running this command:

$ sudo haproxy -v

You should see this output:

HAProxy version 2.5.0-1ppa1~focal 2021/11/26 - https://haproxy.org/
Status: stable branch - will stop receiving fixes around Q1 2023.
Known bugs: http://www.haproxy.org/bugs/bugs-2.5.0.html
Running on: Linux 5.4.0-91-generic #102-Ubuntu SMP Fri Nov 5 16:31:28 UTC 2021 x86_64
setting up and configuring haproxy on ubuntu 20.04

Step 3. Configure HAProxy

By default, HAProxy is not configured to listen on a port number. In this step, since we are going to configure it as a reverse proxy and load balancer, we are going to make changes to the default HAProxy configuration.

$ sudo cp -a /etc/haproxy/haproxy.cfg{,.orig}

The command above will copy the file /etc/haproxy/haproxy.cfg to /etc/haproxy/haproxy.cfg.orig

Now. let’s edit the file.

$ sudo nano /etc/haproxy/haproxy.cfg

And append these lines:

frontend haproxy-main
    bind *:80
    option forwardfor  
    default_backend apache_webservers    

backend apache_webservers
    balance roundrobin
    server websvr1	10.0.0.10:80 check
    server websvr2	10.0.0.20:80 check

Make sure to replace 10.0.0.10 and 10.0.0.20 with your actual webserver IP addresses. Save the file then exit.

Now, log in to your other two servers and install apache on the servers then create a default index file by running these commands.

$ sudo apt update; sudo apt install apache2 -y

On websvr1, run this command:

echo "<H1>Apache on backend server 1 is running </H1>" |sudo tee /var/www/html/index.html

On websvr2, run this command:

echo "<H1>Apache on backend server 2 is running </H1>" |sudo tee /var/www/html/index.html

Save the files then exit.

On your HAProxy server, restart the service:

$ sudo systemctl restart haproxy

The HAProxy server is now ready to accept and distribute the workload across the two apache servers. You can verify this by invoking a one-liner command in your HAProxy server.

$ while true; do curl localhost; sleep 1; done
configure haproxy on ubuntu 20.04

As seen in the picture, the website is loaded both from websvr1 and websvr2.

If you want to see the statistics and see the information through the GUI, we can configure HAProxy and enable the monitoring function.

Open HAProxy configuration file.

$ sudo nano /etc/haproxy/haproxy.cfg

Then append these lines.

listen stats
    bind :8800
    stats enable
    stats uri /
    stats hide-version
    stats auth rosehosting:m0d1fyth15
    default_backend apache_webservers

Pay attention to the stats auth part. This is where you specify the login name and password. Change the login name and password to a stronger password. Save the file, exit and restart HAProxy.

$ sudo systemctl restart haproxy

Now, you can navigate to http://YOUR_HAPROXY_IP_ADDRESS:8800 to see the statistics, you will be asked for the username and password you specified earlier in /etc/haproxy/haproxy.cfg.

installing and configuring haproxy on ubuntu 20.04

That’s it. You have successfully installed HAProxy on your Ubuntu VPS. For more information about HAProxy, please refer to the HAProxy website.

If you are one of our web hosting customers and use our optimized Linux Hosting, you don’t have to install HAProxy On Ubuntu 20.04 by yourself, our expert Linux admins will set up and configure HAProxy on your Ubuntu VPS, for you. They are available 24×7 and will take care of your request immediately.

PS. If you liked this post, on how to install HAProxy on Ubuntu 20.04, please share it with your friends on the social networks using the buttons on the left or simply leave a reply below. Thanks.

The post How to Install and Configure HAProxy on Ubuntu 20.04 appeared first on LinuxHostSupport.

]]>
https://linuxhostsupport.com/blog/how-to-install-and-configure-haproxy-on-ubuntu-20-04/feed/ 2
How To Install Kuma on Ubuntu 20.04 https://linuxhostsupport.com/blog/how-to-install-kuma-on-ubuntu-20-04/ https://linuxhostsupport.com/blog/how-to-install-kuma-on-ubuntu-20-04/#respond Tue, 30 Nov 2021 18:30:00 +0000 https://linuxhostsupport.com/blog/?p=1595 Kuma is an open source monitoring tool like “Uptime Robot” written in Nodejs. In this article, we’ll learn how to install it on Ubuntu 20.04 so we can self-host our Uptime Bot. We’ll also set up a reverse proxy on Apache with a Let’s Encrypt SSL to secure our website. Kuma is easy to use […]

The post How To Install Kuma on Ubuntu 20.04 appeared first on LinuxHostSupport.

]]>
Kuma is an open source monitoring tool like “Uptime Robot” written in Nodejs. In this article, we’ll learn how to install it on Ubuntu 20.04 so we can self-host our Uptime Bot. We’ll also set up a reverse proxy on Apache with a Let’s Encrypt SSL to secure our website.

Kuma is easy to use and upgrade, and is powerful for traffic control, observability, service discovery, etc.

Prerequisites

  • An Ubuntu server 20.04
  • Root access on your server to install and deploy the services.

Adding user to the system

For security reasons, you should deploy the application using a non-root user on your system. To add the user, you can just use this command:

useradd -m -s /bin/bash kuma

After your user is created, you need to set a password using this command:

passwd kuma

Now we’ll let our user have root privileges with the following command:

usermod -aG sudo kuma

Installing NVM (Node Version Manager)

This tool that we’ll install now, will let us specific our nodejs versions for our applications to make our development and deployments environments more flexible.

First of all, we need to switch from the root user to our Kuma.

su - kuma

Now you can just install the NVM with the following command:

curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.38.0/install.sh | bash

You need to reload your bashrc file to load the nvm commands:

source ~/.bashrc

We can check now if the NVM is running with this command:

nvm --version

Install NodeJS LTS Version

To install and deploy your uptime Kuma bot, you need to install nodejs >= 14, git, and pm2. In this section, you’ll learn how to install NodeJS.

With the NVM command properly working, you can simply run:

nvm install --lts

And the latest version will be installed on your server. You can check once it finished with the following command:

kuma@server:~$ node --version
v14.18.1

Downloading and installing Uptime-Kuma

To download the uptime Kuma, you need to install git on your server. You can simply run:

sudo apt-get install git

Now just run the following to download the uptime-kuma:

git clone https://github.com/louislam/uptime-kuma.git

You’ll be able now to access your downloaded content and setup the Kuma with the following command:

cd uptime-kuma/
npm run setup

And you’re done, the uptime-kuma setup runs without errors and we can go to setup pm2.

Setting up Uptime-Kuma with pm2

pm2 is a nodejs process manager that will help you manage and keep your nodejs application alive forever. pm2 has some built-in features that make the nodejs application deployment easy, it allows you to monitor your application status, logs, and even set up the service file for your application.

  1. Install pm2 with npm:
npm install pm2 --global

2. Once the installation is completed, you can run this to start Kuma command:

pm2 start npm --name uptime-kuma -- run start-server -- --port=3001 --hostname=127.0.0.1

You should see a screen like the below once you run the command above:

installing kuma on ubuntu 20.04

Now, we’ll create a system file for the service, first you need to run the below command to get the following result:

pm2 startup

You should receive an output like this one:

sudo env PATH=$PATH:/home/kuma/.nvm/versions/node/v14.18.1/bin /home/kuma/.nvm/versions/node/v14.18.1/lib/node_modules/pm2/bin/pm2 startup systemd -u kuma --hp /home/kuma

Just copy the result and paste it on your terminal, so you’ll have an output like this:

installation of kuma on ubuntu 20.04

We need to save the current ongoing process:

pm2 save

Settuping a reverse proxy on kuma service

First of all, we need to install the apache on our server:

sudo apt install apache2

Once the installation is done, you need to enable the proxy modules:

sudo a2enmod ssl proxy proxy_ajp proxy_wstunnel proxy_http rewrite deflate headers proxy_balancer proxy_connect proxy_html

We need to create the virtualhost for our subdomain or domain with the following content:

<VirtualHost *:80>
  ServerName EXAMPLE.COM
  ProxyPass / http://localhost:3001/
  RewriteEngine on
  RewriteCond %{HTTP:Upgrade} websocket [NC]
  RewriteCond %{HTTP:Connection} upgrade [NC]
  RewriteRule ^/?(.*) "ws://localhost:3001/$1" [P,L]
</VirtualHost>

(Be sure to change from example.com to your actual domain)

You can now access your domain and you should see the Kuma website

Setting up Let’s Encrypt on our domain

First of all, to secure our domains with Let’s Encrypt, we need to install the certbot. The service responsible for the verification of our domain:

sudo apt install python3-certbot-apache

To generate a certificate on your domain, you need to run the following command:

sudo certbot --apache example.com

(Be sure to change from example.com to your actual domain)

And you just need to follow the instructions on your terminal.

So, we are done. You can now proceed with your uptime kuma setup and finish it. Everything should be working fine with HTTPS.

setting up kuma on ubuntu 20.04

Of course, you don’t have to install Uptime Kuma on Ubuntu 20.04, if you use one of our managed VPS hosting services, in which case you can simply ask our expert Linux admins to set up this for you. They are available 24/7 and will take care of your request immediately.

The post How To Install Kuma on Ubuntu 20.04 appeared first on LinuxHostSupport.

]]>
https://linuxhostsupport.com/blog/how-to-install-kuma-on-ubuntu-20-04/feed/ 0
How to Install Joomla 4.0 on Ubuntu 20.04 https://linuxhostsupport.com/blog/how-to-install-joomla-4-0-on-ubuntu-20-04/ https://linuxhostsupport.com/blog/how-to-install-joomla-4-0-on-ubuntu-20-04/#respond Mon, 15 Nov 2021 18:30:00 +0000 https://linuxhostsupport.com/blog/?p=1582 Joomla is one of the most popular open-source content management systems (CMS). It is used to publish applications and websites online. It is written in PHP and is commonly configured to use MySQL/MariaDB databases. In this tutorial, we will show you how to install Joomla 4.0 on Ubuntu 20.04 server.  It should work everywhere but […]

The post How to Install Joomla 4.0 on Ubuntu 20.04 appeared first on LinuxHostSupport.

]]>
Joomla is one of the most popular open-source content management systems (CMS). It is used to publish applications and websites online. It is written in PHP and is commonly configured to use MySQL/MariaDB databases.

installing joomla 4.0 on ubuntu 20.04

In this tutorial, we will show you how to install Joomla 4.0 on Ubuntu 20.04 server.  It should work everywhere but we will do this on one of our Joomla hosting servers.

Prerequisites:

– A VPS running Ubuntu 20.04
– Administrative sudo user with root privileges

Step 1: Connect to your Server

To connect to your server via SSH as user root, use the following command:

ssh root@IP_ADDRESS -p PORT_NUMBER

and replace “IP_ADDRESS” and “PORT_NUMBER” with your actual server IP address and SSH port number.

Once logged in, make sure that your server is up-to-date by running the following commands:

sudo apt-get update
sudo apt-get upgrade

Step 2: Install Apache web server and PHP

Joomla requires a webserver to function. Apache is a fast and secure web server and one of the most popular and widely used web servers in the world. You can install it from the official Ubuntu repositories running the following command:

sudo apt install apache2

After installing Apache, the commands below can be used to stop, start and enable Apache services to always start up every time your server starts up.

sudo systemctl stop apache2.service
sudo systemctl start apache2.service
sudo systemctl enable apache2.service

To verify that Apache is running, execute the following command:

sudo systemctl status apache2
installation of joomla 4.0 on ubuntu 20.04

Since Joomla is built on PHP, you will need to install PHP as well. You will install PHP and other supporting packages by running the following command:

sudo apt install php php-common libapache2-mod-php php-cli php-fpm php-mysql php-json php-opcache php-gmp php-curl php-intl php-mbstring php-xmlrpc php-gd php-xml php-zip

To verify that PHP is successfully installed, run the following command:

php -v

You should get the following output on your screen:

PHP 7.4.3 (cli) (built: Aug 13 2021 05:39:12) ( NTS )
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies
with Zend OPcache v7.4.3, Copyright (c), by Zend Technologies

Once all the packages are installed, we will need to edit the php.ini file and modify some settings:

memory_limit = 512M
upload_max_filesize = 256M
post_max_size = 256M 
max_execution_time = 300
output_buffering = off
date.timezone = America/Chicago

Step 3: Install MariaDB

Joomla uses MariaDB/MySQL as a database.  To install the MariaDB database server, enter the following command:

sudo apt install -y mariadb-server mariadb-client

Secure your installation

When the installation is complete, run the following command to secure your installation:

mysql_secure_installation

This script will set the MariaDB root password, disable remote root login and remove anonymous users as shown below:

Enter current password for root (enter for none):
Set root password? [Y/n] Y
New password:
Re-enter new password:
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 Joomla Database

Next, you will need to create a database and user for the Joomla installation. First, connect to the MariaDB shell with the following command:

mysql -u root -p

Once connected, create a database and user using the following command:

MariaDB [(none)]> CREATE DATABASE joomla;
MariaDB [(none)]> GRANT ALL PRIVILEGES ON joomla.* TO 'joomla'@'localhost' IDENTIFIED BY  'StrongPassword';
MariaDB [(none)]> FLUSH PRIVILEGES;
MariaDB [(none)]> EXIT;

At this point, MariaDB is installed and configured for Joomla. You can now proceed to install Joomla.

Step 5: Install Joomla

Now that you have your environment completely set up, you can proceed with the Joomla installation. At the time of writing this article, the latest version of Joomla is 4.0.3. You can download it from the Joomla! 4.0 downloads page using the following command:

wget https://downloads.joomla.org/cms/joomla4/4-0-3/Joomla_4-0-3-Stable-Full_Package.zip

Once the download is completed, unzip the archive and move the extracted files to the /var/www/html/joomla directory, which will be the root directory of your new Joomla site:

sudo unzip Joomla_4-0-3-Stable-Full_Package.zip -d /var/www/html/joomla

Finally, change the ownership of the /var/www/html/joomla directory to the www-data user:

sudo chown -R www-data: /var/www/html/joomla

Step 6: Configure Apache for Joomla

Next, you will need to create an Apache virtual host configuration file for the Joomla installation. You can create it with the following command:

nano /etc/apache2/sites-available/joomla.conf

Add the following lines:

<VirtualHost *:80>
     ServerAdmin admin@your_domain.com
     DocumentRoot /var/www/html/joomla/
     ServerName your_domain.com
     ServerAlias www.your_domain.com

     <Directory /var/www/html/joomla/>
          Options FollowSymlinks
          AllowOverride All
          Require all granted
     </Directory>

     ErrorLog ${APACHE_LOG_DIR}/error.log
     CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>

Save and close the file then activate the Joomla virtual host with the following command:

a2ensite joomla.conf

Next, restart the Apache service to apply the changes:

systemctl restart apache2

Open http://your_domain.com in your favorite web browser and follow the on-screen instructions to complete the Joomla installation.

how to set up joomla 4.0 on ubuntu 20.04

Select your language and enter your site name.

setting up joomla 4.0 on ubuntu 20.04

Insert username and password for your Joomla 4.0 administration account.

Note: Passwords must have at least 12 characters.

how to configure joomla 4.0 on ubuntu 20.04

Set the databases configuration credentials as created previously.

configuring joomla 4.0 on ubuntu 20.04

Click on Complete & Open Site to visit the Joomla 4.0 front page

configuration of joomla 4.0 on ubuntu 20.04

or hit Complete & Open Admin to visit the Joomla 4.0 administration back-end.

installing and setting up joomla 4.0 on ubuntu 20.04

Use your administrator credentials created during the Joomla 4.0 installation.

installation and configuring of joomla 4.0 on ubuntu 20.04

That’s it. You have successfully installed Joomla 4.0 on Ubuntu 20.04. For more information about how to manage your Joomla installation, please refer to the official Joomla documentation.


Of course, you don’t have to install Joomla 4.0 on Ubuntu 20.04, if you use one of our managed VPS hosting services, in which case you can simply ask our expert Linux admins to set up this for you. They are available 24×7 and will take care of your request immediately.

PS. If you liked this post on how to install Joomla 4.0 on Ubuntu 20.04, please share it with your friends on the social networks using the buttons on the left or simply leave a reply below. Thanks.

The post How to Install Joomla 4.0 on Ubuntu 20.04 appeared first on LinuxHostSupport.

]]>
https://linuxhostsupport.com/blog/how-to-install-joomla-4-0-on-ubuntu-20-04/feed/ 0
How to Install and Configure Docker Compose on Ubuntu 20.04 https://linuxhostsupport.com/blog/how-to-install-and-configure-docker-compose-on-ubuntu-20-04/ https://linuxhostsupport.com/blog/how-to-install-and-configure-docker-compose-on-ubuntu-20-04/#respond Sat, 30 Oct 2021 17:30:00 +0000 https://linuxhostsupport.com/blog/?p=1551 Docker Compose is a command-line tool for managing multiple Docker containers. It is a tool for building isolated containers through the YAML file to modify your application’s services. On the other hand, Ubuntu 20.04 feels more stable and easy to use, and as a result, users consider the operations running more smoothly, compared to some […]

The post How to Install and Configure Docker Compose on Ubuntu 20.04 appeared first on LinuxHostSupport.

]]>
Docker Compose is a command-line tool for managing multiple Docker containers. It is a tool for building isolated containers through the YAML file to modify your application’s services.

how to install docker compose on ubuntu 20.04

On the other hand, Ubuntu 20.04 feels more stable and easy to use, and as a result, users consider the operations running more smoothly, compared to some previous versions. Still, some users have issues while installing certain apps and software. Such is the case with Docker Compose.

In the following tutorial, we will show you how to install Docker Compose on Ubuntu 20.04 server.

Prerequisites

  • A fresh Ubuntu 20.04 VPS.
  • Access to the root user account (or access to an admin account with root privileges)

Step 1: Log in to the Server & Update the Server OS Packages

First, log in to your Ubuntu 20.04 server via SSH as the root user:

ssh root@IP_Address -p Port_number

You will need to replace ‘IP_Address‘ and ‘Port_number‘ with your server’s respective IP address and SSH port number. Additionally, replace ‘root‘ with the username of the admin account if necessary.

Before starting, you have to make sure that all Ubuntu 20.04 OS packages installed on the server are up to date. You can do this by running the following commands:

apt-get update -y

Step 2: Install  docker-compose on your server

By default, Docker Compose is available in the Ubuntu 20.04 default repository. You can install it with the following command:

apt-get install docker-compose

Once the Docker Compose is installed, verify the installed version with the following command:

docker-compose --version

You should get the following output:

docker-compose version 1.25.0, build unknown

This option will not guarantee that you downloading the latest docker-compose version.

On the GitHub repository, you will get the updates of Docker Compose, which might not be available on the standard Ubuntu repository. At the time of this writing this tutorial, the most current stable version is 1.29.2.

curl -L "https://github.com/docker/compose/releases/download/1.29.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose

This command saves the file in: /usr/local/bin directory, under the name docker-compose.

Next, you need to change the file permission, and making the downloaded file executable with the following command:

chmod +x /usr/local/bin/docker-compose

Once Docker Compose is installed, verify the installed version with the following command:

docker-compose --version

You should get the following output:

docker-compose version 1.29.2, build 5becea4c

Step 3: Test Docker Compose with Sample Container

Create a new directory for your sample container example:

mkdir test

Change directory that you just created:

cd test

From there, create a YAML configuration file:

nano docker-compose.yaml

And copy the following configuration into docker-compose.yaml file:

version: '3.3'
services:
   hello-world:
      image:
         hello-world:latest

Next, run the following command to pull the hello-world image on your system.

docker-compose up

The output should be similar to this:

Creating network "root_default" with the default driver
Pulling hello-world (hello-world:latest)...
latest: Pulling from library/hello-world
2db29710123e: Pull complete
Digest: sha256:9ade9cc2e26189a19c2e8854b9c8f1e14829b51c55a630ee675a5a9540ef6ccf
Status: Downloaded newer image for hello-world:latest
Creating root_hello-world_1 ... done
Attaching to root_hello-world_1
hello-world_1 |
hello-world_1 | Hello from Docker!
hello-world_1 | This message shows that your installation appears to be working correctly.
hello-world_1 |
hello-world_1 | To generate this message, Docker took the following steps:
hello-world_1 | 1. The Docker client contacted the Docker daemon.
hello-world_1 | 2. The Docker daemon pulled the "hello-world" image from the Docker Hub.
hello-world_1 | (amd64)
hello-world_1 | 3. The Docker daemon created a new container from that image which runs the
hello-world_1 | executable that produces the output you are currently reading.
hello-world_1 | 4. The Docker daemon streamed that output to the Docker client, which sent it
hello-world_1 | to your terminal.
hello-world_1 |
hello-world_1 | To try something more ambitious, you can run an Ubuntu container with:
hello-world_1 | $ docker run -it ubuntu bash
hello-world_1 |
hello-world_1 | Share images, automate workflows, and more with a free Docker ID:
hello-world_1 | https://hub.docker.com/
hello-world_1 |
hello-world_1 | For more examples and ideas, visit:
hello-world_1 | https://docs.docker.com/get-started/
hello-world_1 |
root_hello-world_1 exited with code 0

After downloading the image, Docker Compose creates a container and runs the hello-world program.

If you want to see the container information, you can use the following command:

docker ps -a

The output should be similar to this:

CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
31b0b7a2e9f0 hello-world:latest "/hello" 17 minutes ago Exited (0) 17 minutes ago root_hello-world_1

In this tutorial, we learned how to install Docker Compose on your Ubuntu 20.04 server, as well as the basics of how to use it.

Of course, you don’t need to do any of this if your server is covered by our Managed Linux Support services in which case you can simply ask our expert Linux admins to install Docker Composer onto your Ubuntu 20.04 server for you. They are available 24×7 and will take care of your request immediately.

installing docker compose on ubuntu 20.04

PS. If you liked this post, please share it with your friends on the social networks using the buttons below, or simply leave a comment in the comment section. Thanks.

The post How to Install and Configure Docker Compose on Ubuntu 20.04 appeared first on LinuxHostSupport.

]]>
https://linuxhostsupport.com/blog/how-to-install-and-configure-docker-compose-on-ubuntu-20-04/feed/ 0
How to Install Python 3.9 on Ubuntu 20.04 https://linuxhostsupport.com/blog/how-to-install-python-3-9-on-ubuntu-20-04/ https://linuxhostsupport.com/blog/how-to-install-python-3-9-on-ubuntu-20-04/#comments Fri, 15 Oct 2021 17:30:00 +0000 https://linuxhostsupport.com/blog/?p=1545 In the following article, we’ll walk through the installation of your Python 3.9 version with two options. Installing it directly from the APT repository or building the Python 3.9 from the source. Python is one of the world’s most popular programming languages. It is a versatile language used to build all kinds of applications, from […]

The post How to Install Python 3.9 on Ubuntu 20.04 appeared first on LinuxHostSupport.

]]>
In the following article, we’ll walk through the installation of your Python 3.9 version with two options. Installing it directly from the APT repository or building the Python 3.9 from the source. Python is one of the world’s most popular programming languages.

install python 3.9 on ubuntu 20.04

It is a versatile language used to build all kinds of applications, from simple scripts to complex machine learning algorithms. With its simple and easy-to-learn syntax, Python is a popular choice for beginners and experienced developers. Next, you will learn how to install Python 3.9 on Ubuntu 20.04 version, using a few simple steps to complete this process.

Installing Python 3.9 on Ubuntu 20.04 with Apt

Below we’ll show you how to install Python 3.9 using the apt cli from Python, we just need to follow the following steps.

1 – We’ll start with the apt update and installation of the prerequisites.

apt update -y
apt upgrade -y
apt install software-properties-common

2 – Once you finish the update and prerequisites installation, we need to add the deadsnakes PPA to our system’s sources list. The following command will do that:

add-apt-repository ppa:deadsnakes/ppa

When prompted, you need to press [Enter] in order to continue.

3- Then, you just need to install the python with this command, once the repository is successfully added.

apt install python3.9

4- Once installed, you can verify the version installed with:

python3.9 --version
Output
Python 3.9.7

That’s it, you successfully installed python3.9 on your server using APT

Installing Python 3.9 on Ubuntu 20.04 from Source

The benefit to install Python from the source is that it allows you to install the latest Python version and customize the build options. However, you will not be able to maintain your Python installation through the apt package manager. Since it was installed from the source.

Bellow, we’ll learn how to do that.

1- Update your server and be sure to install the necessary dependencies to build python:

apt update -y
apt upgrade -y
apt install build-essential zlib1g-dev libncurses5-dev libgdbm-dev libnss3-dev libssl-dev libreadline-dev libffi-dev libsqlite3-dev wget libbz2-dev -y

2- Download the latest release source code from the Python download page with wget installed on the last step. In this tutorial we are using the 3.9.7, the latest one today.

wget https://www.python.org/ftp/python/3.9.7/Python-3.9.7.tgz

3- Now, we need to extract the python compressed file with the following command:

tar -xvf Python-3.9.7.tgz

4- We’ll start the build of our Python now, let’s enter the directory now and start the configure script.

cd Python-3.9.7/
./configure --enable-optimizations

The flag –enable-optimizations is optional. It will optimize the python binary, but the build process will be slower.

5 – Starting the build process with the make command:

make

6 – When the build process is complete, we’ll install the Python binaries by typing:

make altinstall

7- Once the binaries are installed, you can test your python version with the following command:

python3.9 --version
Output
Python 3.9.7

That’s it, you successfully installed Python 3.9 on your Ubuntu 20.04 server. You can now run your python scripts using the latest version available. We hope this tutorial on Python will help you, and don’t forget to leave a reply of appreciation below, in the comments section.

Alternatively, in case you are out of time and need to automate things, you can always subscribe to one of our managed Linux hosting plans and let a team of industry experts do it for you, 100% free of charge. Thanks!

The post How to Install Python 3.9 on Ubuntu 20.04 appeared first on LinuxHostSupport.

]]>
https://linuxhostsupport.com/blog/how-to-install-python-3-9-on-ubuntu-20-04/feed/ 1
How to Install Joomla 3.9 on Ubuntu 20.04 https://linuxhostsupport.com/blog/how-to-install-joomla-3-9-on-ubuntu-20-04/ https://linuxhostsupport.com/blog/how-to-install-joomla-3-9-on-ubuntu-20-04/#comments Wed, 15 Sep 2021 17:30:05 +0000 https://linuxhostsupport.com/blog/?p=1520 Joomla is a free and open-source content management system (CMS) built in PHP Joomla allows users to publish different kinds of websites, such as personal blogs, government applications, corporate intranets and extranets, small and large business websites, etc. In today’s article, we will guide you through the steps of installing the latest stable release of […]

The post How to Install Joomla 3.9 on Ubuntu 20.04 appeared first on LinuxHostSupport.

]]>
Joomla is a free and open-source content management system (CMS) built in PHP Joomla allows users to publish different kinds of websites, such as personal blogs, government applications, corporate intranets and extranets, small and large business websites, etc. configure joomla 3.9 on ubuntu 20.04

In today’s article, we will guide you through the steps of installing the latest stable release of Joomla on an Ubuntu 20.04 VPS, with all necessary components, such as Apache web server, MySQL database server, and PHP.

Prerequisites

  • Ubuntu 20.04 VPS. We will use one of our SSD 2 VPS hosting plans.
  • system user with sudo privileges
  • MySQL database server version 5.1 or newer (5.5.3 + is recommended)
  • Apache web server version 2.0 or newer (2.4 + is recommended)
  • PHP version 5.3.10 or newer (7.3 + is recommended)

Login and Update the VPS

Open your favorite terminal application and log in to your Ubuntu 20.04 VPS via SSH

ssh root@IP_address -p Port_number

Don’t forget to replace user, IP_address, and Port_number with your server’s actual IP address and port number.

Once you are in, run the following command to make sure that all installed packages on the VPS are up to date

apt update && apt upgrade

Install Apache web server

The first component we will install on the VPS is the Apache web server. We need it to serve the website content to the visitors. We can easily install the web server by running the following command

apt -y install apache2

After the command completes, start the Apache web server and enable it to start automatically after a server reboot

systemctl start apache2
systemctl enable apache2

Confirm that the web server is running

systemctl status apache2

Output:

● apache2.service - The Apache HTTP Server
  Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor preset: enabled)
  Active: active (running)
  Docs: https://httpd.apache.org/docs/2.4/
  Main PID: 271961 (apache2)
  Tasks: 55 (limit: 4620)
  Memory: 5.7M
  CGroup: /system.slice/apache2.service
├─271961 /usr/sbin/apache2 -k start

Install PHP

Joomla is PHP based application and one of the requirements for its installation is PHP. Run the following command to install PHP 7.4 along with some other PHP dependencies

apt install php libapache2-mod-php php-mysql php-opcache php-xml php-gd php-mbstring php-curl php-xmlrpc php-intl php-soap php-zip

Wait for the installation process to complete and run the following command to check if the right version of PHP is installed

# php -v
PHP 7.4.3 (cli) (built: Jul 5 2021 15:13:35) ( NTS )
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies
with Zend OPcache v7.4.3, Copyright (c), by Zend Technologies

From the output above we can confirm that PHP version 7.4.3 is properly installed on the Ubuntu 20.04 VPS.

Next, we will have to tweak some values in the PHP configuration file (php.ini). Open the PHP configuration file (/etc/php/7.4/apache2/php.ini) and modify the following values:

  • memory_limit – Minimum: 64M Recommended: 128M or higher
  • upload_max_filesize – Minimum: 30M
  • post_max_size – Minimum: 30M
  • max_execution_time: Recommended: 30

Save the php.ini file and restart the web server for the changes to take effect

sysemctl restart apache2

Install MySQL and create database

The Joomla installation requires a database to store data such as articles, users, menus, and categories. MySQL and PostgreSQL databases are supported, but in our example, we will use MySQL. Let’ proceed and install the MySQL database server

apt install -y mysql-server

Check the version of MySQL installed on our Ubuntu 20.04 VPS

mysql -V
mysql Ver 8.0.26-0ubuntu0.20.04.2 for Linux on x86_64 ((Ubuntu))

Next, we will run the mysql_secure_installation post-installation script to improve the security of the MySQL server and set the MySQL root password

mysql_secure_installation

Set a strong password for the MySQL root user when prompted and proceed with the next steps. You can use the following options:

remove anonymous users? (Press y|Y for Yes, any other key for No) : y
Disallow root login remotely? (Press y|Y for Yes, any other key for No) : y
Remove test database and access to it? (Press y|Y for Yes, any other key for No) : y
Reload privilege tables now? (Press y|Y for Yes, any other key for No) : y

Next, log in to the MySQL server as user root

mysql -u root -p
mysql> CREATE DATABASE joomladb;
mysql> CREATE USER 'joomlauser'@'localhost' IDENTIFIED BY 'STRONG_PASSWORD';
mysql> GRANT ALL PRIVILEGES ON joomladb.* TO 'joomlauser'@'localhost';
mysql> FLUSH PRIVILEGES;
mysql> exit

Replace STRONG_PASSWORD with an actual strong password.

Download Joomla

Download the latest stable release of Joomla from their website to your server. At the moment of writing this article, it is version 3.9.28.

wget https://downloads.joomla.org/cms/joomla3/3-9-28/Joomla_3-9-28-Stable-Full_Package.zip

Create a new directory for your Joomla website, inside the document root directory

mkdir /var/www/html/joomla

Unpack the downloaded ZIP package to the newly created directory

unzip Joomla_3-9-28-Stable-Full_Package.zip -d /var/www/html/joomla/

Change the ownership of the files inside the Joomla directory

chown -R www-data:www-data /var/www/html/joomla/

Create Apache virtual host

Next, in order to be able to access the Joomla website with a domain name, we will have to create an appropriate virtual host

vim /etc/apache2/sites-available/domain.com.conf

Enter the following content

<VirtualHost *:80>
    ServerName domain.com 
    ServerAdmin webmaster@domain.com 
    DocumentRoot /var/www/html/joomla
    <Directory /var/www/html/joomla>
         Allowoverride all
   </Directory>
</VirtualHost>

Where domain.com is your actual domain.

Disable the default Apache virtual host and enable the newly created one

a2dissite 000-default
a2ensite domain.com

Reload the web server for the changes to take effect

systemctl reload apache2

Complete Joomla Installation

Now that we have Joomla downloaded and all necessary components installed on our server, we can proceed and complete the Joomla installation using its web installation wizard. Open your favorite web browser, go to http://domain.com and Joomla’s web installation wizard will appear on your screen.

The first step of the installation is to enter the main details of your website such as the name of the website, website description, and create your superuser account

setting up joomla 3.9 on ubuntu 20.04

On the second step of the installation process, you will have to enter the information about the MySQL database we created in this tutorial. Enter the details as shown on the image below

set up joomla 3.9 on ubuntu 20.04

The final step of the installation is actually an overview of all information we entered about the Joomla installation and it includes an option for installing sample data. Once you confirm that everything is OK, click the install button and you will see the final, success page.

install joomla 3.9 on ubuntu 20.04

That’s all. The latest version of Joomla is successfully installed on your Ubuntu 20.04 website. You can check Joomla’s official documentation for more details on how to use and configure the application.


Of course, you don’t have to install Joomla 3.9 on Ubuntu 20.04 if you use one of our Joomla VPS hosting services, in which case you can simply ask our expert Linux admins to install Joomla on your Ubuntu 20.04 server, for you. They are available 24/7/365 and will take care of your request immediately. You can also consider reading our post on how to install Joomla 3.9 on Ubuntu 20.04. installing joomla 3.9 on ubuntu 20.04

PS. If you liked this post on how to install Joomla 3.9 on Ubuntu 20.04, please share it with your friends on the social networks using the buttons on the left or simply leave a reply below. Thanks.

The post How to Install Joomla 3.9 on Ubuntu 20.04 appeared first on LinuxHostSupport.

]]>
https://linuxhostsupport.com/blog/how-to-install-joomla-3-9-on-ubuntu-20-04/feed/ 1
How to Install Asterisk on Ubuntu 20.04 https://linuxhostsupport.com/blog/how-to-install-asterisk-on-ubuntu-20-04/ https://linuxhostsupport.com/blog/how-to-install-asterisk-on-ubuntu-20-04/#comments Wed, 30 Jun 2021 17:30:40 +0000 https://linuxhostsupport.com/blog/?p=1429 Asterisk is an open-source framework used for building communications applications including VoIP gateways, and conference servers. It is used by small businesses, enterprises, call centers, and governments worldwide. Asterisk uses a VoIP protocol that allows you to make a call using the TCP/IP without any cost. It provides very useful features including, voicemail, call recording, […]

The post How to Install Asterisk on Ubuntu 20.04 appeared first on LinuxHostSupport.

]]>
Asterisk is an open-source framework used for building communications applications including VoIP gateways, and conference servers. It is used by small businesses, enterprises, call centers, and governments worldwide. Asterisk uses a VoIP protocol that allows you to make a call using the TCP/IP without any cost. It provides very useful features including, voicemail, call recording, automatic call, music on hold, messaging, and more.install asterisk on ubuntu 20.04

Asterisk can run on multiple operating systems, although it was originally created for Linux. Today, NetBSD, macOS, and Solaris users, among others, can install and use the Asterisk software with ease.

In this guide, we will show you how to install and configure Asterisk on Ubuntu 20.04.

Prerequisites

  • An Ubuntu 20.04 VPS (we’ll be using our SSD 2 VPS plan)
  • Access to the root user account (or access to an admin account with root privileges)

Log in to the Server & Update the Server OS Packages

First, log in to your Ubuntu 20.04 server via SSH as the root user:

ssh root@IP_Address -p Port_number

You will need to replace ‘IP_Address’ and ‘Port_number’ with your server’s respective IP address and SSH port number. Additionally, replace ‘root’ with the username of the admin account if necessary.

Before starting, you have to make sure that all Ubuntu OS packages installed on the server are up to date. You can do this by running the following commands:

apt-get update -y
apt-get upgrade -y

Install Required Dependencies

Before starting, you will need to install some dependencies required to build the Asterisk server. You can install all of them using the following command:

apt-get install build-essential git autoconf wget subversion pkg-config libjansson-dev libxml2-dev uuid-dev libsqlite3-dev libtool -y

Once all the packages are installed, you will need to install DAHDI to communicate Asterisk with analog and digital telephones.

First, download the latest version of DAHDI to the /opt directory:

cd /opt
git clone -b next git://git.asterisk.org/dahdi/linux dahdi-linux

Next, change the directory to the downloaded directory and compile it using the following command:

cd dahdi-linux
make
make install

Next, download the DAHDI tools with the following command:

cd /opt
git clone -b next git://git.asterisk.org/dahdi/tools dahdi-tools

Once the download is completed, configure and install it with the following command:

cd dahdi-tools
autoreconf -i
./configure
make install
make install-config
dahdi_genconf modules

Next, download the LibPRI to communicate Asterisk with ISDN connections.

git clone https://gerrit.asterisk.org/libpri libpri
cd libpri

Next, install it using the following command:

make
make install

Once all the necessary tools are installed, you can proceed to install Asterisk.

Install Asterisk

By default, the Asterisk package is not included in the Ubuntu 20.04 default repository. So you will need to download and compile it from the source. You can download it from the Git Hub using the following command:

git clone -b 18 https://gerrit.asterisk.org/asterisk asterisk-18

Once the download is completed, change the directory to the downloaded directory and install required dependencies with the following command:

cd asterisk-18/
contrib/scripts/get_mp3_source.sh
contrib/scripts/install_prereq install

Next, configure the Asterisk with the following command:

./configure

You should get the following output:

configure: Menuselect build configuration successfully completed

               .$$$$$$$$$$$$$$$=..      
            .$7$7..          .7$$7:.    
          .$$:.                 ,$7.7   
        .$7.     7$$$$           .$$77  
     ..$$.       $$$$$            .$$$7 
    ..7$   .?.   $$$$$   .?.       7$$$.
   $.$.   .$$$7. $$$$7 .7$$$.      .$$$.
 .777.   .$$$$$$77$$$77$$$$$7.      $$$,
 $$$~      .7$$$$$$$$$$$$$7.       .$$$.
.$$7          .7$$$$$$$7:          ?$$$.
$$$          ?7$$$$$$$$$$I        .$$$7 
$$$       .7$$$$$$$$$$$$$$$$      :$$$. 
$$$       $$$$$$7$$$$$$$$$$$$    .$$$.  
$$$        $$$   7$$$7  .$$$    .$$$.   
$$$$             $$$$7         .$$$.    
7$$$7            7$$$$        7$$$      
 $$$$$                        $$$       
  $$$$7.                       $$  (TM)     
   $$$$$$$.           .7$$$$$$  $$      
     $$$$$$$$$$$$7$$$$$$$$$.$$$$$$      
       $$$$$$$$$$$$$$$$.                

configure: Package configured for: 
configure: OS type  : linux-gnu
configure: Host CPU : x86_64
configure: build-cpu:vendor:os: x86_64 : pc : linux-gnu :
configure: host-cpu:vendor:os: x86_64 : pc : linux-gnu :

Next, you will need to select the modules that you want to install with Asterisk. You can select it using the following command:

make menuselect

You can use the Arrow key to navigate and Enter key to select the modules.

Select and enables the Addons as shown below: how to install asterisk on ubuntu 20.04

Next, enable the Core sound modules: set up asterisk on ubuntu 20.04 Next, enable the additional MOH packages: how to set up asterisk on ubuntu 20.04 Next, enable the Extra Sound Packages: setting up asterisk on ubuntu 20.04

Now, click on the Save and Exit button.

Next, build the Asterisk using the following command:

make -j2

Next, Asterisk and its modules using the following command:

make install

You should get the following output:

 +---- Asterisk Installation Complete -------+
 +                                           +
 +    YOU MUST READ THE SECURITY DOCUMENT    +
 +                                           +
 + Asterisk has successfully been installed. +
 + If you would like to install the sample   +
 + configuration files (overwriting any      +
 + existing config files), run:              +
 +                                           +
 + For generic reference documentation:      +
 +    make samples                           +
 +                                           +
 + For a sample basic PBX:                   +
 +    make basic-pbx                         +
 +                                           +
 +                                           +
 +-----------------  or ---------------------+
 +                                           +
 + You can go ahead and install the asterisk +
 + program documentation now or later run:   +
 +                                           +
 +               make progdocs               +
 +                                           +
 + **Note** This requires that you have      +
 + doxygen installed on your local system    +
 +-------------------------------------------+

You can also install the documentation and basic PBX config files with the following command:

make samples
make basic-pbx

Next, install the Asterisk init script with the following command:

make config

Next, update the shared libraries using the following command:

ldconfig

Create Asterisk User

It is always recommended to run Asterisk as a standalone user for security reasons.

First, create a new Asterisk user with the following command:

adduser --system --group --home /var/lib/asterisk --no-create-home --gecos "Asterisk PBX" asterisk

Next, edit the Asterisk default configuration file and configure it to run as a asterisk user:

nano /etc/default/asterisk

Uncomment the following lines:

AST_USER="asterisk"
AST_GROUP="asterisk"

Save and close the file then add the asterisk user to dialout and audio group:

usermod -a -G dialout,audio asterisk

Next, set proper ownership and permissions of all Asterisk files and directories with the following command:

chown -R asterisk: /var/{lib,log,run,spool}/asterisk /usr/lib/asterisk /etc/asterisk
chmod -R 750 /var/{lib,log,run,spool}/asterisk /usr/lib/asterisk /etc/asterisk

Start and Verify Asterisk

At this point, Asterisk is installed and configured. Now, you can start the Asterisk service using the following command:

systemctl start asterisk

You can also enable the Asterisk service to start at system reboot with the following command:

systemctl enable asterisk

To check the status of the Asterisk service, run the following command:

systemctl status asterisk

You should get the following output:

● asterisk.service - LSB: Asterisk PBX
     Loaded: loaded (/etc/init.d/asterisk; generated)
     Active: active (running) since Sun 2021-05-16 12:24:29 UTC; 13s ago
       Docs: man:systemd-sysv-generator(8)
    Process: 60668 ExecStart=/etc/init.d/asterisk start (code=exited, status=0/SUCCESS)
      Tasks: 46 (limit: 4691)
     Memory: 34.7M
     CGroup: /system.slice/asterisk.service
             └─60685 /usr/sbin/asterisk -U asterisk -G asterisk

May 16 12:24:29 ubuntu2004 systemd[1]: Starting LSB: Asterisk PBX...
May 16 12:24:29 ubuntu2004 asterisk[60668]:  * Starting Asterisk PBX: asterisk
May 16 12:24:29 ubuntu2004 asterisk[60668]:    ...done.
May 16 12:24:29 ubuntu2004 systemd[1]: Started LSB: Asterisk PBX.

Now, connect to the Asterisk command line utility with the following command:

asterisk -vvvr

Once connected, you should get the following output:

Asterisk GIT-18-78d7862463, Copyright (C) 1999 - 2021, Sangoma Technologies Corporation and others.
Created by Mark Spencer 
Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details.
This is free software, with components licensed under the GNU General Public
License version 2 and other licenses; you are welcome to redistribute it under
certain conditions. Type 'core show license' for details.
=========================================================================
Connected to Asterisk GIT-18-78d7862463 currently running on ubuntu2004 (pid = 60685)
ubuntu2004*CLI> 

Congratulations! You have successfully installed and configured Asterisk server on Ubuntu 20.04 VPS.

Of course, you don’t have to install and set up Asterisk if you use one of our Managed VPS Hosting services, in which case you can simply ask our expert Linux admins to install Asterisk on Ubuntu 20.04, for you. They are available 24×7 and will take care of your request immediately. If you’re looking to find something else, such as how to install Magento or Elasticsearch on Ubuntu 20.04, check out our blog.

install asterisk on ubuntu 20.04

If you liked this post on how to install Asterisk on Ubuntu 20.04, please share it with your friends on the social networks using the buttons on the left or simply leave a reply below. Thanks.

The post How to Install Asterisk on Ubuntu 20.04 appeared first on LinuxHostSupport.

]]>
https://linuxhostsupport.com/blog/how-to-install-asterisk-on-ubuntu-20-04/feed/ 9
How to Install Mahara on Ubuntu 20.04 https://linuxhostsupport.com/blog/how-to-install-mahara-on-ubuntu-20-04/ https://linuxhostsupport.com/blog/how-to-install-mahara-on-ubuntu-20-04/#respond Wed, 07 Apr 2021 16:28:36 +0000 https://linuxhostsupport.com/blog/?p=1377 Mahara is a free and open-source electronic portfolio management system written in PHP. It is a web-based application mainly used in academic institutions to provide a platform to share their knowledge. It helps you to create a digital classroom and organize a student’s progress. You can also create a blog, build a resume, file repository, […]

The post How to Install Mahara on Ubuntu 20.04 appeared first on LinuxHostSupport.

]]>
installing mahara on ubuntu 20.04Mahara is a free and open-source electronic portfolio management system written in PHP. It is a web-based application mainly used in academic institutions to provide a platform to share their knowledge. It helps you to create a digital classroom and organize a student’s progress. You can also create a blog, build a resume, file repository, and a competency framework using Mahara. Compared to other Learning Management Systems, Mahara is distributed and user-focused.

In this tutorial, we will show you how to install Mahara on Ubuntu 20.04 server.

Prerequisites

  • An Ubuntu 20.04 VPS (we’ll be using our SSD 2 VPS plan)
  • Access to the root user account (or access to an admin account with root privileges)

Step 1: Log in to the Server & Update the Server OS Packages

First, log in to your Ubuntu 20.04 server via SSH as the root user:

ssh root@IP_Address -p Port_number

You will need to replace ‘IP_Address’ and ‘Port_number’ with your server’s respective IP address and SSH port number. Additionally, replace ‘root’ with the username of the admin account if necessary.

Before starting, you have to make sure that all Ubuntu OS packages installed on the server are up to date. You can do this by running the following commands:

apt-get update -y
apt-get upgrade -y

Step 2: Install LAMP Server

Mahara runs on a web server, written in PHP and uses MySQL or PostgreSQL as a database backend. So LAMP server must be installed in your server. If not installed, you can install it with the following command:

apt-get install apache2 mariadb-server php libapache2-mod-php php-mysql php-gd php-curl php-json php-xml php-mbstring -y

Once all the required packages are installed, edit the php.ini file and make some changes:

nano /etc/php/7.4/apache2/php.ini

Change the following lines:

log_errors = On
upload_max_filesize = 50M
post_max_size = 100M

And, add the following lines at the end of the file:

register_globals = Off
magic_quotes_runtime = Off
magic_quotes_sybase = Off
magic_quotes_gpc = Off
allow_call_time_pass_reference = Off

Save and close the file then restart the Apache service to apply the changes:

systemctl restart apache2

Step 3: Create a Database

Next, you will need to create a database and user for Mahara. First, connect to the MariaDB with the following command:

mysql

Once connected, create a database and user with the following command:

MariaDB [(none)]> create database maharadb character set utf8mb4;
MariaDB [(none)]> grant all on maharadb.* to 'mahara'@'localhost' identified by 'password';

Next, flush the privileges and exit from the MariaDB with the following command:

MariaDB [(none)]> flush privileges;
MariaDB [(none)]> exit;

Once the database is created, you can proceed to download Mahara.

Step 4: Install Mahara

First, visit the Mahara website and download the latest version of Mahara with the following command:

wget https://launchpad.net/mahara/20.10/20.10.0/+download/mahara-20.10.0.tar.bz2

Once the download is completed, extract the downloaded file with the following command:

bunzip2 mahara-20.10.0.tar.bz2 
tar -xvf mahara-20.10.0.tar

Next, move the extracted directory to the Apache web root with the following command:

mv mahara-20.10.0 /var/www/html/mahara

Next, create a data directory for Mahara with the following command:

mkdir /var/www/html/mahara/data

Next, set the ownership and permissions with the following command:

chown -R www-data:www-data /var/www/html/mahara
chmod -R 755 /var/www/html/mahara

Next, change the directory to Mahara and generate a secrets with the following command:

cd /var/www/html/mahara/htdocs
openssl rand -base64 32

You should get the following output:

QaU6HjHs6N93JIFX1bysH6OwmNP/QnDsIGI7MiX0Yag=

Next, rename the default config.php file:

cp config-dist.php config.php

Next, edit the config.php file and define database settings, data directory and secrets:

nano config.php

Change the following lines:

$cfg->dbtype   = 'mysql';
$cfg->dbhost   = 'localhost';
$cfg->dbport   = null; // Change if you are using a non-standard port number for your database
$cfg->dbname   = 'maharadb';
$cfg->dbuser   = 'mahara';
$cfg->dbpass   = 'password';
$cfg->dataroot = '/var/www/html/mahara/data';
$cfg->passwordsaltmain = 'QaU6HjHs6N93JIFX1bysH6OwmNP/QnDsIGI7MiX0Yag=';
$cfg->urlsecret = 'mysupersecret';

Save and close the file when you are finished.

Step 5: Configure Apache for Mahara

Next, create an Apache virtual host configuration file with the following command:

nano /etc/apache2/sites-available/mahara.conf

Add the following lines:

<VirtualHost *:80>
ServerAdmin admin@yourdomain.com
DocumentRoot /var/www/html/mahara/htdocs/
ServerName mahara.example.com
<Directory /var/www/html/mahara/htdocs/>
Options FollowSymLinks
AllowOverride All
Order allow,deny
allow from all
</Directory>
ErrorLog /var/log/apache2/your-domain.com-error_log
CustomLog /var/log/apache2/your-domain.com-access_log common
</VirtualHost>

Save and close the file then enable the Apache virtual host with the following command:

a2ensite mahara.conf

Next, reload the Apache service to apply the changes:

systemctl reload apache2

Step 6: Setup a Cron Job

In order to update the RSS feeds and send email notifications, you will need to set a cron jobs that run every minute.

You can set up it with the following command:

crontab -e

Add the following line:

* * * * * php /var/www/html/mahara/htdocs/lib/cron.php

Save and close the file when you are finished.

Step 7: Access Mahara Web Interface

Now, open your web browser and access the Mahara web UI using the URL http://mahara.example.com. You will be redirected to the following page:

install mahara on ubuntu 20.04

Click on the Install Mahara button to start the installation. Once the installation has been finished, you should see the following page:

install mahara ubuntu 20.04

Click on the Continue button. You should see the following page:

configure mahara on ubuntu 20.04

Set your admin password and click on the Submit button. You will be redirected to the Mahara dashboard in the following page:

how to install mahara on ubuntu

Congratulations! you have successfully installed Mahara on Ubuntu 20.04.

Of course, you don’t have to install Mahara on Ubuntu if you use one of our Server Support Services, in which case you can simply ask our expert Linux admins to install Mahara on Ubuntu, for you. They are available 24×7 and will take care of your request immediately.

PS. If you liked this post on how to install Mahara on Ubuntu, please share it with your friends on the social networks using the buttons on the left or simply leave a reply below. Thanks.

The post How to Install Mahara on Ubuntu 20.04 appeared first on LinuxHostSupport.

]]>
https://linuxhostsupport.com/blog/how-to-install-mahara-on-ubuntu-20-04/feed/ 0
How to Install Elasticsearch on Ubuntu 20.04 https://linuxhostsupport.com/blog/how-to-install-elasticsearch-on-ubuntu-20-04/ https://linuxhostsupport.com/blog/how-to-install-elasticsearch-on-ubuntu-20-04/#comments Wed, 03 Feb 2021 09:53:04 +0000 https://linuxhostsupport.com/blog/?p=1359 Elasticsearch is an open-source platform for full-text search and analytics engines. It allows you to store, search, and analyze a large amount of data in real-time. It is a popular search engine designed for applications that have complex search requirements. With Elasticsearch, you can build a complex search functionality similar to the Google search engine. […]

The post How to Install Elasticsearch on Ubuntu 20.04 appeared first on LinuxHostSupport.

]]>
installing elasticsearch on ubuntu 20.04Elasticsearch is an open-source platform for full-text search and analytics engines. It allows you to store, search, and analyze a large amount of data in real-time. It is a popular search engine designed for applications that have complex search requirements. With Elasticsearch, you can build a complex search functionality similar to the Google search engine.

In this tutorial, we will show you how to install Elasticsearch on Ubuntu 20.04.

Prerequisites

  • An Ubuntu 20.04 VPS (we’ll be using our SSD 2 VPS plan)
  • Access to the root user account (or access to an admin account with root privileges)

Step 1: Log in to the Server & Update the Server OS Packages

First, log in to your Ubuntu 20.04 server via SSH as the root user:

ssh root@IP_Address -p Port_number

You will need to replace ‘IP_Address’ and ‘Port_number’ with your server’s respective IP address and SSH port number. Additionally, replace ‘root’ with the username of the admin account if necessary.

Before starting, you have to make sure that all Ubuntu OS packages installed on the server are up to date. You can do this by running the following commands:

apt-get update -y
apt-get upgrade -y

Step 2: Add Elasticseach Repository

By default, Elasticsearch is not available in the Ubuntu standard OS repository. So you will need to add the Elasticsearch repository to your system.

First, install the required dependencies with the following command:

apt-get install apt-transport-https ca-certificates gnupg2 -y

Once all the dependencies are installed, import the GPG key with the following command:

wget -qO - https://artifacts.elastic.co/GPG-KEY-elasticsearch | apt-key add -

Next, add the Elasticsearch repository with the following command:

sh -c 'echo "deb https://artifacts.elastic.co/packages/7.x/apt stable main" > /etc/apt/sources.list.d/elastic-7.x.list'

Once the repository is added, you can proceed and install Elasticsearch.

Step 3: Install Elasticsearch

Now, update the repository cache and install the Elasticsearch with the following command:

apt-get update -y
apt-get install elasticsearch -y

Once the installation is completed, start the Elasticsearch service and enable it to start at system reboot with the following command:

systemctl start elasticsearch
systemctl enable elasticsearch

Next, verify whether Elasticsearch is running or not with the following command:

curl -X GET "localhost:9200"

You should get the following output:

{
  "name" : "ubuntu2004",
  "cluster_name" : "elasticsearch",
  "cluster_uuid" : "JJY-gI6ESgqEvz1dSPxs3g",
  "version" : {
    "number" : "7.10.1",
    "build_flavor" : "default",
    "build_type" : "deb",
    "build_hash" : "1c34507e66d7db1211f66f3513706fdf548736aa",
    "build_date" : "2020-12-05T01:00:33.671820Z",
    "build_snapshot" : false,
    "lucene_version" : "8.7.0",
    "minimum_wire_compatibility_version" : "6.8.0",
    "minimum_index_compatibility_version" : "6.0.0-beta1"
  },
  "tagline" : "You Know, for Search"
}

Step 4: Configure Elasticsearch for Remote Access

By default, Elasticsearch is configured to listen on localhost only. If your application is hosted on the remote server and wants to use the Elasticsearch database then you will need to configure Elasticsearch to allow remote connection.

You can do it by editing Elasticsearch main configuration file:

nano /etc/elasticsearch/elasticsearch.yml

Uncomment and change the following line:

cluster.name: my-application
network.host: 192.168.0.100
discovery.seed_hosts: 192.168.0.100     

Save and close the file then restart the Elasticsearch service to apply the configuration changes:

systemctl restart elasticsearch

installing elasticsearch on ubuntu 20.04Congratulations! you have successfully installed Elasticsearch on an Ubuntu 20.04 VPS.installing Elasticsearch on Ubuntu 20.04

If you use one of our server management services, can simply ask our expert Linux admins to setup this for you. They are available 24×7 and will take care of your request immediately.

PS. If you liked this post please share it with your friends on the social networks using the buttons on the left or simply leave a reply below. Thanks.

The post How to Install Elasticsearch on Ubuntu 20.04 appeared first on LinuxHostSupport.

]]>
https://linuxhostsupport.com/blog/how-to-install-elasticsearch-on-ubuntu-20-04/feed/ 1
How to Install SOGo on Ubuntu 20.04 https://linuxhostsupport.com/blog/how-to-install-sogo-on-ubuntu-20-04/ https://linuxhostsupport.com/blog/how-to-install-sogo-on-ubuntu-20-04/#comments Wed, 20 Jan 2021 13:18:38 +0000 https://linuxhostsupport.com/blog/?p=1349 SOGo is a free and open-source collaborative software with a focus on simplicity and scalability. It provides an AJAX-based Web interface and supports multiple native clients through the use of standard protocols such as CalDAV, CardDAV, and GroupDAV, as well as Microsoft ActiveSync. It also offers address book management, calendaring, and Web-mail clients along with […]

The post How to Install SOGo on Ubuntu 20.04 appeared first on LinuxHostSupport.

]]>
installing sogo on ubuntu 20.04SOGo is a free and open-source collaborative software with a focus on simplicity and scalability. It provides an AJAX-based Web interface and supports multiple native clients through the use of standard protocols such as CalDAV, CardDAV, and GroupDAV, as well as Microsoft ActiveSync. It also offers address book management, calendaring, and Web-mail clients along with resource sharing and permission handling.

In this tutorial, we will show you how to install SOGo on an Ubuntu 20.04 based virtual private server.

Prerequisites

  • An Ubuntu 20.04 VPS (we’ll be using our SSD 2 VPS plan)
  • Access to the root user account (or access to an admin account with root privileges)

Step 1: Log in to the Server & Update the Server OS Packages

First, log in to your Ubuntu 20.04 server via SSH as the root user:

ssh root@IP_Address -p Port_number

You will need to replace ‘IP_Address‘ and ‘Port_number‘ with your server’s respective IP address and SSH port number. Additionally, replace ‘root’ with the username of the admin account if necessary.

Before starting, you have to make sure that all Ubuntu OS packages installed on the server are up to date. You can do this by running the following commands:

apt-get update -y
apt-get upgrade -y

Step 2: Install and Configure MariaDB Server

SOGo uses MariaDB, MySQL, or PostgreSQL as a database backend. So you will need to install the database server in your server.

You can install the MariaDB server by running the following command:

apt-get install mariadb-server -y

Once installed, log in to the MariaDB shell with the following command:

mysql

After login, create a database and use it for SOGo with the following command:

MariaDB [(none)]> CREATE DATABASE sogo;
MariaDB [(none)]> GRANT ALL ON sogo.* TO 'sogo'@'localhost' IDENTIFIED BY 'your-secure-password';

Next, change the database to SOGo and create a required table and insert some values with the following command:

MariaDB [(none)]> USE sogo;
MariaDB [sogo]> CREATE TABLE sogo_users (c_uid VARCHAR(10) PRIMARY KEY, c_name VARCHAR(10), c_password VARCHAR(32), c_cn VARCHAR(128), mail VARCHAR(128));
MariaDB [sogo]> INSERT INTO sogo_users VALUES ('admin1', 'admin1', MD5('your-secure-password'), 'SOGouser', 'sogo@example.com');

Next, flush the privileges and exit from the MariaDB with the following command:

MariaDB [sogo]> flush privileges; 
MariaDB [sogo]> exit;

Now, the MariaDB database server is installed and configured.

Step 3: Install SOGo

By default, SOGo is not available in the Ubuntu 20.04 standard repository. So you will need to download their packages from the SOGo official website. All packages are available at Sope and Sogo

You can download all the packages using the following command:

wget https://packages.inverse.ca/SOGo/nightly/5/ubuntu/pool/focal/s/sogo/sogo-activesync_5.0.1.20201101-1_amd64.deb
wget https://packages.inverse.ca/SOGo/nightly/5/ubuntu/pool/focal/s/sogo/sogo-dbg_5.0.1.20201101-1_amd64.deb
wget https://packages.inverse.ca/SOGo/nightly/5/ubuntu/pool/focal/s/sogo/sogo-dev_5.0.1.20201101-1_amd64.deb
wget https://packages.inverse.ca/SOGo/nightly/5/ubuntu/pool/focal/s/sogo/sogo_5.0.1.20201101-1_amd64.deb
wget https://packages.inverse.ca/SOGo/nightly/5/ubuntu/pool/focal/s/sope/libsbjson2.3-dev_4.9.r1664.20201016_amd64.deb
wget https://packages.inverse.ca/SOGo/nightly/5/ubuntu/pool/focal/s/sope/libsbjson2.3_4.9.r1664.20201016_amd64.deb
wget https://packages.inverse.ca/SOGo/nightly/5/ubuntu/pool/focal/s/sope/libsope-appserver4.9-dev_4.9.r1664.20201016_amd64.deb
wget https://packages.inverse.ca/SOGo/nightly/5/ubuntu/pool/focal/s/sope/libsope-appserver4.9_4.9.r1664.20201016_amd64.deb
wget https://packages.inverse.ca/SOGo/nightly/5/ubuntu/pool/focal/s/sope/libsope-core4.9-dev_4.9.r1664.20201016_amd64.deb
wget https://packages.inverse.ca/SOGo/nightly/5/ubuntu/pool/focal/s/sope/libsope-core4.9_4.9.r1664.20201016_amd64.deb
wget https://packages.inverse.ca/SOGo/nightly/5/ubuntu/pool/focal/s/sope/libsope-gdl1-4.9-dev_4.9.r1664.20201016_amd64.deb
wget https://packages.inverse.ca/SOGo/nightly/5/ubuntu/pool/focal/s/sope/libsope-gdl1-4.9_4.9.r1664.20201016_amd64.deb
wget https://packages.inverse.ca/SOGo/nightly/5/ubuntu/pool/focal/s/sope/libsope-ldap4.9-dev_4.9.r1664.20201016_amd64.deb
wget https://packages.inverse.ca/SOGo/nightly/5/ubuntu/pool/focal/s/sope/libsope-ldap4.9_4.9.r1664.20201016_amd64.deb
wget https://packages.inverse.ca/SOGo/nightly/5/ubuntu/pool/focal/s/sope/libsope-mime4.9_4.9.r1664.20201016_amd64.deb
wget https://packages.inverse.ca/SOGo/nightly/5/ubuntu/pool/focal/s/sope/libsope-xml4.9-dev_4.9.r1664.20201016_amd64.deb
wget https://packages.inverse.ca/SOGo/nightly/5/ubuntu/pool/focal/s/sope/libsope-xml4.9_4.9.r1664.20201016_amd64.deb
wget https://packages.inverse.ca/SOGo/nightly/5/ubuntu/pool/focal/s/sope/libsope4.9-dev_4.9.r1664.20201016_all.deb
wget https://packages.inverse.ca/SOGo/nightly/5/ubuntu/pool/focal/s/sope/sope4.9-appserver_4.9.r1664.20201016_amd64.deb
wget https://packages.inverse.ca/SOGo/nightly/5/ubuntu/pool/focal/s/sope/sope4.9-dbg_4.9.r1664.20201016_amd64.deb
wget https://packages.inverse.ca/SOGo/nightly/5/ubuntu/pool/focal/s/sope/sope4.9-gdl1-mysql_4.9.r1664.20201016_amd64.deb
wget https://packages.inverse.ca/SOGo/nightly/5/ubuntu/pool/focal/s/sope/sope4.9-gdl1-postgresql_4.9.r1664.20201016_amd64.deb
wget https://packages.inverse.ca/SOGo/nightly/5/ubuntu/pool/focal/s/sope/sope4.9-libxmlsaxdriver_4.9.r1664.20201016_amd64.deb
wget https://packages.inverse.ca/SOGo/nightly/5/ubuntu/pool/focal/s/sope/sope4.9-stxsaxdriver_4.9.r1664.20201016_amd64.deb

Once all the packages are downloaded, run the following command to install them:

dpkg -i *.deb

Next, run the following command to install all missing dependencies:

apt-get install -f

Once SOGo is installed, start the SOGo service and enable it to start at system reboot:

systemctl start sogo
systemctl enable sogo

Step 4: Install and Configure Apache

Next, you will need to install the Apache webserver for SOGo. You can install it with the following command:

apt-get install apache2 -y

Next, enable all required modules with the following command:

a2enmod proxy proxy_http headers rewrite
a2enconf SOGo.conf

Next, edit the SOGo virtual host configuration file:

nano /etc/apache2/conf-enabled/SOGo.conf

Find the following lines:

  RequestHeader set "x-webobjects-server-port" "443"
  RequestHeader set "x-webobjects-server-url" "https://%{HTTP_HOST}e" env=HTTP_HOST

And, replaced them with the following:

  RequestHeader set "x-webobjects-server-port" "80"
  RequestHeader set "x-webobjects-server-url" "http://%{HTTP_HOST}e" env=HTTP_HOST

Save and close the file then restart the Apache service to apply the changes:

systemctl restart apache2

Step 5: Configure SOGo

Next, you will need to configure SOGo to use MariaDB for authentication. You can do it by editing the SOGo main configuration file:

nano /etc/sogo/sogo.conf

Add the following lines at the end of the file as per your database settings:

SOGoProfileURL = "mysql://sogo:your-secure-password@localhost:3306/sogo/sogo_user_profile";
OCSFolderInfoURL = "mysql://sogo:your-secure-password@localhost:3306/sogo/sogo_folder_info";
OCSSessionsFolderURL = "mysql://sogo:your-secure-password@localhost:3306/sogo/sogo_sessions_folder";

SOGoPasswordChangeEnabled = YES;

SOGoUserSources =
  (
    {
      type = sql;
      id = users;
     viewURL = "mysql://sogo:your-secure-password@127.0.0.1:3306/sogo/sogo_users";
     canAuthenticate = YES;
     isAddressBook = NO;
      userPasswordAlgorithm = md5;
    }
  );

  SOGoPageTitle = SOGo;
  SOGoVacationEnabled = YES;
  SOGoForwardEnabled = YES;
  SOGoSieveScriptsEnabled = YES;
  SOGoMailAuxiliaryUserAccountsEnabled = YES;
  SOGoTrustProxyAuthentication = NO;
  SOGoXSRFValidationEnabled = YES;

  SOGoSuperUsernames = (admin1, admin2); // This is an array - keep the parents!

Save and close the file when you are finished then restart the SOGo service to apply the changes:

systemctl restart sogo

Step 6: Access SOGo Web UI

Now, open your web browser and type the URL http://your-domain.com/SOGo to access the SOGo web interface. You will be redirected to the SOGo login page as shown below:

install sogo ubuntu 20.04

Provide username as admin1 and password as “your-secure-password” then click on the > button. You will be redirected to the SOGo dashboard:

install sogo on ubuntu

That’s it. You have successfully installed SOGo on your Ubuntu 20.04 based VPS.

install sogo on ubuntu 20.04If you use one of our Server Management Services, you don’t have to install SoGo yourself, you can ask our system administrators and they will install SoGo on Ubuntu 20.04 or any other OS of your choice.

PS. If you liked this post please share it with your friends on the social networks using the buttons on the left or simply leave a reply below. Thanks.

The post How to Install SOGo on Ubuntu 20.04 appeared first on LinuxHostSupport.

]]>
https://linuxhostsupport.com/blog/how-to-install-sogo-on-ubuntu-20-04/feed/ 12