Ubuntu | LinuxHostSupport https://linuxhostsupport.com/blog/category/ubuntu/ Linux Tutorials and Guides Tue, 25 Jun 2024 15:54:52 +0000 en-US hourly 1 https://wordpress.org/?v=6.6.1 How to Install MySQL on Ubuntu 24.04 https://linuxhostsupport.com/blog/how-to-install-mysql-on-ubuntu-24-04/ https://linuxhostsupport.com/blog/how-to-install-mysql-on-ubuntu-24-04/#respond Mon, 15 Jul 2024 17:30:00 +0000 https://linuxhostsupport.com/blog/?p=2132 In this blog post, we will explain how to install MySQL on Ubuntu 24.04. MySQL is an open-source relational database management system written in C and C++ developed and maintained by the Oracle Corporation. MySQL offers a variety of features, such as speed, security, and replication, and it is one of the most popular databases. […]

The post How to Install MySQL on Ubuntu 24.04 appeared first on LinuxHostSupport.

]]>
In this blog post, we will explain how to install MySQL on Ubuntu 24.04. MySQL is an open-source relational database management system written in C and C++ developed and maintained by the Oracle Corporation. MySQL offers a variety of features, such as speed, security, and replication, and it is one of the most popular databases. The data types provided by MySQL are int, tinyint, long, char, float, double, datetime, etc. In this tutorial, we will show you how to install MySQL, manage the MySQL services, and some simple operations about creating databases, users, etc.

This process will take up to 15 minutes. Let’s get started!

Prerequisites

  • A server running Ubuntu 24.04 OS
  • User privileges: root or non-root user with sudo privileges

Update the System

We assume that you have a fresh installation of Ubuntu 24.04, so it is recommended that the packages be updated to their latest version before we take any actions on the server.

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

Install MySQL server

Once, the system is up to date, we can proceed with the MySQL installation. To install MySQL on your server execute the following command:

sudo apt install mysql-server

After this command, you should allow some time for the installation to complete.

Manage the MySQL service

Once the installation is completed we can proceed with managing the MySQL service.

To start and enable the service:

sudo systemctl start mysql && sudo systemctl enable mysql

You should receive the following output:

root@host:# sudo systemctl start mysql && sudo systemctl enable mysql
Synchronizing state of mysql.service with SysV service script with /usr/lib/systemd/systemd-sysv-install.
Executing: /usr/lib/systemd/systemd-sysv-install enable mysql

To check the status of the service execute the command below:

sudo systemctl status mysql

You should get the following output:

root@host:~# sudo systemctl status mysql
● mysql.service - MySQL Community Server
     Loaded: loaded (/usr/lib/systemd/system/mysql.service; enabled; preset: enabled)
     Active: active (running) since Sat 2024-06-08 16:39:34 CDT; 2min 40s ago
   Main PID: 43182 (mysqld)
     Status: "Server is operational"
      Tasks: 37 (limit: 4613)
     Memory: 365.3M (peak: 379.7M)
        CPU: 2.968s
     CGroup: /system.slice/mysql.service
             └─43182 /usr/sbin/mysqld

Jun 08 16:39:32 host.test.vps systemd[1]: Starting mysql.service - MySQL Community Server...
Jun 08 16:39:34 host.test.vps systemd[1]: Started mysql.service - MySQL Community Server.

To restart the service you can use the following command:

sudo systemctl restart mysql

To stop the MySQL service:

sudo systemctl stop mysql

Create MySQL Database and User

Since we installed the MySQL database we will provide you with some simple tasks about creating a database and user in MySQL and assigning permissions between them. First log into the MySQL console with the following command:

mysql

You should see the following screen:

root@host:~# mysql
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 8
Server version: 8.0.36-2ubuntu3 (Ubuntu)

Copyright (c) 2000, 2024, Oracle and/or its affiliates.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql>

To create a database execute the following command:

create database testdb;

After successful creation, you will get the following output:

mysql> create database testdb;
Query OK, 1 row affected (0.01 sec)

Now, let’s create a user:

create user testinguser@localhost IDENTIFIED BY 'StrongPasswordHere';

You will get the following output:

mysql> create user testuser;
Query OK, 0 rows affected (0.03 sec)

We have the database and the user. With the next command, we will grant access to the user on the database.

grant all ON testdb.* TO 'testinguser'@'localhost';
flush privileges;
 

There are many MySQL commands such as dumping and importing database, repairing tables, and optimizing MySQL configuration which will not be explained in this tutorial since it was only for the installation and the most common commands for creating database and user. Of course, you do not have to do this installation alone. You only need to sign up for our monthly server management or per-incident server support and submit a support ticket. Our admins will help you with any aspect of the MySQL installation and configuration on your server.

If you liked this post on how to install MySQL on Ubuntu 24.04, please share it with your friends and leave a comment below. Thanks.

The post How to Install MySQL on Ubuntu 24.04 appeared first on LinuxHostSupport.

]]>
https://linuxhostsupport.com/blog/how-to-install-mysql-on-ubuntu-24-04/feed/ 0
How to Install Node.js and NPM on Ubuntu 24.04 https://linuxhostsupport.com/blog/how-to-install-node-js-and-npm-on-ubuntu-24-04/ https://linuxhostsupport.com/blog/how-to-install-node-js-and-npm-on-ubuntu-24-04/#respond Thu, 30 May 2024 17:30:00 +0000 https://linuxhostsupport.com/blog/?p=2086 NodeJS is an open-source JavaScript runtime environment, one of the most popular tools among web developers. Developers typically use NodeJS to improve the functionality of web applications or create local development environments. This tutorial will guide you on how to install Node.JS and NPM on Ubuntu 24.04 using the default repository and NodeSource. You will […]

The post How to Install Node.js and NPM on Ubuntu 24.04 appeared first on LinuxHostSupport.

]]>
NodeJS is an open-source JavaScript runtime environment, one of the most popular tools among web developers. Developers typically use NodeJS to improve the functionality of web applications or create local development environments. This tutorial will guide you on how to install Node.JS and NPM on Ubuntu 24.04 using the default repository and NodeSource. You will also learn how to install a specific version of NodeJS using NVM.

Prerequisites

  • An Ubuntu 24.04 VPS
  • SSH root access or user with sudo privileges

Conventions

# – given commands should be executed with root privileges either directly as a root user or by use of sudo command
$ – given commands should be executed as a regular user

Step 1. Login to the server

First, log in to your Ubuntu 24.04 server through SSH as the root user:

ssh master@IP_Address -p Port_number

You must replace ‘IP_Address‘ and ‘Port_number‘ with your server’s IP address and SSH port number. Additionally, replace ‘master’ with the username of the system user with sudo privileges.

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 Noble Numbat
Release: 24.04
Codename: noble

Step 2. Install Dependencies

To install NodeJS on our system, we need to install some dependencies. Let’s run the command below to install them.

$ sudo apt install curl apt-transport-https ca-certificates gnupg

Step 3. Install NodeJS and NPM from APT

The easiest way to install NodeJS and NPM on an Ubuntu 24.04 system is from the default APT repository. You will get NodeJS version 18 and NPM version 9 using this installation method. The installation is simple and straightforward. Let’s execute the command below to install NodeJS and NPM.

$ sudo apt install nodejs npm -y

Once installed, you can run this command to check the version.

$ nodejs -v; npm -v
master@ubuntu24:~$ nodejs -v; npm -v
v18.19.1
9.2.0

Step 4. Install NodeJS and NPM from NodeSource

We can install NodeJS from the Ubuntu default repository, but we will get an older version of NodeJS if we use this method. Alternatively, we will install NodeJS and npm through NodeJS repository to get the more recent version of it. If compared to Ubuntu’s default repository, NodeSource offer more versions to choose.

$ curl -sL https://deb.nodesource.com/setup_lts.x | sudo -E bash -

Once completed, we must download the package information from the newly added source above.

$ sudo apt update

Next, run the following command to install NodeJS and NPM.

$ sudo apt install nodejs

That’s it. NodeJS and NPM are installed. You can check the installed version by executing this one-liner:

$ node -v; npm -v

Now go to https://nodejs.org/en/download/ and see what is the LTS version. You have just installed the same version as shown there, and you will see an output like this after running the command above:

master@ubuntu24:~$ node -v; npm -v
v20.11.1
10.2.4

Again, this installation method is suitable if you want to get the LTS or a specific version. For example, if you want version 18, you can execute this command instead.

$ curl -fsSL https://deb.nodesource.com/setup_18.x | sudo -E bash -

Replace 18 with any version you want if you want another version.

Step 5. Install NodeJS and NPM using NVM

Another way to install NodeJS on Ubuntu is by using the Node Version Manager (NVM). NVM is a bash script used to manage several versions of NodeJS on your system. This installation method allows you to install and maintain different independent versions of NodeJS simultaneously.

Run this command below to download the script.

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

Then, we need to source the script.

$ source ~/.bashrc

After executing the command, you can list the available version of NodeJS to install with this command:

$ nvm list-remote

The command will return a message containing a long list of NodeJS version to choose.

To install version 20.11.1, run this command

$ nvm install 20.11.1

As explained earlier, you can have multiple version of NodeJS, you can install another version using the same command with the different version in the command.

To switch between the installed version, you can run this command:

$ nvm use 18.19.1

Replace 18.19.1 with the version you want to switch to. Make sure the version is already installed.

Congratulation! You have successfully learned how to install Node.JS and NPM on your Ubuntu 24.04 VPS. For more information about NodeJS and NPM, please refer to the NodeJS website.

If you are still unsure, you don’t have to install NodeJS and NPM On Ubuntu 24.04 yourself. Our Linux admins will set up and configure a NodeJS and NPM VPS for you on our monthly management plans or per incident server support plans.

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

The post How to Install Node.js and NPM on Ubuntu 24.04 appeared first on LinuxHostSupport.

]]>
https://linuxhostsupport.com/blog/how-to-install-node-js-and-npm-on-ubuntu-24-04/feed/ 0
How to Install PHP 8.3 on Ubuntu 24.04 https://linuxhostsupport.com/blog/how-to-install-php-8-3-on-ubuntu-24-04/ https://linuxhostsupport.com/blog/how-to-install-php-8-3-on-ubuntu-24-04/#comments Tue, 30 Apr 2024 17:30:00 +0000 https://linuxhostsupport.com/blog/?p=2078 This tutorial will teach you how to install PHP 8.3 on Ubuntu 24.04. PHP is a scripting language used for development purposes. It was an abbreviation for Personal Home Page, but now it stands for the recursive initialism known as PHP Hypertext Preprocessor. PHP is used for creating dynamic web pages, and according to the […]

The post How to Install PHP 8.3 on Ubuntu 24.04 appeared first on LinuxHostSupport.

]]>
This tutorial will teach you how to install PHP 8.3 on Ubuntu 24.04. PHP is a scripting language used for development purposes. It was an abbreviation for Personal Home Page, but now it stands for the recursive initialism known as PHP Hypertext Preprocessor. PHP is used for creating dynamic web pages, and according to the reports in 2024, PHP is used by 76% of all websites whose programming language can be determined. Most popular CMS systems like WordPress, Drupal, or Joomla are written in PHP. The latest stable version of PHP is PHP 8.3.

Installing PHP 8.3 and its extensions is straightforward and may take a few minutes. Let’s get started!

Prerequisites to install PHP 8.3 on Ubuntu 24.04

  • A server running Ubuntu 24.04 or any Linux OS
  • User privileges: root or non-root user with sudo privileges

Step 1. Update the system

We assume that you have a fresh installation of Ubuntu 24.04, and we need to update the system before we start installing PHP 8.3. To do that, execute the following commands:

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

Step 2. Install PHP 8.3

Once the system is updated, we can install the latest stable version of PHP8.3. This version is, by default, enabled in the Ubuntu 24.04 repository, and we do not need to add any keys and repositories. The installation command is straightforward:

sudo apt install php8.3 -y

After successful installation, you can check the version of the PHP:

php -v

You should get the following output:

root@host:~# php -v
PHP 8.3.0-1ubuntu1 (cli) (built: Jan 19 2024 14:00:34) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.3.0, Copyright (c) Zend Technologies
    with Zend OPcache v8.3.0-1ubuntu1, Copyright (c), by Zend Technologies

Step 3. Install PHP 8.3 extensions

Installation of the PHP itself will not run the websites smoothly. We need additional modules, such as PHP, to work with MySQL, with images, for HTTP requests, XML data, etc. In the next command, we will install a couple of PHP extensions that are very important for one website:

sudo apt install libapache2-mod-php php8.3-common php8.3-cli php8.3-mbstring php8.3-bcmath php8.3-fpm php8.3-mysql php8.3-zip php8.3-gd php8.3-curl php8.3-xml -y

After the installation, we can check the installed PHP modules with the command below:

php -m

We will get a long list of modules:

root@host:~# php -m
[PHP Modules]
bcmath
calendar
Core
ctype
curl
date
dom
exif
FFI
fileinfo
filter
ftp
gd
gettext
hash
iconv
json
libxml
mbstring
mysqli
	.
	.
	.
	.
xml
xmlreader
xmlwriter
xsl
Zend OPcache
zip
zlib	

Step 4. Test PHP

Now, in this last step, we will make a test PHP file in our web server document root to test whether or not the PHP is working. But before that, we need to install the Apache Web server:

sudo apt install apache2 -y

After installation, start and enable the service:

sudo systemctl start apache2 && sudo systemctl enable apache2

If everything is ok, check the status of the service:

sudo systemctl status apache2

You should get output similar to this:

root@host:# sudo systemctl status apache2
● apache2.service - The Apache HTTP Server
     Loaded: loaded (/usr/lib/systemd/system/apache2.service; enabled; preset: enabled)
     Active: active (running) since Thu 2024-03-14 07:33:03 CDT; 8min ago
       Docs: https://httpd.apache.org/docs/2.4/
   Main PID: 92315 (apache2)
      Tasks: 7 (limit: 4624)
     Memory: 16.1M (peak: 16.2M)
        CPU: 170ms
     CGroup: /system.slice/apache2.service

Next, go into your Apache document root:

cd /var/www/html

Create info.php file:

touch info.php

Open the file with your favorite editor and paste the following lines of code:

<?php
phpinfo();
?>

Save the file, close it, and restart the Apache service.

sudo systemctl restart apache2

Now you can access the file in the browser by vising the following URL: http:YourServerIPaddress:/info.php

Learn how to Install PHP 8.3 on Ubuntu 24.04

That’s it. You successfully learned how to install PHP 8.3 on Ubuntu 24.04. Of course, you do not have to do this on your own. Our admins can help you with any aspect of the PHP installation on your server. Feel free to contact us. We are available 24/7.

PS. If you liked this post on how to install PHP 8.3 on Ubuntu 24.04, please share it with your friends on social networks or leave a comment in the comments section. Thank you.

The post How to Install PHP 8.3 on Ubuntu 24.04 appeared first on LinuxHostSupport.

]]>
https://linuxhostsupport.com/blog/how-to-install-php-8-3-on-ubuntu-24-04/feed/ 1
How to Install Adminer on Ubuntu 22.04 https://linuxhostsupport.com/blog/how-to-install-adminer-on-ubuntu-22-04/ https://linuxhostsupport.com/blog/how-to-install-adminer-on-ubuntu-22-04/#respond Thu, 30 Nov 2023 18:30:00 +0000 https://linuxhostsupport.com/blog/?p=1948 In this tutorial, we are going to guide you on how to install Adminer on Ubuntu 22.04. Adminer, formerly phpMinAdmin is a software tool for managing the content of databases. Adminer is written in PHP and supports various database systems such as MySQL, PostgreSQL, MariaDB, SQLite, Elasticsearch, Oracle, etc. In this blog post, we will […]

The post How to Install Adminer on Ubuntu 22.04 appeared first on LinuxHostSupport.

]]>
In this tutorial, we are going to guide you on how to install Adminer on Ubuntu 22.04.

Adminer, formerly phpMinAdmin is a software tool for managing the content of databases. Adminer is written in PHP and supports various database systems such as MySQL, PostgreSQL, MariaDB, SQLite, Elasticsearch, Oracle, etc. In this blog post, we will install Adminer with the LAMP stack.

Installing Adminer on Ubuntu 22.04 with LAMP stack is a straightforward process that may take up to 15 minutes. Let’s get things going!

Prerequisites

  • A server running Ubuntu 22.04
  • User privileges: root user or non-root user with sudo privileges

Step 1. Update the System

Every fresh install of the OS needs its system packages to be updated to the latest versions available.

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

Step 2. Install Apache Web Server

First, we will install the Apache Web server. Execute the following command to install it:

sudo apt-get install apache2 -y

Once, installed start and enable the service.

sudo systemctl enable apache2 && sudo systemctl start apache2

Check if the service is up and running:

sudo systemctl status apache2

You should receive the following output:

oot@host:~# sudo systemctl status apache2
● apache2.service - The Apache HTTP Server
     Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor preset: enabled)
     Active: active (running) since Tue 2023-10-03 16:21:21 CDT; 35s ago
       Docs: https://httpd.apache.org/docs/2.4/
   Main PID: 3128 (apache2)
      Tasks: 6 (limit: 4558)
     Memory: 9.9M
        CPU: 183ms
     CGroup: /system.slice/apache2.service

Step 3. Install PHP 8.1 with Dependencies

Next up will be installing PHP 8.1 with all of the required extensions for running Adminer. To install it all in one go, execute the following command:

sudo apt-get install php8.1 php8.1-cli php8.1-common php8.1-imap php8.1-redis php8.1-snmp php8.1-xml php8.1-zip php8.1-mbstring php8.1-curl php8.1-mysqli libapache2-mod-php php8.1-fpm -y

Step 4. Install MariaDB database server

Lastly, the LAMP stack isn’t complete without a database server. For the database server, we will install MariaDB.

sudo apt install mariadb-server -y

Start and enable the MariaDB service with the following commands:

sudo systemctl start mariadb && sudo systemctl enable mariadb

Check the status of the MariaDB service:

sudo systemctl status mariadb

You should receive the following output:

root@host:~# sudo systemctl status mariadb
● mariadb.service - MariaDB 10.6.12 database server
     Loaded: loaded (/lib/systemd/system/mariadb.service; enabled; vendor preset: enabled)
     Active: active (running) since Tue 2023-10-03 16:23:52 CDT; 22s ago
       Docs: man:mariadbd(8)
             https://mariadb.com/kb/en/library/systemd/
   Main PID: 4455 (mariadbd)
     Status: "Taking your SQL requests now..."
      Tasks: 15 (limit: 4558)
     Memory: 61.3M
        CPU: 1.056s
     CGroup: /system.slice/mariadb.service
             └─4455 /usr/sbin/mariadbd

Step 5. Secure MariaDB database service

MariaDB by default is not safe to use in a production environment. That’s why we will secure the MariaDB database service and set a root password. To do this, execute the following command:

mysql_secure_installation

You need to pass these steps with the following options:

Switch to unix_socket authentication [Y/n] Y

Change the root password? [Y/n] Y
New password:
Re-enter new password:
Password updated successfully!
Reloading privilege tables..
 ... Success!

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

All done!  If you've completed all of the above steps, your MariaDB
installation should now be secure.

Thanks for using MariaDB

With all of our required software and dependencies installed, let’s start the actual installation.

Step 6. Install Adminer

To install Adminer, execute the following command:

sudo apt install adminer -y

After successful installation, we need to enable PHP-FPM and enable the Adminer Apache configuration with the following commands:

sudo a2enconf php*-fpm

sudo a2enconf adminer

After this, restart the Apache web server.

systemctl reload apache2

Now you can access Adminer at http:YourServerIPAddress/adminer:

Logging in using the root password you set earlier will get you to the following screen:

You’re in! You successfully installed Adminer on Ubuntu 22.04 with the LAMP stack.

If you do not want to configure it on your own, you can sign up for one of our Linux server support plans and submit a support ticket. Our admins are available 24/7 and will start work on your request immediately. Always trust our epic support.

If you liked this post on how to install Adminer on Ubuntu 22.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 Adminer on Ubuntu 22.04 appeared first on LinuxHostSupport.

]]>
https://linuxhostsupport.com/blog/how-to-install-adminer-on-ubuntu-22-04/feed/ 0
How to Install Bugzilla on Ubuntu 22.04 https://linuxhostsupport.com/blog/how-to-install-bugzilla-on-ubuntu-22-04/ https://linuxhostsupport.com/blog/how-to-install-bugzilla-on-ubuntu-22-04/#respond Wed, 15 Nov 2023 18:30:00 +0000 https://linuxhostsupport.com/blog/?p=1938 Bugzilla is an open-source software for tracking bugs developed by Mozilla’s developers. It is written in Perl and supports various database systems such as MySQL, PostgreSQL, Oracle, and SQLite. Bugzilla’s system requirements include a compatible database management system, a suitable release of Perl 5, an assortment of Perl modules, a compatible web server, and a […]

The post How to Install Bugzilla on Ubuntu 22.04 appeared first on LinuxHostSupport.

]]>
Bugzilla is an open-source software for tracking bugs developed by Mozilla’s developers. It is written in Perl and supports various database systems such as MySQL, PostgreSQL, Oracle, and SQLite.

Bugzilla’s system requirements include a compatible database management system, a suitable release of Perl 5, an assortment of Perl modules, a compatible web server, and a qualified mail transfer agent.

Installing Bugzilla on Ubuntu 22.04 is a straightforward process and may take up to 10 minutes. Let’s get started!

Prerequisites

  • A server with Ubuntu 22.04 as the OS
  • At VPS with at least 4 GB of RAM available
  • User privileges: root or non-root user with sudo privileges

Step 1. Update the System

Since we have a fresh installation of Ubuntu 22.04, we need to update the packages to the latest versions available:

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

Step 2. Install Perl

Bugzilla is written in Perl, so we need to install it along with of its dependencies.

sudo apt install build-essential libappconfig-perl libdate-calc-perl libtemplate-perl libmime-tools-perl build-essential libdatetime-timezone-perl libdatetime-perl libemail-sender-perl libemail-mime-perl libemail-mime-perl libdbi-perl libdbd-mysql-perl libcgi-pm-perl libmath-random-isaac-perl libmath-random-isaac-xs-perl libapache2-mod-perl2 libapache2-mod-perl2-dev libchart-perl libxml-perl libxml-twig-perl perlmagick libgd-graph-perl libtemplate-plugin-gd-perl libsoap-lite-perl libhtml-scrubber-perl libjson-rpc-perl libdaemon-generic-perl libtheschwartz-perl libtest-taint-perl libauthen-radius-perl libfile-slurp-perl libencode-detect-perl libmodule-build-perl libnet-ldap-perl libfile-which-perl libauthen-sasl-perl libfile-mimeinfo-perl libhtml-formattext-withlinks-perl libgd-dev libmysqlclient-dev graphviz sphinx-common rst2pdf libemail-address-perl libemail-reply-perl -y

After successful installation, check the installed Perl version:

perl --version

You should get output similar to this:

root@host:~# perl --version

This is perl 5, version 34, subversion 0 (v5.34.0) built for x86_64-linux-gnu-thread-multi
(with 58 registered patches, see perl -V for more detail)

Step 3. Install MariaDB Database

To install the MariaDB database server, execute the command below.

sudo apt install mariadb-server -y

Start the MariaDB service and enable it to run at system startup with the following commands:

sudo systemctl start mariadb && sudo systemctl enable mariadb

Check the status of the MariaDB service like so:

sudo systemctl status mariadb

You should receive the following output:

root@host:~# sudo systemctl status mariadb
● mariadb.service - MariaDB 10.6.12 database server
     Loaded: loaded (/lib/systemd/system/mariadb.service; enabled; vendor preset: enabled)
     Active: active (running) since Thu 2023-09-21 06:50:23 CDT; 18min ago
       Docs: man:mariadbd(8)
             https://mariadb.com/kb/en/library/systemd/
   Main PID: 88311 (mariadbd)
     Status: "Taking your SQL requests now..."
      Tasks: 7 (limit: 4558)
     Memory: 59.4M
        CPU: 1.625s
     CGroup: /system.slice/mariadb.service
             └─88311 /usr/sbin/mariadbd

Step 4. Create Bugzilla database and user

To create the BugZilla database and user, log into the MariaDB command line as the root user:

mysql -u root -p

Then press [Enter] if you have not set a root password for MariaDB. Once logged in, execute the following commands on the MariaDB command line:

 CREATE USER 'bugzilla'@'localhost' IDENTIFIED BY 'YourStrongPasswordHere';
 CREATE DATABASE bugzilla;
 GRANT ALL PRIVILEGES ON bugzilla.* TO 'bugzilla'@'localhost';
 FLUSH PRIVILEGES;
 EXIT;

With that done, you should now have a database and user ready for Bugzilla.

Step 5. Install Apache2 Webserver

We are going to use Apache as a web server in this tutorial. To install it, execute the command below:

sudo apt install apache2 -y

After successful installation, start and enable the service:

sudo systemctl start apache2 && sudo systemctl enable apache2

To check if everything is OK, execute the following command for the status of the Apache2 service:

sudo systemctl status apache2

You should receive the following output:

root@host:~# sudo systemctl status apache2
● apache2.service - The Apache HTTP Server
     Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor preset: enabled)
     Active: active (running) since Thu 2023-09-21 06:52:26 CDT; 25min ago
       Docs: https://httpd.apache.org/docs/2.4/
   Main PID: 93179 (/usr/sbin/apach)
      Tasks: 6 (limit: 4558)
     Memory: 13.3M
        CPU: 308ms
     CGroup: /system.slice/apache2.service

Step 6. Install Bugzilla

Download the latest stable version of Bugzilla into the Apache document root.

cd /var/www/html
wget https://ftp.mozilla.org/pub/mozilla.org/webtools/bugzilla-5.0.6.tar.gz

Once downloaded, extract the bugzilla directory.

tar -xvf bugzilla-5.0.6.tar.gz -C /var/www/html/

mv bugzilla-5.0.6 bugzilla 

Once this is done, go into the “bugzilla” directory and run the checksetup script to check your system’s setup.

cd /var/www/html/bugzilla/

./checksetup.pl

If there are missing modules, you need to execute the following command:

/usr/bin/perl install-module.pl --all

Now, if you execute the ./checksetup.pl it will return the following output:

There was an error connecting to MySQL:

    Access denied for user 'bugs'@'localhost' (using password: NO)

This is normal and expected because we haven’t set up the configuration file yet. Open the file /var/www/html/bugzilla/localconfig with your preferred text editor and edit it to look like this:

$webservergroup = 'www-data';
$db_driver = 'mysql';
$db_host = 'localhost';
$db_name = 'bugzilla';
$db_user = 'bugzilla';
$db_pass = 'YourStrongPasswordHere';
$db_port = 0;

Save the file and close it. After these settings are done run the ./checksetup.pl again.

./checksetup.pl

It should return back with no errors.

Next is to define your administrator’s email, username and password once the database connection is successful.

Enter the e-mail address of the administrator: admin@yourdomain.com
Enter the real name of the administrator: admin
Enter a password for the administrator account:
Please retype the password to verify:
admin@yourdomain.com is now set up as an administrator.
Creating initial dummy product 'TestProduct'...

Now that you have installed Bugzilla, you should visit the 'Parameters'
page (linked in the footer of the Administrator account) to ensure it
is set up as you wish - this includes setting the 'urlbase' option to
the correct URL.
checksetup.pl complete.

Step 7. Create a Virtual Host configuration file

To access the Bugzilla Web interface, you need to create a virtual host configuration file where you can define your domain, document root, and some script parameters.

First, create the configuration file with the following command:

touch /etc/apache2/sites-available/bugzilla.conf

Open the file, and paste the following lines of code:

<VirtualHost *:80>
ServerName yourdomain.com
DocumentRoot /var/www/html/bugzilla/

<Directory /var/www/html/bugzilla/>
AddHandler cgi-script .cgi
Options +Indexes +ExecCGI
DirectoryIndex index.cgi
AllowOverride Limit FileInfo Indexes Options AuthConfig
</Directory>

ErrorLog /var/log/apache2/yourdomain.com.error_log
CustomLog /var/log/apache2/yourdomain.com.access_log common
</VirtualHost>

Make sure to replace yourdomain.com with the actual domain name you plan on using.

Enable the Apache2 configuration file and other modules:

sudo a2ensite bugzilla.conf

sudo a2enmod headers env rewrite expires cgi

Check the syntax of the Apache2 configuration.

apachectl -t

You should receive the following output:

root@host:~# apachectl -t
Syntax OK

If you receive this output, you can safely restart the Apache service.

sudo systemctl restart apache2

With all of this finally configured, you can now access the Bugzilla Web interface at http://YourDomain.com.

Congratulations! You successfully installed and configured Bugzilla on Ubuntu 22.04. Of course, if you use one of our Linux server support services, you do not have to do this on your own – you can always contact our technical support and they will do the rest for you. We are available 24/7.

If you liked this post on how to install Bugzilla on Ubuntu 22.04, please share it with your friends on social networks or simply leave a reply below. Thanks.

The post How to Install Bugzilla on Ubuntu 22.04 appeared first on LinuxHostSupport.

]]>
https://linuxhostsupport.com/blog/how-to-install-bugzilla-on-ubuntu-22-04/feed/ 0
How to Reset Your MySQL or MariaDB Root Password on Ubuntu 22.04 https://linuxhostsupport.com/blog/how-to-reset-your-mysql-or-mariadb-root-password-on-ubuntu-22-04/ https://linuxhostsupport.com/blog/how-to-reset-your-mysql-or-mariadb-root-password-on-ubuntu-22-04/#comments Mon, 30 Oct 2023 17:30:00 +0000 https://linuxhostsupport.com/blog/?p=1905 In this tutorial we are going to explain how to reset MySQL or MariaDB Root password on Ubuntu 22.04. MySQL is an open-source SQL database management system distributed and supported by Oracle Corporation. It is a relational database management system that provides fast, reliable, scalable, and easy usage. MySQL works in client/server or embedded systems. […]

The post How to Reset Your MySQL or MariaDB Root Password on Ubuntu 22.04 appeared first on LinuxHostSupport.

]]>
In this tutorial we are going to explain how to reset MySQL or MariaDB Root password on Ubuntu 22.04.

MySQL is an open-source SQL database management system distributed and supported by Oracle Corporation. It is a relational database management system that provides fast, reliable, scalable, and easy usage. MySQL works in client/server or embedded systems.

MariaDB is also a popular open-source relational database management system made by the original MySQL developers. In this tutorial, we are going to install the MariaDB database system and will explain how to reset the root password. Since it is made by MySQL developers, the same commands are applied for both systems.

Installing MariaDB or MySQL and resetting the root password is a straightforward process that may take up to 15 minutes. Let’s get started!

Prerequisites

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

Step 1. Update the System

Every fresh installation of Ubuntu 22.04 needs to be updated. That’s why we need to update the package to the latest versions available.

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

Step 2. Install MariaDB database service.

To install the MariaDB database server, execute the command below.

sudo apt install mariadb-server -y

Start and enable the mariadb.service with the following commands:

sudo systemctl start mariadb && sudo systemctl enable mariadb

Check the status of the mariadb.service

sudo systemctl status mariadb

You should receive the following output:

root@host:~# sudo systemctl status mariadb 
● mariadb.service - MariaDB 10.6.12 database server 
Loaded: loaded (/lib/systemd/system/mariadb.service; enabled; vendor preset: enabled) 
Active: active (running) since Thu 2023-09-07 09:28:14 CDT; 17s ago 
Docs: man:mariadbd(8) https://mariadb.com/kb/en/library/systemd/ 
Main PID: 2722 (mariadbd) 
Status: "Taking your SQL requests now..." 
Tasks: 16 (limit: 4558) 
Memory: 61.2M 
CPU: 528ms 
CGroup: /system.slice/mariadb.service └─2722 /usr/sbin/mariadbd

Step 3. Secure MariaDB database service

Next we will secure the MariaDB database service and will set a root password. To do that execute the following command:

mysql_secure_installation

You need to pass these steps with the following options:

Switch to unix_socket authentication [Y/n] Y 
Change the root password? [Y/n] Y 
New password: 
Re-enter new password: 
Password updated successfully! 
Reloading privilege tables.. 
... Success! 
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 
All done! If you've completed all of the above steps, your MariaDB installation should now be secure. 
Thanks for using MariaDB

After installation login to the MySQL console will not ask for a password and will let you without any password, even though we set it in the previous step.

To set MySQL to ask you for a password execute the following command:

ALTER USER 'root'@'localhost' IDENTIFIED VIA mysql_native_password USING PASSWORD('YourStrongPasswordHere');

Now, if you try to log in only with this command: mysql you will get this message:

root@host:~# mysql ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)

You need to use the following command and enter your password:

root@host:~# mysql -u root -p 
Enter password: 
Welcome to the MariaDB monitor. Commands end with ; or \g. Your MariaDB connection id is 64 Server version: 10.6.12-MariaDB-0ubuntu0.22.04.1 Ubuntu 22.04 

Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others. 

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. 
MariaDB [(none)]>

Step 4. Reset MariaDB Root password

In the previous step we set the root password for the MariaDB root user to be YourStrongPasswordHere. We know our root password but in some cases, the admins or developers manage to lose it and need to log in to the MySQL server.

So, to set a new root password we must follow the next steps:

First stop the MariaDB service with the following command:

systemctl stop mariadb

After stopping the service check the status:

systemctl status mariadb

You should get the following output:

root@host:~# systemctl status mariadb 
○ mariadb.service - MariaDB 10.6.12 database server 
Loaded: loaded (/lib/systemd/system/mariadb.service; enabled; vendor preset: enabled) 
Active: inactive (dead) since Thu 2023-09-07 10:13:33 CDT; 36s ago 
Docs: man:mariadbd(8) https://mariadb.com/kb/en/library/systemd/ 
Process: 2722 ExecStart=/usr/sbin/mariadbd $MYSQLD_OPTS $_WSREP_NEW_CLUSTER $_WSREP_START_POSITION (code=exited, status=0/SUCCESS) 
Main PID: 2722 (code=exited, status=0/SUCCESS) 
Status: "MariaDB server is down" 
CPU: 1.760s

Now, when the service is stopped we need to start it without permission checking and without networking to prevent other users from connecting in the meantime:

sudo mysqld_safe --skip-grant-tables --skip-networking &

The ampersand will allow us to use the terminal. Now, execute the following command:

mysql -u root

This will connect us without a password. Flush the privileges first and then change the password with the commands below:

FLUSH PRIVILEGES; 
SET PASSWORD FOR 'root'@'localhost' = PASSWORD('NewStrongPasswordHere'); EXIT;

Now, the password is changed from YourStrongPasswordHere TO NewStrongPasswordHere.

Next we need to kill the process id manually for the mysql service. To find it execute the following command:

ps aux | grep mysqld_safe

You will get output similar to this: root@host:~#

ps aux | grep mysqld_safe 
root 3292 0.0 0.1 14100 5596 pts/0 S 05:18 0:00 sudo mysqld_safe --skip-grant-tables --skip-networking 
root 3293 0.0 0.0 14100 880 pts/1 Ss+ 05:18 0:00 sudo mysqld_safe --skip-grant-tables --skip-networking 
root 3294 0.0 0.0 2888 1732 pts/1 S 05:18 0:00 /bin/sh /usr/bin/mysqld_safe --skip-grant-tables --skip-networking 
root 3427 0.0 0.0 9208 2288 pts/0 S+ 05:28 0:00 grep mysqld_saf

In our case, the process id is 3292. To kill this process execute the following command:

kill -9 3292

Now, we can start the MariaDB service normally:

sudo systemctl start mariadb

Now, you can use the NewStrongPasswordHere.

Congratulations! You just learned how to reset MySQL or MariaDB Root password on Ubuntu 22.04. Of course, you do not have to do this if you find any difficulties. You can contact our technical support by submitting a support ticket or live chat. We are available 24/7

If you liked this post on how to reset your MySQL or MariaDB root password on Ubuntu 22.04, please share it with your friends on the social networks or simply leave a reply below. Thanks.

The post How to Reset Your MySQL or MariaDB Root Password on Ubuntu 22.04 appeared first on LinuxHostSupport.

]]>
https://linuxhostsupport.com/blog/how-to-reset-your-mysql-or-mariadb-root-password-on-ubuntu-22-04/feed/ 1
How to Install Go on Ubuntu 22.04 https://linuxhostsupport.com/blog/how-to-install-go-on-ubuntu-22-04/ https://linuxhostsupport.com/blog/how-to-install-go-on-ubuntu-22-04/#comments Sun, 15 Oct 2023 17:30:00 +0000 https://linuxhostsupport.com/blog/?p=1899 Golang, also known as Go, is a modern programming language developed by Google in 2007 to improve its programming productivity. Go is open-source, and it is getting more and more popular and used in many applications such as Docker, Kubernetes, and static generators like Hugo. This language is well-designed to be used by professionals for […]

The post How to Install Go on Ubuntu 22.04 appeared first on LinuxHostSupport.

]]>
Golang, also known as Go, is a modern programming language developed by Google in 2007 to improve its programming productivity.

Go is open-source, and it is getting more and more popular and used in many applications such as Docker, Kubernetes, and static generators like Hugo.

This language is well-designed to be used by professionals for application development. Go is easy to create and maintain, making it an ideal programming language for building efficient software. Go is reliable, easy to build, and has efficient software that scales fast. In this tutorial, we will show you how to install Go on Ubuntu 22.04.

Prerequisites

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

Step 1. Log in to the server

First, log in to your Ubuntu 22.04 server through 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 IP address and SSH port number, respectively. Additionally, replace “root” with the username of the system user with sudo privileges.

You can check whether you have the proper Ubuntu 22.04 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 22.04 LTS
Release: 22.04
Codename: jammy

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 update -y

Step 2. Install Go

There are several methods of installing Go on Ubuntu 22.04. The first option is to install Go from the default Ubuntu 22.04 repository. The second option is to download the Go binary provided by their developer. And the third option is to install it from the source.

To install it from the default Ubuntu repository, we can simply execute this command to install Go.

# apt install golang-go

At the time of this writing, you will get Go version 1.18.1 after installing it from the Ubuntu repository; we can check it by running the command below.

# go version

The second method is to install Go by using the binary package. If you want the more recent version of Go and install it the easier way, we can download the binary distribution from the Go website. You can check and get the download link from their website at https://go.dev/dl/; let’s download Go now.

# wget https://go.dev/dl/go1.21.0.linux-amd64.tar.gz -O go.tar.gz

Once downloaded, we need to extract the file.

# tar -C /usr/local -xzvf go.tar.gz

The command above will extract the files and you should see the directory /usr/local/go/. So, at this moment, you can access the go executable at /usr/local/go/bin/go.

Next, we need to tell our system where to find the Go binary file. To do this, we need to set the PATH environment variable. We need to add a path to the ~/.profile or ~/.bashrc file for the current user.

# nano ~/.profile

Then, append these lines to the file:

export GOROOT=/usr/local/go
export GOPATH=$HOME/go
export PATH=$GOPATH/bin:$GOROOT/bin:$PATH

Don’t forget to save the file and then load the new PATH variables into the current shell by running the following command.

# source ~/.profile

At this point, you can simply type ‘go’ every time you need to call /usr/local/bin/go. For example, let’s check the Go version:

# go version

The version of Go installed on your Ubuntu system will be displayed on the terminal. It will show you an output like this:

go version go1.21.0 linux/amd64

Step 3. Use Go

Once Go is downloaded and configured, it is time to test it. In this case, we will run a simple code written in the Go language to check if the environment is working on our Ubuntu 22.04 system. Let’s create a file.

# nano sample.go

Then, insert the following into the file.

package main
import "fmt"
func main() {
fmt.Printf("Hello World\n")
}

Save the file, then exit. Next, execute this command to run the script.

# go run sample.go

The command will return an output like this:

That’s it. You have successfully installed Go on your Ubuntu 22.04 system.

Of course, you don’t need to install Go on Ubuntu 22.04 VPS if you are using one of our Ubuntu VPS plans, which you can ask Linux experts to install Go on Ubuntu 22.04 system for you. Our administrators are available 24/7 and will start working on your request immediately; always trust our epic support.

PS. If you liked this article on how to install Go on Ubuntu 22.04, share it with your friends on social media or leave a comment in the comment section.

The post How to Install Go on Ubuntu 22.04 appeared first on LinuxHostSupport.

]]>
https://linuxhostsupport.com/blog/how-to-install-go-on-ubuntu-22-04/feed/ 1
How to Install Contao on Ubuntu 22.04 https://linuxhostsupport.com/blog/how-to-install-contao-on-ubuntu-22-04/ https://linuxhostsupport.com/blog/how-to-install-contao-on-ubuntu-22-04/#comments Sat, 30 Sep 2023 17:30:00 +0000 https://linuxhostsupport.com/blog/?p=1873 Contao is a robust open-source content management system that is user-friendly, instinctive, and adaptable, and it enables you to develop websites in various languages and designs. Contao can also be incorporated into a standard Symfony application. In this guide, we will demonstrate how to set up Contao on Ubuntu 22.04. Prerequisites Step 1. Log in […]

The post How to Install Contao on Ubuntu 22.04 appeared first on LinuxHostSupport.

]]>
Contao is a robust open-source content management system that is user-friendly, instinctive, and adaptable, and it enables you to develop websites in various languages and designs.

Contao can also be incorporated into a standard Symfony application. In this guide, we will demonstrate how to set up Contao on Ubuntu 22.04.

Prerequisites

  • An Ubuntu 22.04 VPS
  • SSH root access or a regular system user with sudo privileges

Step 1. Log in via SSH

Let’s log in to your Ubuntu 22.04 VPS with SSH as a root user or as a regular user with sudo privileges.

ssh root@IP_Address -p Port_number

If you cannot log in as root, remember to replace “root” with a user that has sudo privileges. Additionally, replace “IP_Address” and “Port_Number” with your server’s respective IP address and SSH port.

You can check whether you have the correct 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 22.04.1 LTS
Release: 22.04
Codename: jammy

Step 2. Install and Configure Apache

Contao was initially created for the well-known LAMP stack, but it can operate on any web server that offers an up-to-date edition of PHP and MySQL. In this step, we are going to install Apache as the webserver. Let’s install Apache now.

# apt install apache2

On Ubuntu machines, Apache will automatically start upon installation. To verify this, you can execute the command below.

# systemctl status apache2

You will see the status there, apache is functioning.

Contao requires mod_rewrite, and the rewrite module is not enabled by default, let’s enable it now.

# a2enmod rewrite

After enabling a module, we need to restart apache to activate the new configuration.

# systemctl restart apache2

Now, let’s create two directories for our Contao installation.

# mkdir -p /var/www/html/yourdomain.com/{web,contao-manager}

Then, let’s give them the appropriate permission.

# chown -R www-data. /var/www/html/yourdomain.com/

The next step is to create an apache virtual host.

# nano /etc/apache2/sites-available/yourdomain.com.conf

Then add the following in to the file

<VirtualHost *:80>

ServerAdmin admin@yourdomain.com
ServerName yourdomain.com
ServerAlias www.yourdomain.com
DocumentRoot /var/www/html/yourdomain.com/web

ErrorLog ${APACHE_LOG_DIR}/yourdomain.com_error.log
CustomLog ${APACHE_LOG_DIR}/domain2.com_access.log combined

<Directory  /var/www/html/yourdomain.com/web>
AllowOverride All
Require all granted
</Directory>

</VirtualHost>

Save the file, then exit. Make sure to replace yourdomain.com with your actual domain name or subdomain name pointing to your server.

Once the virtual host is added, we need to activate it.

# a2ensite yourdomain.com

Then, restart or reload apache

# systemctl restart apache2

Step 3. Install MariaDB Server

Contao supports MySQL server version 8.0+ or equivalent MariaDB server. In this step, we are going to install the MariaDB server from the default Ubuntu repository. To install the MariaDB server, execute this command below:

# apt install mariadb-server

That’s it, the MariaDB server should be up and running now.

Step 4. Create a Database

After installing the MariaDB server on an Ubuntu system, the MariaDB server will run automatically. Therefore, we can now create a new database and database user for our Contao website. Let’s log in to MySQL shell as root users and create a database for our Contao website.

# mysql

Once logged in to MySQL shell, we can run the following commands.

mysql> CREATE DATABASE contao;
mysql> GRANT ALL on contao.* to contao@localhost identified by 'm0d1fyth15';
mysql> FLUSH PRIVILEGES;
mysql> \q

Make sure to create a more complicated database password, and replace m0d1fyth15 in the command above with a more secure one.

The next step is optional but highly recommended. We need to create a password for our MySQL root user. Let’s invoke this command to proceed.

Step 5. Install Composer

Contao utilizes Composer, a tool for managing dependencies, as the officially endorsed approach for installation. Let’s execute the following command below to download the Composer installer using wget command:

# wget -O composer-setup.php https://getcomposer.org/installer

Once downloaded, we need to execute the following command to install and setup composer on our Ubuntu machine:

# php composer-setup.php --install-dir=/usr/local/bin --filename=composer

Verify the installation and check the installed build version of Composer:

# composer -V

The command above will return an output like this.

Composer version 2.5.8 2023-06-09 17:13:21

Step 6. Install PHP

Contao requires at least PHP 7.4, and specifically for Contao 5, PHP Version 8.1.0 or higher is required. On the Ubuntu 22.04 system, PHP 8.1 is the lowest version we can install. Let’s install PHP and its extensions from the Ubuntu repository.

# apt install php-{xml,pear,intl,common,json,curl,mbstring,mysql,gd,imagick,zip,opcache} libapache2-mod-php

Step 7. Install Contao

There are two methods to install Contao on your server, using Contao Manager and using the command line. In this tutorial, we will show you how to install Contao using Contao Manager.

First, let’s enter /var/www/html/domain1.com/web

# cd /var/www/html/domain1.com/web
# sudo -u www-data wget https://download.contao.org/contao-manager/stable/contao-manager.phar -O contao-manager.phar.php

Navigate to http://yourdomain.com/contao-manager.phar.php

Click on Create Account button

Click on the Setup button to install Contao

Click on Get Started button

Click Continue

Select distribution, we are going to install version 5.1; click Install

Please wait while the Contao Manager is running task operations in the background.

Once completed, you will be presented with a database configuration page.

Please fill the forms with the database details we created in the previous step in this tutorial. , make sure to choose MariaDB in the Server Version dropdown menu. Click the Save button to save the config.

Click on Check database

Now, click on the Execute button to create database tables, and once completed, click on the Confirm & Close button.

You will be brought to this page

Click on Continue to create a new account

Click on Add Account

That’s it! You have installed Contao on Ubuntu 22.04. You can click on Login to Contao to start using Contao

Login using the account credentials you created a moment ago.

You are logged in now, and you can start customizing your Contao website.

Congratulations! You have successfully installed Contao on Ubuntu 22.04.

Of course, if you are one of our Ubuntu Hosting customers, you don’t have to install Contao on Ubuntu 22.04 yourself – simply ask our admins, sit back, and relax. Our admins will install Contao on Ubuntu 22.04 for you immediately without any additional fee, along with many useful optimizations that we can do for you. Managing a Contao-based website is not just about the installation; we can help you with optimizing your Contao installation if you have an active VPS with us.

If you liked this post about how to install Contao on Ubuntu 22.04, please share it with your friends on social networks or simply leave a comment in the comments section. Thanks.

The post How to Install Contao on Ubuntu 22.04 appeared first on LinuxHostSupport.

]]>
https://linuxhostsupport.com/blog/how-to-install-contao-on-ubuntu-22-04/feed/ 2
How to Install Akaunting on Ubuntu 22.04 https://linuxhostsupport.com/blog/how-to-install-akaunting-on-ubuntu-22-04/ https://linuxhostsupport.com/blog/how-to-install-akaunting-on-ubuntu-22-04/#respond Fri, 15 Sep 2023 17:30:00 +0000 https://linuxhostsupport.com/blog/?p=1864 Akaunting is a free and open-source software written in PHP using the Laravel framework and modern technologies such as VueJS, Tailwind, RESTful API and etc. The information is stored in MySQL database service, and for web servers, we can use Nginx, Apache, or LiteSpeed. In this blog post, we will install Akaunting with the LAMP […]

The post How to Install Akaunting on Ubuntu 22.04 appeared first on LinuxHostSupport.

]]>
Akaunting is a free and open-source software written in PHP using the Laravel framework and modern technologies such as VueJS, Tailwind, RESTful API and etc.

The information is stored in MySQL database service, and for web servers, we can use Nginx, Apache, or LiteSpeed. In this blog post, we will install Akaunting with the LAMP stack.

Installing Akaunting with LAMP stack on Ubuntu 22.04 is a straightforward process that may take up to 15 minutes. Let’s get started!

Prerequisites

  • A server with Ubuntu 22.04 as OS
  • User privileges: root or non-root user with sudo privileges
  • A valid domain with pointed A record to the server IP address

Step 1. Update the System

Before we start with the installation of the LAMP stack and Akaunting, we will update the system packages to their latest versions available.

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

Step 2. Install LAMP Stack

First, we will install the Apache Web server.

sudo apt-get install apache2 -y

Once installed, start and enable the service.

sudo systemctl enable apache2 && sudo systemctl start apache2

Check if the service is up and running:

sudo systemctl status apache2

You should receive the following output:

oot@host:~# sudo systemctl status apache2
● apache2.service - The Apache HTTP Server
     Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor preset: enabled)
     Active: active (running) since Fri 2023-08-05 05:16:02 CDT; 1s ago
       Docs: https://httpd.apache.org/docs/2.4/
    Process: 70629 ExecStart=/usr/sbin/apachectl start (code=exited, status=0/SUCCESS)
   Main PID: 70633 (apache2)
      Tasks: 6 (limit: 4557)
     Memory: 13.6M
        CPU: 140ms
     CGroup: /system.slice/apache2.service

Next, we will install PHP8.1 with its extensions:

sudo apt-get install php8.1 php8.1-cli php8.1-common php8.1-imap php8.1-redis php8.1-snmp php8.1-xml php8.1-zip php8.1-mbstring php8.1-curl php8.1-mysqli php8.1-intl php8.1-bcmath php8.1-gd libapache2-mod-php -y

To check the installed PHP version execute the php -v command:

root@host:~# php -v
Created directory: /var/lib/snmp/cert_indexes
PHP 8.1.2-1ubuntu2.13 (cli) (built: Jun 28 2023 14:01:49) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.1.2, Copyright (c) Zend Technologies
    with Zend OPcache v8.1.2-1ubuntu2.13, Copyright (c), by Zend Technologies

The last of the LAMP stack is the MariaDB database service:

sudo apt-get install mariadb-server -y

Start and enable the mariadb.service with the following commands:

sudo systemctl start mariadb && sudo systemctl enable mariadb

Check the status of the mariadb.service

sudo systemctl status mariadb

You should receive the following output:

● mariadb.service - MariaDB 10.6.12 database server
     Loaded: loaded (/lib/systemd/system/mariadb.service; enabled; vendor preset: enabled)
     Active: active (running) since Fri 2023-08-05 05:19:21 CDT; 15s ago
       Docs: man:mariadbd(8)
             https://mariadb.com/kb/en/library/systemd/
   Main PID: 75849 (mariadbd)
     Status: "Taking your SQL requests now..."
      Tasks: 15 (limit: 4557)
     Memory: 61.3M
        CPU: 786ms
     CGroup: /system.slice/mariadb.service
             └─75849 /usr/sbin/mariadbd

Step 3. Create an Akaunting database and user

Next, we need to create an Akaunting database, the Akaunting user, and grant the permissions for that user to the database.

 CREATE USER 'akaunting'@'localhost' IDENTIFIED BY 'YourStrongPasswordHere';
 CREATE DATABASE akaunting;
 GRANT ALL PRIVILEGES ON akaunting.* TO 'akaunting'@'localhost';
 FLUSH PRIVILEGES;
 EXIT;

Step 4. Download and install Akaunting

Before we install Akaunting, we first need to download it in the default Apache document root:

cd /var/www/html

wget -O Akaunting.zip https://akaunting.com/download.php?version=latest

unzip Akaunting.zip

rm Akaunting.zip

Set the right permissions to files and folders.

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

cd /var/www/html

find . -type d -exec chmod 755 {} \;

find . -type f -exec chmod 644 {} \;

Step 5. Create Apache Virtual Host File

Go into the Apache directory and create a configuration file for the Akaunting.

cd /etc/apache2/sites-available/

touch akaunting.conf

Open the file, paste the following lines of code, save the file and close it.

<VirtualHost *:80>
ServerName yourdomain.com
DocumentRoot /var/www/html

<Directory /var/www/html/>
AllowOverride All
</Directory>

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

</VirtualHost>

Enable the Apache configuration for Akaunting and rewrite the module.

sudo a2enmod rewrite

sudo a2ensite akaunting.conf

Check the syntax:

apachectl -t

You should receive the following output:

root@vps:~# apachectl -t
Syntax OK

If the syntax is OK, restart the Apache service.

systemctl reload apache2

Once the Apache service is restarted, you can finish the Akaunting installation at http://yourdomain.com

Step 6. Finish the Installation

On the first screen, choose your language and click on the Next button.

On the next screen, enter the database credentials you created in one of the previous steps:

Then create your company email and login credentials:

Once done, log in to the Akaunting dashboard.

Once logged in, you can click on Skip this step:

Add your currency and click on the Next button:

On the next window, click on the Skip this step, and you will be automatically redirected to the Akaunting Dashboard.

That was all. You successfully installed and configured Akaunting on Ubuntu 22.04 with the LAMP stack.

If you do not want to configure it on your own, you can sign up for one of our NVMe VPS plans and submit a support ticket. Our admins are available 24/7 and will start to work on your request immediately. Always trust our epic support.

If you liked this post on how to install Akaunting on Ubuntu 22.04, please share it with your friends on social networks or simply leave a reply below. Thanks.

The post How to Install Akaunting on Ubuntu 22.04 appeared first on LinuxHostSupport.

]]>
https://linuxhostsupport.com/blog/how-to-install-akaunting-on-ubuntu-22-04/feed/ 0
How to Install Anaconda on Ubuntu 22.04 https://linuxhostsupport.com/blog/how-to-install-anaconda-on-ubuntu-22-04/ https://linuxhostsupport.com/blog/how-to-install-anaconda-on-ubuntu-22-04/#respond Tue, 15 Aug 2023 17:30:00 +0000 https://linuxhostsupport.com/blog/?p=1854 Anaconda is an open-source environment and package manager, also a distribution of the Python programming language specifically designed for data science and machine learning tasks. One of the main advantages of Anaconda is its extensive library support. It includes popular libraries such as NumPy, Pandas, SciPy, Matplotlib, scikit-learn, and many others. These libraries are widely […]

The post How to Install Anaconda on Ubuntu 22.04 appeared first on LinuxHostSupport.

]]>
Anaconda is an open-source environment and package manager, also a distribution of the Python programming language specifically designed for data science and machine learning tasks.

One of the main advantages of Anaconda is its extensive library support. It includes popular libraries such as NumPy, Pandas, SciPy, Matplotlib, scikit-learn, and many others.

These libraries are widely used for numerical computing, data manipulation, visualization, machine learning, and other data-related tasks. Another key feature of Anaconda is its support for creating isolated environments. Environments allow you to create separate Python environments with specific versions of Python and libraries, ensuring project reproducibility and avoiding conflicts between different packages and versions. This feature is particularly useful when working on multiple projects with different requirements.

Prerequisites

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

Step 1. Download the Anaconda installer

To download Anaconda from the anaconda repo, you can use the following command:

$ wget https://repo.anaconda.com/archive/Anaconda3-2023.03-1-Linux-x86_64.sh

Please note, at the time of writing this article, the 2023.03-1 was the latest anaconda version available; you can check for the latest version at the anaconda repo.

Now you can rename the installation script to a shorter name, for example, anaconda.sh:

$ mv Anaconda3-2023.03-1-Linux-x86_64.sh anaconda.sh

To check the integrity of this installer file, you can use the following command for hash verification with SHA-256 checksum:

$ sha256sum anaconda.sh

95102d7c732411f1458a20bdf47e4c1b0b6c8a21a2edfe4052ca370aaae57bab anaconda.sh

The installer file is verified; now, you are ready to run the installer.

Step 2. Install Anaconda

To start the anaconda installation, run the command below in the directory where you downloaded the installer:

$ bash anaconda.sh

You will receive this output with several questions, which you should confirm and choose the location where you want to install Anaconda.

Welcome to Anaconda3 20223.03

In order to continue the installation process, please review the license
agreement.
Please, press ENTER to continue

You can press ENTER to continue the installation, next you will have go through the license and approve the license terms with yes:

The next step is to specify the location for the anaconda3 installation, you enter a new location or use the default one.

Anaconda3 will now be installed into this location:
/home/user/anaconda3

Press ENTER to confirm the location

Press CTRL-C to abort the installation

Or specify a different location below

[/home/user/anaconda3] >>>

Once the installation is completed, you can use the following command to activate the installation:

$ source ~/.bashrc

Step 3. Using Anaconda

Anaconda has its own package manager called “conda,” which allows users to install, update, and manage packages and dependencies easily. Conda helps to ensure that all the required libraries and dependencies for a particular project are installed correctly and compatible, thus simplifying the setup process.
To list installed packages, you can type:

$ conda list

To install new Python packages, use conda install and the name of the package:

(base) user@server:$ conda install numpy

You should receive the following output:


Collecting package metadata (current_repodata.json): done
Solving environment: done

Package Plan

environment location: /home/ec2-user/anaconda3

added / updated specs:
- numpy

The following packages will be downloaded:

package                    |            build
---------------------------|-----------------
intel-openmp-2023.1.0      |   hdb19cb5_46305        17.1 MB
mkl-2023.1.0               |   h6d00ec8_46342       171.5 MB
mkl-service-2.4.0          |  py310h5eee18b_1          54 KB
mkl_fft-1.3.6              |  py310h1128e8f_1         207 KB
mkl_random-1.2.2           |  py310h1128e8f_1         284 KB
numpy-1.24.3               |  py310h5f9d8c6_1          11 KB
numpy-base-1.24.3          |  py310hb5e798b_1         6.2 MB
tbb-2021.8.0               |       hdb19cb5_0         1.6 MB
------------------------------------------------------------
                                       Total:       197.1 MB

The following NEW packages will be INSTALLED:

blas pkgs/main/linux-64::blas-1.0-mkl
intel-openmp pkgs/main/linux-64::intel-openmp-2023.1.0-hdb19cb5_46305
mkl pkgs/main/linux-64::mkl-2023.1.0-h6d00ec8_46342
mkl-service pkgs/main/linux-64::mkl-service-2.4.0-py310h5eee18b_1
mkl_fft pkgs/main/linux-64::mkl_fft-1.3.6-py310h1128e8f_1
mkl_random pkgs/main/linux-64::mkl_random-1.2.2-py310h1128e8f_1
numpy pkgs/main/linux-64::numpy-1.24.3-py310h5f9d8c6_1
numpy-base pkgs/main/linux-64::numpy-base-1.24.3-py310hb5e798b_1
tbb pkgs/main/linux-64::tbb-2021.8.0-hdb19cb5_0

Proceed ([y]/n)? y

This will install the new conda package. You can also use the pip command to install some python packages or check the already installed python packages with pip list.

You can easily create Anaconda Environments using the following command:

$ conda create --name new-env

To specify which version you want python to be in this conda environment, you can use the command:

$ conda create -n env38 python=3.8

Once the environment has been created, you can activate it with the command:

$ conda activate env38

If you now check the Python version, you will notice that it is the Python 3.8 version, the one you specified previously.

$ python3 --version
Python 3.8.16

You can exit this environment with the command:

$ conda deactivate

Congratulations! You successfully installed Anaconda on Ubuntu 22.04. If you have any difficulties with the installation process, you can contact our technical support, and they will install and configure Anaconda for you. We are available 24/7. All you need to do is sign up for one of our NVMe VPS plans and submit a support ticket.

The post How to Install Anaconda on Ubuntu 22.04 appeared first on LinuxHostSupport.

]]>
https://linuxhostsupport.com/blog/how-to-install-anaconda-on-ubuntu-22-04/feed/ 0
How to Install and Switch Python Versions on Ubuntu 22.04 https://linuxhostsupport.com/blog/how-to-install-and-switch-python-versions-on-ubuntu-22-04/ https://linuxhostsupport.com/blog/how-to-install-and-switch-python-versions-on-ubuntu-22-04/#comments Sun, 30 Jul 2023 17:30:00 +0000 https://linuxhostsupport.com/blog/?p=1840 In this tutorial, we are going to explain in step-by-step detail how to install multiple Python versions on Ubuntu 22.04 Python is a high-level, general-purpose programming language compatible with different operating systems such as MacOS, Windows, Linux and etc. In this blog post, we will focus on installing Python in the Linux distributions. Also, sometimes […]

The post How to Install and Switch Python Versions on Ubuntu 22.04 appeared first on LinuxHostSupport.

]]>
In this tutorial, we are going to explain in step-by-step detail how to install multiple Python versions on Ubuntu 22.04

Python is a high-level, general-purpose programming language compatible with different operating systems such as MacOS, Windows, Linux and etc.

In this blog post, we will focus on installing Python in the Linux distributions. Also, sometimes on one Linux server, it is necessary to be installed multiple Python versions. This tutorial will teach you about installation and changing between different versions.

Installing multiple Python versions on Ubuntu 22.04 is a very easy and straightforward process that may take up to 15 minutes. Let’s get things done!

Prerequisites

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

Update the System

Every fresh installation of the operating system needs the packages to be updated to the latest versions available.

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

Step 1. Install Python 3.10

We will start with the latest version available in the default repository of Ubuntu 22.04. To install python3.10 execute the following command:

sudo apt install python3.10 -y

To check the installed version, execute the command python3.10 -V. You should receive the following output:

root@host:~# python3.10 -V
Python 3.10.6

Step 2. Install Python 3.8

The second Python version on our list will be Python 3.8. To install it, execute the following command:

sudo apt install python3.8 -y

To check the installed version, execute the command python3.8 -V. You should receive the following output:

root@host:~# python3.8 -V
Python 3.8.16

Step 3. Install Python 3.6

The third Python version will be the Python 3.6 version. Let’s execute the following command:

sudo apt install python3.6 -y

As you noticed, the installation process failed with the following message:

root@host:~# sudo apt install python3.6 -y
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
E: Unable to locate package python3.6
E: Couldn't find any package by glob 'python3.6'

This means that Python3.6 is not in the default repository of Ubuntu 22.04. We will need to download the build from the source. To do that, execute the following command:

cd /opt

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

tar xfv Python-3.6.9.tgz

cd /Python-3.6.9

Before we proceed with installation, we need to install the prerequisites for the older Python versions:

sudo apt-get install -y make build-essential libssl-dev zlib1g-dev libbz2-dev libreadline-dev libsqlite3-dev wget curl llvm libncurses5-dev libncursesw5-dev xz-utils tk-dev libffi-dev liblzma-dev libgdbm-dev libnss3-dev libedit-dev libc6-dev

After all these preparations, we can finally build and install it with the following commands:

./configure --enable-optimizations

sudo make altinstall

To check the installed version, execute the command python3.6 -V. You should receive the following output:

root@host:/opt/Python-3.6.9# python3.6 -V
Python 3.6.9

Step 4. Install Python 3.5

The last version of Python in this blog post will be the Python3.5 version. We will download and install the same way as the Python3.6

cd /opt

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

tar xfv Python-3.5.10.tgz

cd Python-3.5.10/

./configure --enable-optimizations

sudo make altinstall

To check the installed version, execute the command python3.5 -V. You should receive the following output:

root@host:/opt/Python-3.5.10# python3.5 -V
Python 3.5.10

Step 5. Switch between Python versions

In the last step of this tutorial, we are going to explain how you can switch between different Python versions. First, you need to know that the newer Python versions installed from the default repository are located in the /usr/bin directory on the server, while the older versions built from the source are located in /usr/local/bin directory.

We need to create symbolic links for every installed Python version, including the path of the installed Python version. Execute the following commands one by one:

sudo update-alternatives --install /usr/bin/python python /usr/bin/python3.10 1
sudo update-alternatives --install /usr/bin/python python /usr/bin/python3.8 2
sudo update-alternatives --install /usr/local/bin/python python /usr/local/bin/python3.6 3
sudo update-alternatives --install /usr/local/bin/python python /usr/local/bin/python3.5 4

Your command line should look like this:

root@host:/# sudo update-alternatives --install /usr/bin/python python /usr/bin/python3.10 1
update-alternatives: using /usr/bin/python3.10 to provide /usr/bin/python (python) in auto mode
root@host:/opt/Python-3.6.9# sudo update-alternatives --install /usr/bin/python python /usr/bin/python3.8 2
update-alternatives: using /usr/bin/python3.8 to provide /usr/bin/python (python) in auto mode
root@host:/opt/Python-3.6.9# sudo update-alternatives --install /usr/local/bin/python python /usr/local/bin/python3.6 3
update-alternatives: renaming python link from /usr/bin/python to /usr/local/bin/python
update-alternatives: using /usr/local/bin/python3.6 to provide /usr/local/bin/python (python) in auto mode
root@host:/opt/Python-3.6.9# sudo update-alternatives --install /usr/local/bin/python python /usr/local/bin/python3.5 4
update-alternatives: using /usr/local/bin/python3.5 to provide /usr/local/bin/python (python) in auto mode

To list and choose which Python version should be active, execute the following command:

sudo update-alternatives --config python

The output should look like this:

root@host:/# sudo update-alternatives --config python
There are 4 choices for the alternative python (providing /usr/local/bin/python).

  Selection    Path                      Priority   Status
------------------------------------------------------------
* 0            /usr/local/bin/python3.5   4         auto mode
  1            /usr/bin/python3.10        1         manual mode
  2            /usr/bin/python3.8         2         manual mode
  3            /usr/local/bin/python3.5   4         manual mode
  4            /usr/local/bin/python3.6   3         manual mode

You can enter any number and use that Python version. For example, we choose the Python3.10 by entering the number 1

Execute the command sudo update-alternatives –config python again, and you will notice the changed version:

root@host:/# sudo update-alternatives --config python
There are 4 choices for the alternative python (providing /usr/local/bin/python).

  Selection    Path                      Priority   Status
------------------------------------------------------------
  0            /usr/local/bin/python3.5   4         auto mode
* 1            /usr/bin/python3.10        1         manual mode
  2            /usr/bin/python3.8         2         manual mode
  3            /usr/local/bin/python3.5   4         manual mode
  4            /usr/local/bin/python3.6   3         manual mode

Congratulations! You successfully installed multiple Python versions on your system and learned how to switch them. Of course, you do not have to do this by yourself. You can contact our technical support, and the admins will help you with any aspect of the installation and configuration of Python versions. We are available 24/7.

If you liked this post on how to Install and Switch Python Versions in Ubuntu 22.04, please share it with your friends on social networks or simply leave a reply below. Thanks.

The post How to Install and Switch Python Versions on Ubuntu 22.04 appeared first on LinuxHostSupport.

]]>
https://linuxhostsupport.com/blog/how-to-install-and-switch-python-versions-on-ubuntu-22-04/feed/ 7
How to Install Icinga 2 on Ubuntu https://linuxhostsupport.com/blog/how-to-install-icinga-2-on-ubuntu/ https://linuxhostsupport.com/blog/how-to-install-icinga-2-on-ubuntu/#comments Fri, 30 Jun 2023 17:30:00 +0000 https://linuxhostsupport.com/blog/?p=1799 In this tutorial, we are going to explain in step-by-step detail how to install Icinga 2 on Ubuntu 22.04 Icinga is a free and open-source monitoring tool used for sending alerts when failures occur on the servers. Icinga is written in C++ and PHP and stores the information in the MySQL database. It offers many […]

The post How to Install Icinga 2 on Ubuntu appeared first on LinuxHostSupport.

]]>
In this tutorial, we are going to explain in step-by-step detail how to install Icinga 2 on Ubuntu 22.04

Icinga is a free and open-source monitoring tool used for sending alerts when failures occur on the servers. Icinga is written in C++ and PHP and stores the information in the MySQL database. It offers many features, such as modern user interface database connectors for MySQL, PostgreSQL, Oracle, REST API, etc. In this blog post, we will install Icinga 2 with the LAMP stack.

Installing Icinga 2 with LAMP stack is a process that may take up to 30 minutes. Let’s get started!

Prerequisites

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

Step 1. Update the System

Before we start to install the software, we need to update the system packages to the latest versions available.

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

Step 2. Install LAMP stack

First of the LAMP stack is the Apache Web server. To install it execute the following command:

sudo apt install apache2 -y

Once installed, start and enable the service.

sudo systemctl enable apache2 && sudo systemctl start apache2

Check if the service is up and running:

sudo systemctl status apache2

You should receive the following output:

root@host:~# sudo systemctl status apache2
● apache2.service - The Apache HTTP Server
     Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor preset: enabled)
     Active: active (running) since Sat 2023-04-22 18:00:43 CDT; 17min ago
       Docs: https://httpd.apache.org/docs/2.4/
   Main PID: 792 (apache2)
      Tasks: 7 (limit: 4571)
     Memory: 22.5M
        CPU: 246ms
     CGroup: /system.slice/apache2.service

Next is PHP, along with its extensions. To install the PHP8.1 along with extensions, execute the following command:

sudo apt-get install php8.1 php8.1-cli php8.1-common php8.1-imap php8.1-redis php8.1-snmp php8.1-xml php8.1-zip php8.1-mbstring php8.1-curl libapache2-mod-php

The last of the LAMP stack is the MariaDB database server. To install it execute the command below.

sudo apt install mariadb-server -y

Start and enable the mariadb.service with the following commands:

sudo systemctl start mariadb && sudo systemctl enable mariadb

Check the status of the mariadb.service

sudo systemctl status mariadb

You should receive the following output:

root@host:~# sudo systemctl status mariadb
● mariadb.service - MariaDB 10.6.12 database server
     Loaded: loaded (/lib/systemd/system/mariadb.service; enabled; vendor preset: enabled)
     Active: active (running) since Sat 2023-04-22 18:19:53 CDT; 9s ago
       Docs: man:mariadbd(8)
             https://mariadb.com/kb/en/library/systemd/
   Main PID: 5829 (mariadbd)
     Status: "Taking your SQL requests now..."
      Tasks: 16 (limit: 4571)
     Memory: 61.4M
        CPU: 514ms
     CGroup: /system.slice/mariadb.service
             └─5829 /usr/sbin/mariadbd

Step 3. Install Icinga 2

First, we will add the GPG key, and will create a repository:

wget -O - https://packages.icinga.com/icinga.key | gpg --dearmor -o /usr/share/keyrings/icinga-archive-keyring.gpg

. /etc/os-release; if [ ! -z ${UBUNTU_CODENAME+x} ]; then DIST="${UBUNTU_CODENAME}"; else DIST="$(lsb_release -c| awk '{print $2}')"; fi; \
 echo "deb [signed-by=/usr/share/keyrings/icinga-archive-keyring.gpg] https://packages.icinga.com/ubuntu icinga-${DIST} main" > \
 /etc/apt/sources.list.d/${DIST}-icinga.list
 echo "deb-src [signed-by=/usr/share/keyrings/icinga-archive-keyring.gpg] https://packages.icinga.com/ubuntu icinga-${DIST} main" >> \
 /etc/apt/sources.list.d/${DIST}-icinga.list

Update the system and install Icinga2

sudo apt update -y

sudo apt install icinga2 -y

After installation, start and enable the icinga2 service.

sudo systemctl start icinga2 && sudo systemctl enable icinga2

Check the status of Icinga 2:

sudo systemctl status icinga2

You should get the following output:

root@host:~# sudo systemctl status icinga2
● icinga2.service - Icinga host/service/network monitoring system
     Loaded: loaded (/lib/systemd/system/icinga2.service; enabled; vendor preset: enabled)
    Drop-In: /etc/systemd/system/icinga2.service.d
             └─limits.conf
     Active: active (running) since Sat 2023-04-22 19:06:11 CDT; 4min 35s ago
   Main PID: 11632 (icinga2)
     Status: "Startup finished."
      Tasks: 16
     Memory: 14.3M
        CPU: 435ms
     CGroup: /system.slice/icinga2.service

Step 4. Install the Icinga2 IDO Module

To install the Icinga2 IDO module, execute the following command:

sudo apt install icinga2-ido-mysql -y

While installing, choose Yes on both windows. It is about Icinga2 using MySQL.

After this, we need to create an icinga2-ido-mysql database with the following commands:

CREATE DATABASE icinga_ido_db;
GRANT ALL ON icinga_ido_db.* TO 'icinga_ido_db'@'localhost' IDENTIFIED BY 'YourStrongPasswordHere';
FLUSH PRIVILEGES;
EXIT;

Once the database is created, import the Icinga2 IDO schema with the following command:

sudo mysql -u root -p icinga_ido_db < /usr/share/icinga2-ido-mysql/schema/mysql.sql

Once the schema is imported, the next is to enable the Icinga2 IDO module:

nano /etc/icinga2/features-available/ido-mysql.conf

Paste the following lines of code:

/**
 * The db_ido_mysql library implements IDO functionality
 * for MySQL.
 */

library "db_ido_mysql"

object IdoMysqlConnection "ido-mysql" {
  user = "icinga_ido_db",
  password = "YourStrongPasswordHere",
  host = "localhost",
  database = "icinga_ido_db"
}

Save the file, close it and enable the Icinga2-ido-mysql with the following command:

sudo icinga2 feature enable ido-mysql

After this restart the Icinga2 service:

systemctl restart icinga2

Step 5. Install and Setup IcingaWeb2

To install Icinga Web execute the following commands:

sudo apt install icingaweb2 icingacli -y

Next is to create a second database for the Icinga web:

CREATE DATABASE icingaweb2;
GRANT ALL ON icingaweb2.* TO 'icingaweb2'@'localhost' IDENTIFIED BY 'YourStrongPasswordHere';
FLUSH PRIVILEGES;
EXIT;

Next, we need to create an Icinga token:

root@host:~# sudo icingacli setup token create
The newly generated setup token is: dd3a1a8b218be0db

That was all with installing Icinga via the command line. The last step is about finishing the Icinga installation.

Step 6. Finish Icinga Installation

To finish the Icinga installation, you need to access it at http://YourServerIPaddress/icingaweb2/setup.

Enter the token, and follow the pictures if you want to finish the installation:

Set Administrative user and password:

The last is to set up Icinga2 IDO credentials you set before in Step 4.

Congratulations! You successfully installed and configured Icinga2 on Ubuntu 22.04. If you find any difficulties with installing Icinga 2, you can always contact our technical support. All you have to do is to sign up for one of our NVMe VPS plans and submit a support ticket. We are available 24/7.

If you liked this post about installing Icinga2 on Ubuntu 22.04, please share it with your friends on social networks or simply leave a reply below.

The post How to Install Icinga 2 on Ubuntu appeared first on LinuxHostSupport.

]]>
https://linuxhostsupport.com/blog/how-to-install-icinga-2-on-ubuntu/feed/ 3
How to Install ProcessWire CMS on Ubuntu 22.04 https://linuxhostsupport.com/blog/how-to-install-processwire-cms-on-ubuntu-22-04/ https://linuxhostsupport.com/blog/how-to-install-processwire-cms-on-ubuntu-22-04/#respond Thu, 15 Jun 2023 17:30:00 +0000 https://linuxhostsupport.com/blog/?p=1797 In this tutorial, we will show you how to install ProcessWire CMS on Ubuntu 22.04 OS. ProcessWire is a free, open-source content management system written in PHP. It offers many features such as jQuery-styled API, scaling, templates, multi languages, drag-and-drop page lists, and many more that are largely used for developing websites and applications. ProcessWire […]

The post How to Install ProcessWire CMS on Ubuntu 22.04 appeared first on LinuxHostSupport.

]]>
In this tutorial, we will show you how to install ProcessWire CMS on Ubuntu 22.04 OS.

ProcessWire is a free, open-source content management system written in PHP. It offers many features such as jQuery-styled API, scaling, templates, multi languages, drag-and-drop page lists, and many more that are largely used for developing websites and applications. ProcessWire stores the data in the MySQL database server, and in this installation, we will install the ProcessWire CMS with the LAMP stack.

Installing ProcessWire CMS on Ubuntu 22.04 with LAMP stack is a straightforward process that may take up to 15 minutes. Let’s get things done!

Prerequisites

  • A server with Ubuntu 22.04 OS
  • A valid domain with pointed A record to the server IP address
  • User privileges: root or non-root user with sudo privileges

Step 1. Update the System

It is recommended to have a fresh installation of Ubuntu 22.04 for this setup. After every fresh installation of the OS, we need to update the system packages to the latest versions available.

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

Step 2. Install Apache Web Server

To install the Apache Web server execute the following command:

sudo apt install apache2

Once installed, start and enable the service.

sudo systemctl enable apache2 && sudo systemctl start apache2

Check if the service is up and running:

sudo systemctl status apache2

You should receive the following output:

root@host:~# sudo systemctl status apache2
● apache2.service - The Apache HTTP Server
     Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor preset: enabled)
     Active: active (running) since Thu 2023-05-04 11:02:35 CDT; 4min 53s ago
       Docs: https://httpd.apache.org/docs/2.4/
   Main PID: 446641 (apache2)
      Tasks: 6 (limit: 4571)
     Memory: 16.8M
        CPU: 558ms
     CGroup: /system.slice/apache2.service

Step 3. Install PHP8 with dependencies

To install the PHP8.1 along with extensions, execute the following command:

sudo apt-get install php8.1 php8.1-cli php8.1-common php8.1-imap php8.1-redis php8.1-snmp php8.1-xml php8.1-zip php8.1-mbstring php8.1-curl libapache2-mod-php

To check the installed PHP version, execute the following command:

php -v

You should receive the following output:

root@host:~# php -v
PHP 8.1.2-1ubuntu2.11 (cli) (built: Feb 22 2023 22:56:18) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.1.2, Copyright (c) Zend Technologies
    with Zend OPcache v8.1.2-1ubuntu2.11, Copyright (c), by Zend Technologies

Step 4. Install the MariaDB database server

To install the MariaDB database server, execute the command below.

sudo apt install mariadb-server

Start and enable the mariadb.service with the following commands:

sudo systemctl start mariadb && sudo systemctl enable mariadb

Check the status of the mariadb.service

sudo systemctl status mariadb

You should receive the following output:

root@host:~# sudo systemctl status mariadb
● mariadb.service - MariaDB 10.6.12 database server
     Loaded: loaded (/lib/systemd/system/mariadb.service; enabled; vendor preset: enabled)
     Active: active (running) since Thu 2023-05-04 11:06:40 CDT; 5min ago
       Docs: man:mariadbd(8)
             https://mariadb.com/kb/en/library/systemd/
    Process: 458296 ExecStartPre=/usr/bin/install -m 755 -o mysql -g root -d /var/run/mysqld (code=exited, status=0/SUCCESS)
    Process: 458297 ExecStartPre=/bin/sh -c systemctl unset-environment _WSREP_START_POSITION (code=exited, status=0/SUCCESS)
    Process: 458299 ExecStartPre=/bin/sh -c [ ! -e /usr/bin/galera_recovery ] && VAR= ||   VAR=`cd /usr/bin/..; /usr/bin/galera_recovery`; [ $? -eq 0 ]   && systemctl >
    Process: 458481 ExecStartPost=/bin/sh -c systemctl unset-environment _WSREP_START_POSITION (code=exited, status=0/SUCCESS)
    Process: 458485 ExecStartPost=/etc/mysql/debian-start (code=exited, status=0/SUCCESS)
   Main PID: 458336 (mariadbd)
     Status: "Taking your SQL requests now..."
      Tasks: 11 (limit: 4571)

Step 5. Create ProcessWire database and user

Next, we need to create a ProcessWire database, the ProcessWire user, and grant the permissions for that user to the database.

 CREATE USER 'processwire'@'localhost' IDENTIFIED BY 'YourStrongPasswordHere';
 CREATE DATABASE processwire;
 GRANT ALL PRIVILEGES ON processwire.* TO 'processwire'@'localhost';
 FLUSH PRIVILEGES;
 EXIT;

Step 6. Download and Install ProcessWire

Before we install ProcessWire, we first need to download it in the default Apache document root:

cd /var/www/html

wget https://github.com/processwire/processwire/archive/master.zip

unzip master.zip

mv processwire-master/ processwire/

Set the right permissions to files and folders.

chown -R www-data:www-data processwire/

find . -type d -exec chmod 755 {} \;

find . -type f -exec chmod 644 {} \;

Step 7. Create Apache Virtual Host File

Go into the Apache directory and create a configuration file for the ProcessWire CMS.

cd /etc/apache2/sites-available/

touch processwire.conf

Open the file, paste the following lines of code, save the file and close it.

<VirtualHost *:80>
ServerName yourdomain.com
DocumentRoot /var/www/html/processwire

<Directory /var/www/html/processwire>
AllowOverride All
</Directory>

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

</VirtualHost>

Enable the Apache configuration for ProcessWire and rewrite module.

sudo a2enmod rewrite

sudo a2ensite processwire.conf

Check the syntax:

apachectl -t

You should receive the following output:

root@vps:~# apachectl -t
Syntax OK

If the syntax is OK, restart the Apache service.

systemctl reload apache2

Once the Apache service is restarted, you can finish the ProcessWire installation at http://yourdomain.com

Step 8. Finish ProcessWire installation

On the first window, click Get Started

On the next window, choose Blank

The third window is for configuration check:

Next, is to fill in the database credentials you set in Step 5

After successful database credentials, hit Continue, and you should see the following screen:

Scroll down and enter your admin credentials for future use:

Once done, the installation process will finish, and you will be able to login to the Admin dashboard

That was all. You successfully installed and configured ProcessWire CMS on Ubuntu 22.04 with the LAMP stack.

If you do not want to configure it on your own, you can sign up for one of our NVMe VPS plans and submit a support ticket. Our admins are available 24/7 and will start work on your request immediately. Always trust our epic support.

If you liked this post on installing ProcessWire CMS on Ubuntu 22.04, please share it with your friends on social networks or simply leave a reply below. Thanks.

The post How to Install ProcessWire CMS on Ubuntu 22.04 appeared first on LinuxHostSupport.

]]>
https://linuxhostsupport.com/blog/how-to-install-processwire-cms-on-ubuntu-22-04/feed/ 0
How to Install GitLab on AlmaLinux 9 https://linuxhostsupport.com/blog/how-to-install-gitlab-on-almalinux-9/ https://linuxhostsupport.com/blog/how-to-install-gitlab-on-almalinux-9/#respond Sun, 30 Apr 2023 17:30:00 +0000 https://linuxhostsupport.com/blog/?p=1774 In this tutorial we are going to show you in step-by-step detail how to install Gitlab on AlmaLinux 9 OS. GitLab is open-source software written in Ruby, Go and JavaScript operated by GitLab Inc. GitLab offers a wide range of features such as CI/CD (Continous Integration, Continous Delivery) which makes the work of developers and […]

The post How to Install GitLab on AlmaLinux 9 appeared first on LinuxHostSupport.

]]>
In this tutorial we are going to show you in step-by-step detail how to install Gitlab on AlmaLinux 9 OS.

GitLab is open-source software written in Ruby, Go and JavaScript operated by GitLab Inc. GitLab offers a wide range of features such as CI/CD (Continous Integration, Continous Delivery) which makes the work of developers and administrators straightforward and simple.

Installing GitLab on AlmaLinux 9 is a straightforward process that may take up to 10 minutes. Let’s get started!

Prerequisites

  • A VPS with at least 4GB of RAM (Our NVMe 4 VPS plan)
  • Fresh install of AlmaLinux 9 as OS
  • Valid domain pointed to the servers IP address
  • User privileges: root or non-root user with sudo privileges

Step 1. Update the System

Update the system packages to their latest version available before installing anything on a fresh server.

sudo dnf update -y && sudo dnf upgrade -y

Step 2. Install GitLab Dependencies

To install GitLab required package dependencies execute the following command:

sudo dnf install curl python3-policycoreutils git policycoreutils libxcrypt-compat gnupg2 git-core zlib zlib-devel gcc-c++ patch readline readline-devel libffi-devel openssl-devel make bzip2 autoconf automake libtool bison curl tar sqlite-devel ruby ruby-devel -y

Step 3. Add GitLab Repository

First we will add the GitLab repo since it is not added by default in the AlmaLinux 9. Open the file /etc/yum.repos.d/gitlab_gitlab-ce.repo with your favorite editor and paste the following lines of code:

[gitlab_gitlab-ce]
name=gitlab_gitlab-ce
baseurl=https://packages.gitlab.com/gitlab/gitlab-ce/el/8/$basearch
repo_gpgcheck=1
gpgcheck=1
enabled=1
gpgkey=https://packages.gitlab.com/gitlab/gitlab-ce/gpgkey
       https://packages.gitlab.com/gitlab/gitlab-ce/gpgkey/gitlab-gitlab-ce-3D645A26AB9FBD22.pub.gpg
sslverify=1
sslcacert=/etc/pki/tls/certs/ca-bundle.crt
metadata_expire=300

[gitlab_gitlab-ce-source]

name=gitlab_gitlab-ce-source baseurl=https://packages.gitlab.com/gitlab/gitlab-ce/el/8/SRPMS repo_gpgcheck=1 gpgcheck=1 enabled=1 gpgkey=https://packages.gitlab.com/gitlab/gitlab-ce/gpgkey https://packages.gitlab.com/gitlab/gitlab-ce/gpgkey/gitlab-gitlab-ce-3D645A26AB9FBD22.pub.gpg sslverify=1 sslcacert=/etc/pki/tls/certs/ca-bundle.crt metadata_expire=300

Save the file, close it and update the system

sudo dnf update -y

Step 4. Install GitLab

Now, when the repo is added we can install GitLab with the following command:

sudo dnf install gitlab-ce -y

After successfull installation start the GitLab service:

sudo gitlab-ctl start

You should receive the following output:

[root@host]# sudo gitlab-ctl stop
ok: down: alertmanager: 0s, normally up, want up
ok: down: gitaly: 0s, normally up
ok: down: gitlab-exporter: 0s, normally up
ok: down: gitlab-kas: 0s, normally up
ok: down: gitlab-workhorse: 0s, normally up
ok: down: logrotate: 1s, normally up
ok: down: nginx: 0s, normally up
ok: down: node-exporter: 1s, normally up
ok: down: postgres-exporter: 0s, normally up
ok: down: postgresql: 0s, normally up
ok: down: prometheus: 1s, normally up
ok: down: puma: 0s, normally up
ok: down: redis: 1s, normally up
ok: down: redis-exporter: 0s, normally up
ok: down: sidekiq: 0s, normally up
[root@host gems]# sudo gitlab-ctl start
ok: run: alertmanager: (pid 53445) 0s
ok: run: gitaly: (pid 53452) 0s
ok: run: gitlab-exporter: (pid 53469) 1s
ok: run: gitlab-kas: (pid 53473) 0s
ok: run: gitlab-workhorse: (pid 53490) 1s
ok: run: logrotate: (pid 53499) 0s
ok: run: nginx: (pid 53512) 0s
ok: run: node-exporter: (pid 53514) 1s
ok: run: postgres-exporter: (pid 53520) 0s
ok: run: postgresql: (pid 53534) 1s
ok: run: prometheus: (pid 53543) 0s
ok: run: puma: (pid 53559) 1s
ok: run: redis: (pid 53567) 0s
ok: run: redis-exporter: (pid 53573) 0s
ok: run: sidekiq: (pid 53587) 1s

To check the status of GitLab service execute the following command:

sudo gitlab-ctl status

You should receive the following output:

[root@host]# sudo gitlab-ctl status
down: alertmanager: 1s, normally up, want up; run: log: (pid 14903) 3685s
run: gitaly: (pid 53452) 33s; run: log: (pid 14315) 3889s
run: gitlab-exporter: (pid 53469) 33s; run: log: (pid 14808) 3703s
run: gitlab-kas: (pid 53473) 32s; run: log: (pid 14582) 3864s
run: gitlab-workhorse: (pid 53490) 32s; run: log: (pid 14731) 3724s
run: logrotate: (pid 53499) 31s; run: log: (pid 14247) 3905s
run: nginx: (pid 53893) 1s; run: log: (pid 14743) 3718s
run: node-exporter: (pid 53514) 31s; run: log: (pid 14785) 3710s
run: postgres-exporter: (pid 53520) 30s; run: log: (pid 14956) 3680s
run: postgresql: (pid 53534) 30s; run: log: (pid 14457) 3873s
run: prometheus: (pid 53543) 29s; run: log: (pid 14865) 3692s
run: puma: (pid 53559) 29s; run: log: (pid 14666) 3736s
run: redis: (pid 53567) 28s; run: log: (pid 14283) 3896s
run: redis-exporter: (pid 53573) 28s; run: log: (pid 14838) 3697s
run: sidekiq: (pid 53587) 28s; run: log: (pid 14683) 3732s

To check the GitLab ports execute the following command:

netstat -tunlp | grep gitlab

You should receive the following output:

[root@host]# netstat -tunlp | grep gitlab
tcp6       0      0 ::1:8153                :::*                    LISTEN      53473/gitlab-kas
tcp6       0      0 ::1:8155                :::*                    LISTEN      53473/gitlab-kas
tcp6       0      0 ::1:8154                :::*                    LISTEN      53473/gitlab-kas
tcp6       0      0 ::1:8151                :::*                    LISTEN      53473/gitlab-kas
tcp6       0      0 ::1:8150                :::*                    LISTEN      53473/gitlab-kas
tcp6       0      0 ::1:9229                :::*                    LISTEN      53490/gitlab-workho

Step 5. Access GitLab with Domain

To access the GitLab in the browser via domain name, you need to configure it in the following file: /etc/gitlab/gitlab.rb.

Open it with your favore browser and edit the following lines by entering your domain name and setting your strong root password:

external_url 'http://YourDomainHere'

gitlab_rails['initial_root_password'] = 'YourStrongPasswordHere'

Save the file, close it and execute the following command:

gitlab-ctl reconfigure

After reconfiguring the application you can access GitLab at http://YourDomain using the root as username and your strong password you set above.

Congratulations! You successfully installed and configured GitLab on AlmaLinux 9 OS. If you have any difficulties completing this setup, feel free to contact our technical support and they will help you in no time. We are available 24/7. All you need to do is to sign up for one of our NVMe VPS plans and submit a support ticket.

If you liked this post on how to install GitLab on AlmaLinux 9, please share it with your friends on the social networks or simply leave a reply below. Thanks.

The post How to Install GitLab on AlmaLinux 9 appeared first on LinuxHostSupport.

]]>
https://linuxhostsupport.com/blog/how-to-install-gitlab-on-almalinux-9/feed/ 0
How To Install Plausible Analytics on Ubuntu 22.04 https://linuxhostsupport.com/blog/how-to-install-plausible-analytics-on-ubuntu-22-04/ https://linuxhostsupport.com/blog/how-to-install-plausible-analytics-on-ubuntu-22-04/#respond Tue, 28 Feb 2023 18:30:00 +0000 https://linuxhostsupport.com/blog/?p=1764 Plausible Analytics is a free and open-source, self-hosted web analytics application that helps you to track your website visitors. It is a simple analytics alternative to Google Analytics. In this tutorial, we will install Plausible in a docker container and then install Apache as a reverse proxy for Plausible Analytics. Prerequisites Step 1. Log in […]

The post How To Install Plausible Analytics on Ubuntu 22.04 appeared first on LinuxHostSupport.

]]>
Plausible Analytics is a free and open-source, self-hosted web analytics application that helps you to track your website visitors. It is a simple analytics alternative to Google Analytics.

In this tutorial, we will install Plausible in a docker container and then install Apache as a reverse proxy for Plausible Analytics.

Prerequisites

  • An Ubuntu 22.04 VPS
  • Full SSH root access or a user with sudo privileges is required

Step 1. Log in to the server and update

Login to your Ubuntu 22.04 VPS via SSH. In this article, we will use ‘root’ to run the shell commands.

If you want to use your regular system user with sudo privileges to run the commands, make sure to append ‘sudo’ in front of the commands.

# ssh root@IP_Address -p Port_Number

You need to replace “IP_Address” and “Port_number” with your server’s IP address and SSH port number.

We can run these commands to ensure that all installed packages are up to date.

# apt update
# apt upgrade

Step 2. Install Docker CE and Docker Compose

By default, the latest Docker CE package is not available in the Ubuntu 22.04 default repository, so you will need to add the Docker CE official repository to your server.

Use the following command to install the dependencies or pre-requisite packages.

# apt-get install git apt-transport-https ca-certificates curl software-properties-common -y

Then, add the GPG key and repository with the following commands:

# curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/trusted.gpg.d/docker-archive-keyring.gpg
# add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"

Now you can install Docker and Docker Compose with the following command:

# apt update
# apt-get install docker-ce docker-compose

Verify the Docker version with the following command:

# docker --version

Output:

Docker version 20.10.21, build baeda1f

Step 3. Download Plausible

Next, you need to clone the Plausible repository from the GitHub repository. To do this, go to the /opt directory with the following command:

# cd /opt

Then, you can download it with the following command:

# git clone https://github.com/plausible/hosting plausible

Now move into the new directory that you have created:

# cd plausible

Generate a secrete password with the following command:

# openssl rand 64 | base64 -w 0 ; echo

This command will create 64 random characters:

VSqCkxxFh0lQAcKgM+NmLzya28kbAr++FBL8b6qUxtAi9AeGScacv+fSGfYBqHiAVevv3H70qIJML1MabF+Klg==

Copy them, then open the Plausible configuration file with your favorite text editor:

# nano plausible-conf.env

The file contains five variables that you’ll need to fill in:

ADMIN_USER_EMAIL=admin@your-domain.com
ADMIN_USER_NAME=admin
ADMIN_USER_PWD=Str0ng_Passw0rd
BASE_URL=https://plausible.your-domain.com
SECRET_KEY_BASE=VSqCkxxFh0lQAcKgM+NmLzya28kbAr++FBL8b6qUxtAi9AeGScacv+fSGfYBqHiAVevv3H70qIJML1MabF+Klg==

Note:  The password you define here must be at least 6 characters.

Now you need to update the docker-compose.yml file. Open the file with the following command:

# nano docker-compose.yml

Find the Plausible section in the file and search for the ports, and update it to the following:

ports:
- 127.0.0.1:8000:8000

Then use the following command to download, configure, and launch the containers:

# docker-compose up --detach

This ensures that Plausible only listens on the localhost interface and is not publicly available.

Plausible Analytics has been installed and is now running on port 8000.

Step 4. Install Apache Web Server and Create Apache Virtual Host File

To install the Apache web server execute the command below:

# apt install apache2

Once installed, start and enable the service.

# systemctl enable apache2 && systemctl start apache2

Check if the service is up and running:

# systemctl status apache2

Enable the proxy and proxy_http modules in Apache using the following commands:

# a2enmod proxy
# a2enmod proxy_http

To access Plausible Analytics via domain name, we need to create Apache Virtual Host file.

First, create the configuration file with the following command:

# nano /etc/apache2/sites-available/plausible.conf

Open the file, and paste the following lines of code:

<VirtualHost *:80>
     ServerAdmin admin@your_domain.com
     ServerName plausible.your-domain.com

     ErrorLog ${APACHE_LOG_DIR}/plausible.your-domain_error.log
     CustomLog ${APACHE_LOG_DIR}/plausible.your-domain_access.log combined

        ProxyPreserveHost On
        ProxyPass / http://127.0.0.1:8000/
        ProxyPassReverse / http://127.0.0.1:8000/

</VirtualHost>

Enable the Apache2 configuration file and other modules:

# a2ensite plausible.conf

Check the syntax of the Apache2 configuration.

# apachectl -t

You should receive the following output:

root@host:~# apachectl -t
Syntax OK

If you receive this output, you can safely restart the Apache service.

# systemctl restart apache2

Step 5. Install an SSL Certificate

This step will show you how to install an SSL certificate for your Plausible website using the free one from Let’s Encrypt.

Install the required packages by running the following command:

# apt install python3-certbot-apache

Then run this command to install a new SSL certificate for your domain name:

# certbot --apache -d plausible.your-domain.com

Please select ‘2’ and choose to redirect HTTP traffic to HTTPS. It will update your Plausible Apache virtual host file to redirect all HTTP traffic to HTTPS.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
1: No redirect - Make no further changes to the webserver configuration.
2: Redirect - Make all requests redirect to secure HTTPS access. Choose this for
new sites, or if you're confident your site works on HTTPS. You can undo this
change by editing your web server's configuration.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Select the appropriate number [1-2] then [enter] (press 'c' to cancel): 2

You should now be able to access your Plausible Analytics at https://plausible.your-domain.com

Plausible Analytics

If you are one of our web hosting clients and use our managed Ubuntu Hosting, you don’t have to follow this tutorial and install Plausible Analytics on your Ubuntu 22.04 server yourself. You can simply ask our expert Linux hosting admins to set all of these 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 social networks using the buttons below, or simply leave a comment in the comments section. Thank you.

The post How To Install Plausible Analytics on Ubuntu 22.04 appeared first on LinuxHostSupport.

]]>
https://linuxhostsupport.com/blog/how-to-install-plausible-analytics-on-ubuntu-22-04/feed/ 0
How to Install Uptime Kuma on Ubuntu 22.04 https://linuxhostsupport.com/blog/how-to-install-uptime-kuma-on-ubuntu-22-04/ https://linuxhostsupport.com/blog/how-to-install-uptime-kuma-on-ubuntu-22-04/#respond Fri, 30 Dec 2022 18:30:00 +0000 https://linuxhostsupport.com/blog/?p=1737 Uptime Kuma is an open-source monitoring solution. We can monitor our websites and servers’ uptime and configure them to send us notifications via multiple options, like Telegram, email, Discord, etc. Uptime Kuma is an easy-to-use monitoring tool, and it is powerful for traffic control, observability, service discovery, etc. This article will show you how to […]

The post How to Install Uptime Kuma on Ubuntu 22.04 appeared first on LinuxHostSupport.

]]>
Uptime Kuma is an open-source monitoring solution. We can monitor our websites and servers’ uptime and configure them to send us notifications via multiple options, like Telegram, email, Discord, etc. Uptime Kuma is an easy-to-use monitoring tool, and it is powerful for traffic control, observability, service discovery, etc. This article will show you how to install Uptime Kuma on Ubuntu 22.04.

Prerequisites

  • An Ubuntu server 22.04
  • SSH access with root privileges

Step 1. Log in to the server

First, log in to your Ubuntu 22.04 VPS through SSH as the root user:

ssh root@IP_Address -p Port_number

You would need to replace ‘IP_Address‘ and ‘Port_number‘ with your server’s IP address and SSH port number.

Before starting, we need to make sure that all Ubuntu 22.04 packages installed on the server are up to date. You can do this by executing the following commands:

# apt update -y

Step 2. Create a System User

In this step, we will create a new system user and grant it sudo privileges. Let’s say the new system user is called ‘master’; you can choose any username you like.

# adduser master

Next, let’s run the command below to add the new user to sudo group. In Ubuntu operating system, users who are members of sudo group are allowed to run sudo commands.

# usermod -aG sudo master

Once created and given sudo privileges, we can log in as the new user ‘master’, and we will use this user to run commands and complete the Uptime Kuma installation.

# su - master

Step 3. Install NodeJS and NPM

Uptime Kuma requires NodeJS runtime environment and npm. We can install NodeJS from the Ubuntu default repository, but we will get an older version of NodeJS if we use this method and Uptime Kuma requires at least NodeJS version 14. In this step, we will install NodeJS and npm through the NodeJS repository to get the most recent version of it.

$ curl -sL https://deb.nodesource.com/setup_lts.x | sudo -E bash -

Once completed, we need to download the package information from the newly added source above.

$ sudo apt update

Next, run the following command to install NodeJS and NPM finally.

$ sudo apt install nodejs

That’s it; nodejs and NPM are installed; you can check the installed version by executing this one-liner:

$ node -v; npm -v

You will see an output like this:

master@ubuntu22:~$ node -v; npm -v
v16.18.0
8.19.2

Step 4. Install Uptime Kuma

Uptime Kuma is not available in the default Ubuntu repository. We can install it by downloading it from GitHub using git.

$ sudo apt install git

After git is installed, we can continue to clone Uptime Kuma from its GitHub repository.

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

It’s time to run the installation using the NPM package manager of Nodejs.

$ npm run setup
uptime kuma npm run setup

Step 5. Install PM2

With Process Manager (PM2), we can keep our applications alive forever, reload them without downtime, and facilitate common system admin tasks. Execute the command below to install PM2 on your Ubuntu 22.04.

$ sudo npm install pm2 -g

Once pm2 is installed, we can run our Uptime Kuma with this command.

$ pm2 start server/server.js --name kuma

uptime kuma pm2 start

Now, you can open your web browser and navigate to the page at http://YOUR_SERVER_IP_ADDRESS:3001, and you will see the uptime Kuma welcome page, you can create a new user now.

uptime kuma welcome

To add monitoring, you can click on the ‘Add New Monitor’ button

uptime kuma monitor

You can customize and configure your monitoring here.

uptime kuma customize monitor

After starting Uptime Kuma, we can create a service file for PM2 to make Uptime Kuma start automatically upon reboot.

$ pm2 startup

You will get an output like this:

[PM2] Init System found: systemd
[PM2] To setup the Startup Script, copy/paste the following command:
sudo env PATH=$PATH:/usr/bin /usr/lib/node_modules/pm2/bin/pm2 startup systemd -u master --hp /home/master

Just follow the instruction shown on the screen, for example:

$ sudo env PATH=$PATH:/usr/bin /usr/lib/node_modules/pm2/bin/pm2 startup systemd -u master --hp /home/master

Then, you will also see an output like this one:

uptime kuma pm2 startup

Now we need to save the current ongoing process:

$ pm2 save

Step 6. Install and Configure NGINX

Your Uptime Kuma install has now been completed, and you should be able to access it at your server’s public IP with port number 3001. However, if you want to access your Uptime Kuma website using a domain name or subdomain name instead of typing the server’s IP address and the port number in the URL, you would need to configure a reverse proxy on your server.

This step will show you how to implement the reverse proxy configuration using Nginx.

First, install Nginx with the following command:

$ sudo apt install nginx

On Ubuntu 22.04, Nginx is configured to start running upon installation; you can check it by running this command:

$ sudo systemctl status nginx

Once installed, create a new Nginx server block configuration file. Replace kuma.yourdomain.com with your actual domain or subdomain name:

$ sudo nano /etc/nginx/sites-enabled/kuma.yourdomain.com.conf

Add the following content to the file:

server {

listen 80;
server_name kuma.yourdomain.com;
location / {
    proxy_pass http://localhost:3001;
    proxy_http_version 1.1;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection "upgrade";
    proxy_set_header Host $host;
    }

location ~ /.well-known {
    alias /var/www/html;
    }
}

Save the file by pressing CTRL + O, then press CTRL + X to exit the nano editor, then restart Nginx.

$ sudo systemctl restart nginx

Step 7. Install SSL certificate

This is an optional step but highly recommended to complete. We will install a free SSL certificate from Let’s Encrypt.

$ sudo apt install python3-certbot-nginx -y

Once completed, we can run this command to install the SSL certificate.

$ sudo certbot certonly -d kuma.yourdomain.com
Saving debug log to /var/log/letsencrypt/letsencrypt.log

How would you like to authenticate with the ACME CA?
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
1: Nginx Web Server plugin (nginx)
2: Spin up a temporary webserver (standalone)
3: Place files in webroot directory (webroot)
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Select the appropriate number [1-3] then [enter] (press 'c' to cancel): 1
Enter email address (used for urgent renewal and security notices)
(Enter 'c' to cancel): you@yourdomain.com

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
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. Do you agree?
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
(Y)es/(N)o: y

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Would you be willing, once your first certificate is successfully issued, 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
Account registered.
Requesting a certificate for kuma.yourdomain.com

Successfully received certificate.
Certificate is saved at: /etc/letsencrypt/live/kuma.yourdomain.com/fullchain.pem
Key is saved at: /etc/letsencrypt/live/kuma.yourdomain.com/privkey.pem
This certificate expires on 2023-01-19.
These files will be updated when the certificate renews.
Certbot has set up a scheduled task to automatically renew this certificate in the background.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
If you like Certbot, please consider supporting our work by:
* Donating to ISRG / Let's Encrypt: https://letsencrypt.org/donate
* Donating to EFF: https://eff.org/donate-le
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
master@ubuntu22:~#

Make sure to pay attention to these lines; we need them when editing our nginx server block.

Certificate is saved at: /etc/letsencrypt/live/kuma.yourdomain.com/fullchain.pem
Key is saved at: /etc/letsencrypt/live/kuma.yourdomain.com/privkey.pem

Next, we need to edit the nginx server block for kuma.yourdomain.com

$ sudo nano /etc/nginx/sites-enabled/kuma.yourdomain.com.conf

Replace the content with the lines below.

server {
    listen 443 ssl http2;
    server_name kuma.yourdomain.com;
    ssl_certificate /etc/letsencrypt/live/kuma.yourdomain.com/fullchain.pem;
    ssl_certificate_key /etc/letsencrypt/live/kuma.yourdomain.com/privkey.pem;

location / {
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header Host $host;
    proxy_pass http://localhost:3001/;
    proxy_http_version 1.1;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection "upgrade";
    }
}

server {
    listen 80;
    server_name kuma.yourdomain.com;
    return 301 https://kuma.yourdomain.com$request_uri;
}

Save the file, then exit and restart nginx

$ sudo systemctl restart nginx

Now, you should be able to access your Uptime Kuma website in HTTPS mode at https://kuma.yourdomain.com; you can proceed with building your application using the Uptime Kuma.

Of course, you don’t have to pull your hair to install Uptime Kuma on Ubuntu 22.04 if you have a managed Linux VPS hosting plan hosted with us. If you do, you can simply ask our support team to install Uptime Kuma on Ubuntu 22.04 for you. They are available 24/7 and will be able to help you with the installation of Uptime Kuma, as well as any additional requirements that you may have.

PS. If you enjoyed reading this blog post on how to install Uptime Kuma on Ubuntu 22.04, feel free to share it on social networks or simply leave a comment down in the comments section. Thank you.

The post How to Install Uptime Kuma on Ubuntu 22.04 appeared first on LinuxHostSupport.

]]>
https://linuxhostsupport.com/blog/how-to-install-uptime-kuma-on-ubuntu-22-04/feed/ 0
Improve Website Performance Using gzip and Nginx on Ubuntu 22.04 https://linuxhostsupport.com/blog/improve-website-performance-using-gzip-and-nginx-on-ubuntu-22-04/ https://linuxhostsupport.com/blog/improve-website-performance-using-gzip-and-nginx-on-ubuntu-22-04/#respond Thu, 01 Dec 2022 18:30:00 +0000 https://linuxhostsupport.com/blog/?p=1728 A website’s performance depends on many factors, and choosing a suitable web server is one of them. You can choose from many web servers, like Apache, LiteSpeed, Nginx, etc. Nginx is an open-source web server, it was initially developed by Igor Sysoev and released in October 2004. In Nginx, gzip compression can significantly reduce the […]

The post Improve Website Performance Using gzip and Nginx on Ubuntu 22.04 appeared first on LinuxHostSupport.

]]>
A website’s performance depends on many factors, and choosing a suitable web server is one of them. You can choose from many web servers, like Apache, LiteSpeed, Nginx, etc.

Nginx is an open-source web server, it was initially developed by Igor Sysoev and released in October 2004. In Nginx, gzip compression can significantly reduce the size of transmitted data to website visitors.

Modern web browsers support GZIP compression by default. However, we need to configure our server to serve the compressed resources to our website visitors properly. Without a proper configuration, it could make your server load higher and even slower. This article will show you how to improve website performance using GZIP and Nginx on Ubuntu 22.04.

Prerequisites

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

What is GZIP Compression

GZIP or GNU zip is an open-source algorithm for file compression. GZIP compresses your website resources, such as Javascript and CSS files, while serving requests to the web browsers. It compresses text files effectively, while image files are not compressed because they have some built-in compression.

How to Enable GZIP Compression

To enable compression in Nginx, simply include the following directives in your nginx.conf file, or comment them out if you already have the lines.

gzip on;
gzip_vary on;
gzip_comp_level 6;
gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript;

Save and close the file, then verify Nginx for any syntax errors:

$ sudo nginx -t

You should 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

Next, restart the Nginx service using the following command:

$ sudo systemctl restart nginx

Then check the status.

$ sudo systemctl status nginx

You should see the following output:

● nginx.service - A high performance web server and a reverse proxy server
Loaded: loaded (/lib/systemd/system/nginx.service; enabled; vendor preset: enabled)
Active: active (running) since Mon 2022-09-19 17:51:13 WIB; 1s ago
Docs: man:nginx(8)
Process: 1249555 ExecStartPre=/usr/sbin/nginx -t -q -g daemon on; master_process on; (code=exited, status=0/SUCCESS)
Process: 1249574 ExecStart=/usr/sbin/nginx -g daemon on; master_process on; (code=exited, status=0/SUCCESS)
Main PID: 1249579 (nginx)
Tasks: 3 (limit: 4532)
Memory: 4.4M
CGroup: /system.slice/nginx.service
├─1249579 nginx: master process /usr/sbin/nginx -g daemon on; master_process on;
├─1249580 nginx: worker process
└─1249581 nginx: worker process

Sep 19 17:51:12 home systemd[1]: Starting A high performance web server and a reverse proxy server...
Sep 19 17:51:13 home systemd[1]: Started A high performance web server and a reverse proxy server.

The following are explanations of our directives to enable and configure gzip in nginx.

gzip on;

The directive above should be turned on to enable gzipping of responses.

In gzip_type directive, you can add another MIME type because, by default, Nginx compresses responses only with MIME type text/thml.

gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript;

To set gzip compression level, you can add gzip_comp_level directive. The value should be between 1 and 9. The higher the value, the higher the compression. Please note that the most compressed data usually requires more work to compress or decompress, so if you have it set fairly high on a busy website, you may see the difference in your CPU usage.

gzip_comp_level 6;

Another directive, gzip_vary is optional. It is used to enable or disable inserting the “Vary: Accept-Encoding” response header. This header inform the browsers if the client can handle the compressed version of the website or not, especially when your Nginx server is behind CDN or another reverse caching server. If gzip_vary is enabled, you will see vary: Accept-Encoding in the header response, like the following.

HTTP/2 200 
server: nginx
date: Mon, 19 Sep 2022 10:25:15 GMT
content-type: text/html
content-length: 14512
last-modified: Sat, 22 Jan 2022 13:53:28 GMT
vary: Accept-Encoding
etag: "61ec0c58-38b0"
accept-ranges: bytes

Since compression happens at runtime, it can add considerable processing overhead, which can negatively affect your server performance. You can lower your gzip_comp_level if you think your CPU usage is abnormally higher after enabling gzip in Nginx.

How to Verify GZIP is working?

There are several ways to verify whether the gzip compression is working or not. You can use an online tool like Google PageSpeed Insights to check it, or use your browser’s developer tools, or even simply use the curl shell command as follow:

$ curl -I -H 'Accept-Encoding: gzip,deflate' https://www.rosehosting.com/

The command above will show you an output like this:

HTTP/2 200 
server: nginx
date: Mon, 19 Sep 2022 09:52:28 GMT
content-type: text/html
last-modified: Sat, 22 Jan 2022 13:53:28 GMT
etag: W/"61ec0c58-38b0"
content-encoding: gzip

As we can see in the output, the website is compressed using gzip (content-encoding: gzip).

Compare GZIP and Plain Text

After enabling gzip compression, you can compare the files transmitted by nginx to you by simply running these commands.

$ curl -s --output uncompressed https://www.rosehosting.com/
$ curl -s --output compressed -H 'Accept-Encoding: gzip,deflate' https://www.rosehosting.com/

Then, run ‘ls -lh’ or ‘ll -h’ command to see the file size.

As seen above, the compressed file has a lower file size. The lower the file size, the faster your website is and the higher number of concurrent visitors your server can handle.

Congratulations! You have successfully improved your website performance using gzip and Nginx on Ubuntu 22.04.

Of course, if you are one of our Ubuntu Hosting customers, you don’t have to improve your website performance using gzip and Nginx yourself – simply ask our admins, sit back, and relax. Our admins will improve your website performance using gzip and Nginx for you immediately without any additional fee, along with many useful optimizations that we can do for you. Improving your website performance using gzip and Nginx is not just about the installation; we can help you with optimizing your website if you have a VPS with us.

If you liked this post about how to improve your website performance using gzip and Nginx on Ubuntu 22.04, please share it with your friends on the social networks using the share buttons below, or simply leave a comment in the comments section. Thanks.

The post Improve Website Performance Using gzip and Nginx on Ubuntu 22.04 appeared first on LinuxHostSupport.

]]>
https://linuxhostsupport.com/blog/improve-website-performance-using-gzip-and-nginx-on-ubuntu-22-04/feed/ 0
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 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 Laravel on Ubuntu 18.04 https://linuxhostsupport.com/blog/how-to-install-laravel-on-ubuntu-18-04/ https://linuxhostsupport.com/blog/how-to-install-laravel-on-ubuntu-18-04/#comments Wed, 21 Apr 2021 16:50:11 +0000 https://linuxhostsupport.com/blog/?p=1378   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: apt-get […]

The post How to Install Laravel on Ubuntu 18.04 appeared first on LinuxHostSupport.

]]>
 

1. Connect to your serverinstalling laravel on ubuntu 18.04

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:

apt-get update
apt-get upgrade

2. Install the MySQL Database server

MySQL is an open-source database management system. To install MySQL, run the following command:

$ apt-get install mysql-server

This will install MySQL 5.7 on your server. In order to improve the security of your MySQL server, we recommend that you run the mysql_secure_installation script by typing the following command:

mysql_secure_installation

This script will help you to perform important security tasks like setting up a root password, disable remote root login, remove anonymous users, etc.

3. Create a database for Laravel

Now, we will create our MySQL database for our Laravel site. Login to your MySQL server with the following command and enter your MySQL root password:

mysql -u root -p

In this section, we will create a new MySQL database laravel and assign user access to it to a new user admin_user with password Strong_Password

CREATE DATABASE laravel;
GRANT ALL PRIVILEGES ON laravel.* TO 'admin_user'@'localhost' IDENTIFIED BY 'Strong_Password';
FLUSH PRIVILEGES;
exit;

Don’t forget to replace ‘Strong_Password’ with an actual strong password.

4. Install PHP and required PHP modules

To install the PHP and all necessary modules, run:

sudo apt-get install php-cli php-mcrypt php-mbstring php-zip php-opcache php-gd php-xml

5. Install Composer

A composer is a dependency manager for PHP and of course Laravel, which you can install packages with. The composer will pull all the required libraries you need for your project.

curl -sS https://getcomposer.org/installer | php
sudo mv composer.phar /usr/local/bin/composer

6. Install Laravel

Install the latest version of Laravel, using the composer create-project command:

sudo composer create-project --prefer-dist laravel/laravel my_project

If the installation is successful, you will see the following lines:

Writing lock file
Generating optimized autoload files
> Illuminate\Foundation\ComposerScripts::postAutoloadDump
> @php artisan package:discover
Discovered Package: fideloper/proxy
Discovered Package: laravel/tinker
Discovered Package: nesbot/carbon
Package manifest generated successfully.
> @php artisan key:generate
Application key [base64:NEu4D2s1Ai8HHZL3wPnrl+BVpSmcm7dMTStIBtMgSn0=] set successfully.

By default, Laravel is configured to use MySQL(MariaDB), but you need to give it the right information to connect to the database that you just set up. Next, go to the /var/www/Html/my_project/config directory, open the database.php file with your favorite text editor, for example:

nano database.php

And update the database settings, replacing them with your own details:

 'mysql' => [
            'driver' => 'mysql',
            'host' => env('DB_HOST', '127.0.0.1'),
            'port' => env('DB_PORT', '3306'),
            'database' => env('DB_DATABASE', 'yourDBName'),
            'username' => env('DB_USERNAME', 'yourUserName'),
            'password' => env('DB_PASSWORD', 'yourPassword'),
            'unix_socket' => env('DB_SOCKET', ''),
            'charset' => 'utf8mb4',
            'collation' => 'utf8mb4_unicode_ci',
            'prefix' => '',
            'strict' => true,
            'engine' => null,
        ],

7. Server your application with Artisan serve command

Once the installation is completed you can use the artisan serve command to serve your application:

php artisan serve

The output should be something like this:

Laravel development server started: <http://127.0.0.1:8000>

You can now open your browser and access your new Laravel installation at: http://127.0.0.1:8000

8. Install and configure Apache webserver

In this part of the tutorial, we will show you how to install and configure Apache to serve your Laravel application. Run the following command to install Apache webserver from the official Ubuntu repositories:

apt-get install apache2

Change the ownership of the Laravel directory to the webserver user:

chown -R www-data:www-data /path/to/laravel
chmod -R 755 my_project/storage/

Create a new Apache virtual host with the following content:

sudo nano /etc/apache2/sites-available/your_domain.com
<VirtualHost *:80>
ServerName your_domain.com

ServerAdmin webmaster@localhost
DocumentRoot /var/www/html/my_project/public

<Directory /var/www/html/my_project>
AllowOverride All
</Directory>

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

Activate the virtual host by creating a symbolic link :

sudo ln -s /etc/apache2/sites-available/your_domain.com /etc/apache2/sites-enabled/your_domain.com
 

Your Laravel installation is now complete.  You have successfully installed Laravel on your Ubuntu 18.04 VPS. Visit the domain name with a web browser you will see the Laravel default page.   That’s it. If you followed all of the instructions properly now you should be able to access your Laravel installation on your Ubuntu 18.04 server.

 

installing laravel on ubuntu 18.04If you are one of our web hosting customers, and use our optimized Laravel Hosting, you don’t have to install Laravel on Ubuntu 18.04, our expert Linux admins will set up and optimize your Laravel VPS, for you. They are available 24×7 and will take care of your request immediately. As a Laravel developer, you should be focusing on Laravel development and improving your code and leave the server work to us. PS. If you liked this post, on how to install Laravel on Ubuntu 18.04, 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 Laravel on Ubuntu 18.04 appeared first on LinuxHostSupport.

]]>
https://linuxhostsupport.com/blog/how-to-install-laravel-on-ubuntu-18-04/feed/ 3