how to install | LinuxHostSupport Linux Tutorials and Guides Tue, 25 Jun 2024 15:55:14 +0000 en-US hourly 1 https://wordpress.org/?v=6.6.1 How to Install Python on Debian 12 https://linuxhostsupport.com/blog/how-to-install-python-on-debian-12/ https://linuxhostsupport.com/blog/how-to-install-python-on-debian-12/#respond Tue, 30 Jul 2024 17:30:00 +0000 https://linuxhostsupport.com/blog/?p=2138 Python is a versatile programming language that can run on almost any system architecture, from web development to machine learning, and can be used for applications in various fields. Besides its versatility, Python is also relatively easy for beginners to learn, making it one of the most popular programming languages. This tutorial will show you […]

The post How to Install Python on Debian 12 appeared first on LinuxHostSupport.

]]>
Python is a versatile programming language that can run on almost any system architecture, from web development to machine learning, and can be used for applications in various fields. Besides its versatility, Python is also relatively easy for beginners to learn, making it one of the most popular programming languages. This tutorial will show you how to install Python on Debian 12.

Prerequisites

  • A Debian 12 VPS
  • SSH root access or a user with sudo privileges is required

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

Login to VPS and Update the System

First of all, we need to log in to our Debian 12 VPS through SSH:

ssh root@IP_Address -p Port_number

Replace “root” with a user with sudo privileges or root if necessary. Replace “IP_Address” and “Port_Number” with your server’s IP address and SSH port number. Next, let’s make sure that we’re on Debian 12. You can do that like this:

# lsb_release -a

The command should return an output similar to this:

No LSB modules are available.
Distributor ID: Debian
Description: Debian GNU/Linux 12 (bookworm)
Release: 12
Codename: bookworm

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

# apt update -y

Install Python from Source

Debian 12 ships Python 3.11 as the default version. You can verify this by executing the command below:

# apt show python3

The command will return an output like this:

Package: python3
Version: 3.11.2-1+b1
Priority: optional
Section: python
Source: python3-defaults (3.11.2-1)
Maintainer: Matthias Klose doko@debian.org
Installed-Size: 82.9 kB
Provides: python3-profiler, python3-supported-max (= 3.11), python3-supported-min (= 3.11)
Pre-Depends: python3-minimal (= 3.11.2-1+b1)
Depends: python3.11 (>= 3.11.2-1~), libpython3-stdlib (= 3.11.2-1+b1)
Suggests: python3-doc (>= 3.11.2-1+b1), python3-tk (>= 3.11.2-1~), python3-venv (>= 3.11.2-1+b1)
Replaces: python3-minimal (<< 3.1.2-2)
Homepage: https://www.python.org/
Tag: devel::interpreter, devel::lang:python, devel::library,
implemented-in::c, implemented-in::python, role::devel-lib,
role::program, role::shared-lib
Download-Size: 26.3 kB
APT-Manual-Installed: no
APT-Sources: http://deb.debian.org/debian bookworm/main amd64 Packages
Description: interactive high-level object-oriented language (default python3 version)
Python, the high-level, interactive object oriented language,
includes an extensive class library with lots of goodies for
network programming, system administration, sounds and graphics.
.
This package is a dependency package, which depends on Debian's default
Python 3 version (currently v3.11).

Ubuntu has deadsnake’s PPA, which allows us to install multiple Python versions on an Ubuntu machine. Although we can install it on our Debian 12 machine using the same Deadsnake’s PPA with a little modification, it is not recommended. So, to install another version of Python 3 on a Debian 12 system, we need to install it from the source. We will show you how to install it.

Install Dependencies

Let’s install the dependencies by invoking this command below.

# apt install openssl \
build-essential \
curl \
gcc \
libbz2-dev \
libev-dev \
libffi-dev \
libgdbm-dev \
liblzma-dev \
libncurses-dev \
libreadline-dev \
libsqlite3-dev \
libssl-dev \
make \
tk-dev \
wget \
git \
zlib1g-dev

Download and Install Python 3.12.3

For example, you want to install Python 3.12. So, you need to go to Python download page and get the link. In this example, you want to download Python 3.12.4.

Now, after getting the download link, let’s download it.

# cd /tmp
# wget https://www.python.org/ftp/python/3.12.3/Python-3.12.3.tgz

Then, extract the downloaded file and go to the directory Python-3.12.3

# tar zxf Python-3.12.3.tgz
# cd Python-3.12.3

Finally, we can install it.

# ./configure --prefix=/usr/local
# make
# make install

That’s it — you have Python 3.12 now. It’s installed at /usr/local/bin/python3.12. To install multiple versions, repeat the steps and specify the versions you want to install.

Install Python using pyenv

Before installing pyenv, we need to get the latest version of pyenv frm GitHub. Let’s execute this command below.

# git clone https://github.com/pyenv/pyenv.git ~/.pyenv

Now, we need to edit our ~/.bashrc file

# nano ~/.bashrc

and add these lines to it.

export PYENV_ROOT="$HOME/.pyenv"
export PATH="$PYENV_ROOT/bin:$PATH"
eval "$(pyenv init --path)"

Save the file and exit from the editor. To apply the changes, we can source the file.

# source ~/.bashrc

At this point, we can use pyenv. Run this command below to see the available Python versions to install.

# pyenv install -l

Let’s say we are going to install Python 3.10, we can execute this command:

# pyenv install 3.10

Wait until it finishes installing Python. Once completed, you can run this command to check the available version.

# pyenv versions
* system (set by /root/.pyenv/version)
3.10.14

As your screen shows, Python 3.10.14 has been installed but is not activated. The one listed there with an asterisk (*) is currently the active one. The asterisk indicates the currently active version and refers to the system-wide Python version.

To activate Python 3.10.14 globally, let’s run this command

# pyenv global 3.10.14

That’s it. Python 3.10.14 is active now. You can verify it by running the command

# python3 --version

It will return an output like this:

Python 3.10.14

Besides activating it globally, you can also use it locally. Use this command instead:

# pyenv local 3.10.14

You can also install a virtual environment when using pyenv. The command is similar to the one you usually use.

# python -m venv [VENV-NAME]

That’s it all. You have learned how to install Python on Debian 12.

Of course, you don’t have to install Python on Debian 12 yourself if you use one of our server management plans. This means that you can ask our admins to do the installation for you, sit back, and relax. Our admins will install and set up Python on Debian 12 immediately without any additional fee, along with any helpful configurations and optimizations we can do for you. Managing Python is not just about the installation, though. We can also help you optimize your Python installation if you have an active service with us.

If you liked this post on installing Python on Debian 12, please share it with your friends on social media or leave a comment below. Thanks.

The post How to Install Python on Debian 12 appeared first on LinuxHostSupport.

]]>
https://linuxhostsupport.com/blog/how-to-install-python-on-debian-12/feed/ 0
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 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
How to Install CouchDB on AlmaLinux https://linuxhostsupport.com/blog/how-to-install-couchdb-on-almalinux/ https://linuxhostsupport.com/blog/how-to-install-couchdb-on-almalinux/#respond Thu, 15 Dec 2022 18:30:00 +0000 https://linuxhostsupport.com/blog/?p=1735 Apache CouchDB is a free yet reliable non-relational or NoSQL database engine. It is written in Erlang language and natively supports data in JSON format. The data can be accessed and queried via the HTTP protocol, making it easier and more scalable than traditional SQL relational databases like MySQL. CouchDB also offers replication capability and […]

The post How to Install CouchDB on AlmaLinux appeared first on LinuxHostSupport.

]]>
Apache CouchDB is a free yet reliable non-relational or NoSQL database engine. It is written in Erlang language and natively supports data in JSON format. The data can be accessed and queried via the HTTP protocol, making it easier and more scalable than traditional SQL relational databases like MySQL. CouchDB also offers replication capability and provides high availability access. This tutorial will show you how to install CouchDB on AlmaLinux.

Prerequisites

  • An AlmaLinux VPS
  • SSH access with root privileges

Step 1: Log in to your server via SSH

First, you will need to log in to your AlmaLinux VPS 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 system user with sudo privileges.

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

# cat /etc/redhat-release

You will get an output similar to this:

AlmaLinux release 8.7 (Stone Smilodon)

We use ‘root’ in this article when running the shell commands. If you want to use your regular user with sudo privileges to run the commands, make sure to append ‘sudo’ in front of the commands.

Step 2: Update the System

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

# dnf update

Step 3. Install CouchDB

In this step, we will install CouchDB from its default repository. First, we need to install yum-utils package on our AlmaLinux:

# dnf install -y yum-utils

Now you can download and enable the CouchDB repository on your server with the following command:

# yum-config-manager --add-repo https://couchdb.apache.org/repo/couchdb.repo

Then, let’s update our local package index again with this command:

# dnf update

You will be prompted to add the GPG key, and you need to press Y to continue.

Next, use the command below to install CouchDB:

# dnf install -y couchdb

That’s it all, and Apache CouchDB has been successfully installed on your server.

Step 4. Configure CouchDB

In this step, we will configure CouchDB to run on all available IP addresses instead of the default 127.0.0.1 and give a password.

Let’s open the configuration file in /opt/couchdb/etc/local.ini

# nano /opt/couchdb/etc/local.ini

Find the [chttpd] section the uncomment the port and bind address. In the default configuration file, CouchDB is set to listen on 127.0.0.1. You can change it to 0.0.0.0, which means it listens on all interfaces. We can also change it to our specific IP address. So, let’s edit these lines:

[chttpd]
#port = 5984
#bind_address = 127.0.0.1

to

[chttpd]
port = 5984
bind_address = 0.0.0.0

Still, in the same file, scroll down and find the [admins] section. In this section, we can modify our CouchDB user and password.

Change these lines

[admins]
;admin = mysecretpassword

to

[admins]
admin = m0d1fyth15

Save the changes and exit from the file editor. Please make a note about your password because once the CouchDB service is running, the password you specified in the configuration file will be hashed.

Next, we can start and enable it to run upon reboot on your AlmaLinux 8 with the following command:

# systemctl enable couchdb
# systemctl start couchdb

CouchDB is now up and running. We can verify this by checking its status.

# systemctl status couchdb

The command above will give you an output like this:

● couchdb.service - Apache CouchDB
Loaded: loaded (/usr/lib/systemd/system/couchdb.service; enabled; vendor preset: disabled)
Active: active (running) since Tue 2022-11-15 20:22:16 CST; 19min ago
Main PID: 6493 (beam.smp)
Tasks: 37 (limit: 11384)
Memory: 47.0M
CGroup: /system.slice/couchdb.service
├─6493 /opt/couchdb/bin/../erts-11.2.2.13/bin/beam.smp -K true -A 16 -Bd -- -root /opt/couchdb/bin/.. -progname couchdb -- -home /opt/couchdb -- -boot /opt/couchdb/bin/../re>
├─6505 /opt/couchdb/bin/../erts-11.2.2.13/bin/epmd -daemon
└─6524 erl_child_setup 65536

Nov 15 20:22:16 almalinux.rosehosting.com systemd[1]: Started Apache CouchDB.

Step 5. Access CouchDB

CouchDB is now running, and we can start working on it. We can use CLI (Command Line Interface) to manage our CouchDB databases, or we can also use the GUI. You can navigate to http://YOUR_IP_ADDRESS/_utils/ and then log in using the username and password you specified earlier in the previous step if you prefer to use its GUI.

Enter the username and password. Then you will be brought to the CouchDB dashboard.

You will see no databases in the dashboard because we have not created one. You can now start working and using CouchDB, like creating a database, creating a cluster, or even database replication.

That’s it! You have successfully installed CouchDB on AlmaLinux

If you are one of our web hosting customers and use our managed Linux Hosting, you don’t have to follow this tutorial and install CouchDB on AlmaLinux yourself; our Linux admins will set up and configure a CouchDB VPS for you. They are available 24×7 and will take care of your request immediately, and all you need to do is to submit a ticket.

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

The post How to Install CouchDB on AlmaLinux appeared first on LinuxHostSupport.

]]>
https://linuxhostsupport.com/blog/how-to-install-couchdb-on-almalinux/feed/ 0
How to Install and Configure CSF on AlmaLinux https://linuxhostsupport.com/blog/how-to-install-and-configure-csf-on-almalinux/ https://linuxhostsupport.com/blog/how-to-install-and-configure-csf-on-almalinux/#respond Thu, 15 Sep 2022 17:30:00 +0000 https://linuxhostsupport.com/blog/?p=1713 In this tutorial we are going to install and explain in step-by-step detail how to configure CSF on AlmaLinux OS. Config Server Firewall or CSF is a free and advanced firewall for most Linux distributions. CSF can be easily installed on a server with control panels such as DirectAdmin, WHM/cPanel and etc. It includes security […]

The post How to Install and Configure CSF on AlmaLinux appeared first on LinuxHostSupport.

]]>
In this tutorial we are going to install and explain in step-by-step detail how to configure CSF on AlmaLinux OS.

Config Server Firewall or CSF is a free and advanced firewall for most Linux distributions. CSF can be easily installed on a server with control panels such as DirectAdmin, WHM/cPanel and etc. It includes security features such as login, intrusion, flood detections, and many more. With CSF we can easily block IP addresses, whitelist IP addresses, open and close ports and etc.

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

Prerequisites

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

Step 1. Update the System

Before we install the CSF we need to update the system packages to the latest version available.

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

Step 2. Download and Install CSF

Install some prerequisites before you download and install CSF

sudo dnf install epel-release -y

sudo dnf install iptables perl-libwww-perl.noarch perl-LWP-Protocol-https.noarch perl-GDGraph wget tar perl-Math-BigInt -y

Then download the CSF file.

cd /usr/src 

wget https://download.configserver.com/csf.tgz

Once downloaded, extract the csf file with the following command:

tar zxvf csf.tgz

Once extracted enter in the csf directory and execute the script for installation.

cd csf/

sh install.sh

After successfull installation you should receive the following output:

Don't forget to:
1. Configure the following options in the csf configuration to suite your server: TCP_*, UDP_*
2. Restart csf and lfd
3. Set TESTING to 0 once you're happy with the firewall, lfd will not run until you do so

Adding current SSH session IP address to the csf whitelist in csf.allow:
Can't locate lib.pm in @INC (you may need to install the lib module) (@INC contains: /usr/local/lib64/perl5/5.32 /usr/local/share/perl5/5.32 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5) at /usr/sbin/csf line 10.
BEGIN failed--compilation aborted at /usr/sbin/csf line 10.
'lfd.service' -> '/usr/lib/systemd/system/lfd.service'
'csf.service' -> '/usr/lib/systemd/system/csf.service'
Created symlink /etc/systemd/system/multi-user.target.wants/csf.service → /usr/lib/systemd/system/csf.service.
Created symlink /etc/systemd/system/multi-user.target.wants/lfd.service → /usr/lib/systemd/system/lfd.service.
Removed /etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service.
Removed /etc/systemd/system/multi-user.target.wants/firewalld.service.
Created symlink /etc/systemd/system/firewalld.service → /dev/null.
'/etc/csf/csfwebmin.tgz' -> '/usr/local/csf/csfwebmin.tgz'

Installation Completed

As you can see the first message is a reminder that the CSF is not configured. Before we configure CSF, we can check if the required iptables modules are installed. Execute the command below:

sudo perl /usr/local/csf/bin/csftest.pl

If everything is OK, you should receive the following output:

[root@host csf]# sudo perl /usr/local/csf/bin/csftest.pl
Testing ip_tables/iptable_filter...OK
Testing ipt_LOG...OK
Testing ipt_multiport/xt_multiport...OK
Testing ipt_REJECT...OK
Testing ipt_state/xt_state...OK
Testing ipt_limit/xt_limit...OK
Testing ipt_recent...OK
Testing xt_connlimit...OK
Testing ipt_owner/xt_owner...OK
Testing iptable_nat/ipt_REDIRECT...OK
Testing iptable_nat/ipt_DNAT...OK

RESULT: csf should function on this server

Step 3. Manage the CSF service

In the previous step we downloaded and installed the CSF. After that, we confirmed that the iptables modules are loaded. Next is to start and enable the CSF service.

To start and enable the CSF service execute the commands below:

sudo systemctl start csf.service && sudo systemctl enable csf.service

To check the status of the CSF service:

sudo systemctl status csf.service

You should receive the following output:

[root@host csf]# sudo systemctl status csf
● csf.service - ConfigServer Firewall & Security - csf
   Loaded: loaded (/usr/lib/systemd/system/csf.service; enabled; vendor preset: disabled)
   Active: active (exited) since Mon 2022-08-08 17:13:49 EDT; 5s ago
 Main PID: 6595 (code=exited, status=0/SUCCESS)
    Tasks: 0 (limit: 23666)
   Memory: 0B
   CGroup: /system.slice/csf.service

Aug 08 17:13:49 host.test.vps csf[6595]: csf: FASTSTART loading UDP_IN (IPv4)
Aug 08 17:13:49 host.test.vps csf[6595]: csf: FASTSTART loading UDP_OUT (IPv4)
Aug 08 17:13:49 host.test.vps csf[6595]: ACCEPT  all opt -- in lo out *  0.0.0.0/0  -> 0.0.0.0/0
Aug 08 17:13:49 host.test.vps csf[6595]: ACCEPT  all opt -- in * out lo  0.0.0.0/0  -> 0.0.0.0/0
Aug 08 17:13:49 host.test.vps csf[6595]: LOGDROPOUT  all opt -- in * out !lo  0.0.0.0/0  -> 0.0.0.0/0
Aug 08 17:13:49 host.test.vps csf[6595]: LOGDROPIN  all opt -- in !lo out *  0.0.0.0/0  -> 0.0.0.0/0
Aug 08 17:13:49 host.test.vps csf[6595]: csf: FASTSTART loading DNS (IPv4)
Aug 08 17:13:49 host.test.vps csf[6595]: LOCALOUTPUT  all opt -- in * out !lo  0.0.0.0/0  -> 0.0.0.0/0
Aug 08 17:13:49 host.test.vps csf[6595]: LOCALINPUT  all opt -- in !lo out *  0.0.0.0/0  -> 0.0.0.0/0
Aug 08 17:13:49 host.test.vps systemd[1]: Started ConfigServer Firewall & Security - csf.

Step 4. Configuring CSF

In Step 2. we received the following output after the installation process:

1. Configure the following options in the csf configuration to suite your server: TCP_*, UDP_*
2. Restart csf and lfd
3. Set TESTING to 0 once you're happy with the firewall, lfd will not run until you do so.

First add the following ports for TCP in /etc/csf.conf

# Allow incoming TCP ports
TCP_IN = "20,21,22,25,53,80,110,143,443,465,587,993,995"

# Allow outgoing TCP ports
TCP_OUT = "20,21,22,25,53,80,110,113,443,587,993,995"

Next, set Testing to 0

# lfd will not start while this is enabled
TESTING = "0"

End the last is to start the ldf service and restart the CSF for the changes to take effectivity

sudo systemctl start lfd.service

sudo systemctl restart csf.service

Check the status of the lfd service

sudo systemctl status lfd.service

You should receive the following output:

[root@host csf]# systemctl status lfd
● lfd.service - ConfigServer Firewall & Security - lfd
   Loaded: loaded (/usr/lib/systemd/system/lfd.service; enabled; vendor preset: disabled)
   Active: active (running) since Mon 2022-08-08 17:31:26 EDT; 13s ago
  Process: 6961 ExecStart=/usr/sbin/lfd (code=exited, status=0/SUCCESS)
 Main PID: 6970 (lfd - sleeping)
    Tasks: 1 (limit: 23666)
   Memory: 124.2M
   CGroup: /system.slice/lfd.service
           └─6970 lfd - sleeping

Step 5. Basic CSF commands

This is the last step of our tutorial about CSF and in this paragraph we will show you some basic CSF commands.

Enable CSF

csf -e

Whitelist IP address in CSF

csf -a 192.168.1.1

Block IP address in CSF

csf -d 192.168.1.2

Displays the current list of temporary allow and deny IP entries with their TTL and comments

csf -t

Restart CSF

csf -r

Disable CSF

csf -x

That’s it. You successfully installed and configured CSF on AlmaLinux OS. Also, you learned the most used CSF commands in no time. If you find any difficulties with this setup you can always contact our technical support and we will help you immediately. We are available 24/7. You just need to sign up for one of our NVMe VPS plans and submit a support ticket.

If you liked this about installing and configuring CSF on AlmaLinux, please share it with your friends on the social networks using the buttons on the left or simply leave a reply below.

The post How to Install and Configure CSF on AlmaLinux appeared first on LinuxHostSupport.

]]>
https://linuxhostsupport.com/blog/how-to-install-and-configure-csf-on-almalinux/feed/ 0
How to install iRedMail on AlmaLinux https://linuxhostsupport.com/blog/how-to-install-iredmail-on-almalinux/ https://linuxhostsupport.com/blog/how-to-install-iredmail-on-almalinux/#respond Mon, 15 Aug 2022 17:30:00 +0000 https://linuxhostsupport.com/blog/?p=1710 In this tutorial, we are going to install iRedMail on AlmaLinux and explain the installation process in step-by-step detail. iRedMail is an open-source email server software that is capable of supporting the latest IMAP, POP3, and SMTP protocols. In this blog post, we are going to install the iRedMail email server with the installation script. […]

The post How to install iRedMail on AlmaLinux appeared first on LinuxHostSupport.

]]>
In this tutorial, we are going to install iRedMail on AlmaLinux and explain the installation process in step-by-step detail.

iRedMail is an open-source email server software that is capable of supporting the latest IMAP, POP3, and SMTP protocols. In this blog post, we are going to install the iRedMail email server with the installation script. In the installation script are included Nginx as a web server, Postfix as a mail transfer agent, Dovecot as IMAP and POP3 server, SpamAssassin as a spam scanner, ClamAV as a virus scanner, OpenLDAP, iRedAPD and etc.

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

Prerequisites

  • A server with AlmaLinux 20.04 as OS and a Minimum of 4GB of RAM
  • Valid hostname and domain pointed to the servers IP address
  • User privileges: root or non-root user with sudo privileges

Step 1. Update the System

Before we start with the installation process it is necessary to update the system packages to the latest version available.

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

Step 2. Download iRedmail

Before we made the installation script executable we need to download it in the “root” directory on our server. The latest stable release of iRedMail can be downloaded with the command below:

wget https://github.com/iredmail/iRedMail/archive/refs/tags/1.6.0.tar.gz

After successful download, extract the file.

tar -xzvf 1.6.0.tar.gz

List the content of the root directory to check if the file is extracted properly.

ls -al

You should receive the following output:

[root@vps ~]# ls
1.6.0.tar.gz  iRedMail-1.6.0

Step 3. Execute the Installation Script

Go into the iRedMail-1.6.0 directory and make the script executable

cd iRedMail-1.6.0/

chmod +x iRedMail.sh

Once done, execute the installation script with the command below:

./iRedMail.sh

Once, the script is executed there will be a couple of windows that you will need to fill with information so you can completely install the iRedMail service.

On the first window, hit Yes to start the installation process.

On the next window, you just need to confirm the storage path by hitting Enter to proceed with the installation.

The next step is to choose Nginx as a web server since you need to access the iRedMail via domain name in the browser.

The next step is to choose the database server. We will choose MariaDB in this tutorial.

Once the database server is checked, the next step is to enter a strong root password.

In the next window, you have to specify your domain name yourdomain.com.

Once, the domain is set, you need to enter the password for the mail domain administrator.

In the next window, just hit the Enter button to proceed with the installation.

On the next 4 questions, just type Y and hit Enter to finish the installation.

Once, the installation is complete, you should receive the following output.

********************************************************************
* URLs of installed web applications:
*
* - Roundcube webmail: https://mail.yourdomain.com/mail/
* - netdata (monitor): https://mail.yourdomain.comk/netdata/
*
* - Web admin panel (iRedAdmin): https://mail.yourdomain.com/iredadmin/
*
* You can login to above links with below credential:
*
* - Username: postmaster@yourdomain.com
* - Password: YourStrongPasswordHere
*
*
********************************************************************
* Congratulations, mail server setup completed successfully. Please
* read below file for more information:
*
*   - /var/www/html/iRedMail-1.6.0/iRedMail.tips
*
* And it's sent to your mail account postmaster@yourdomain.com
*
********************* WARNING **************************************
*
* Please reboot your system to enable all mail services.
*
********************************************************************

You need to reboot the system, and then you can access your iRedMail Web admin panel at https://mail.yourdomain.com/iredadmin/

Once logged in, you will see the iRedMail admin dashboard as described in the picture below:

That’s it. You successfully installed and configured iRedMail mail server software on AlmaLinux OS.

If you do not know how to install iRedMail, you just need to contact our technical support, and they will do the rest. Of course, first, you need to sign up for one of our monthly or yearly NVMe VPS plans. Do not hesitate to contact us anytime. We are available 24/7!

If you liked this post on how to install iRedMail on AlmaLinux OS, 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 iRedMail on AlmaLinux appeared first on LinuxHostSupport.

]]>
https://linuxhostsupport.com/blog/how-to-install-iredmail-on-almalinux/feed/ 0
How to Install and Secure PhpMyAdmin on AlmaLinux https://linuxhostsupport.com/blog/how-to-install-and-secure-phpmyadmin-on-almalinux/ https://linuxhostsupport.com/blog/how-to-install-and-secure-phpmyadmin-on-almalinux/#respond Sat, 30 Jul 2022 17:30:00 +0000 https://linuxhostsupport.com/blog/?p=1707 In this tutorial we are going to explain in step-by-step detail how to install and secure PhpMyAdmin on AlmaLinux. PhpMyAdmin is a free and open-source tool written in PHP used for managing MySQL databases via browser. It provides a very easy and user-friendly interface, that allows users to easily create databases, create users, tables columns […]

The post How to Install and Secure PhpMyAdmin on AlmaLinux appeared first on LinuxHostSupport.

]]>
In this tutorial we are going to explain in step-by-step detail how to install and secure PhpMyAdmin on AlmaLinux.

PhpMyAdmin is a free and open-source tool written in PHP used for managing MySQL databases via browser. It provides a very easy and user-friendly interface, that allows users to easily create databases, create users, tables columns and etc in no time. In this blog post, we are going to install PhpMyAdmin with the LAMP stack.

Installing and securing PhpMyAdmin on AlmaLinux is a straightforward process and may take up to 15 minutes. Let’s get started!

Prerequisites

  • A server with AlmaLinux 20.04 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

Before we install the LAMP stack we need to update the system packages to the latest version available.

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

Step 2. Install Apache2 Web Server

To install the Apache2 execute the following command:

sudo dnf install httpd -y

To start and enable the apache service, execute the commands below:

sudo systemctl start httpd && sudo systemctl enable httpd

Check the status of the Apache service:

sudo systemctl status httpd

You should receive the following output:

[root@host ~]# sudo systemctl status httpd
● httpd.service - The Apache HTTP Server
   Loaded: loaded (/usr/lib/systemd/system/httpd.service; enabled; vendor preset: disabled)
  Drop-In: /usr/lib/systemd/system/httpd.service.d
           └─php-fpm.conf
   Active: active (running) since Sun 2022-07-03 11:11:13 CDT; 8min ago
     Docs: man:httpd.service(8)
 Main PID: 4665 (httpd)
   Status: "Total requests: 2; Idle/Busy workers 100/0;Requests/sec: 0.00409; Bytes served/sec:  20 B/sec"
    Tasks: 213 (limit: 23674)
   Memory: 38.0M
   CGroup: /system.slice/httpd.service
           ├─4665 /usr/sbin/httpd -DFOREGROUND
           ├─4670 /usr/sbin/httpd -DFOREGROUND
           ├─4671 /usr/sbin/httpd -DFOREGROUND
           ├─4672 /usr/sbin/httpd -DFOREGROUND
           └─4673 /usr/sbin/httpd -DFOREGROUND

Jul 03 11:11:12 host.test.vps systemd[1]: Starting The Apache HTTP Server...

Step 3. Install PHP8.0 with extensions

First we need to add the repository for PHP8.0 with the command below:

sudo dnf install -y https://rpms.remirepo.net/enterprise/remi-release-8.rpm

Update the system and list the available php modules

sudo dnf update

sudo dnf module list php

You should receive the following output:

Last metadata expiration check: 0:00:33 ago on Sun 03 Jul 2022 07:22:57 AM CDT.
AlmaLinux 8 - AppStream
Name                           Stream                               Profiles                                             Summary
php                            7.2 [d][e]                           common [d], devel, minimal                           PHP scripting language
php                            7.3                                  common [d], devel, minimal                           PHP scripting language
php                            7.4                                  common [d], devel, minimal                           PHP scripting language
php                            8.0                                  common [d], devel, minimal                           PHP scripting language

Remi's Modular repository for Enterprise Linux 8 - x86_64
Name                           Stream                               Profiles                                             Summary
php                            remi-7.2                             common [d], devel, minimal                           PHP scripting language
php                            remi-7.3                             common [d], devel, minimal                           PHP scripting language
php                            remi-7.4                             common [d], devel, minimal                           PHP scripting language
php                            remi-8.0                             common [d], devel, minimal                           PHP scripting language
php                            remi-8.1                             common [d], devel, minimal                           PHP scripting language

Hint: [d]efault, [e]nabled, [x]disabled, [i]nstalled

Select the PHP8.0 with the comands below:

sudo dnf module reset php

sudo dnf module enable php:remi-8.0

sudo dnf install php -y

After sucessfull installation you can check the version with php -v command and receive output similar like this:

[root@host ~]# php -v
PHP 8.0.20 (cli) (built: Jun  8 2022 00:33:06) ( NTS gcc x86_64 )
Copyright (c) The PHP Group
Zend Engine v4.0.20, Copyright (c) Zend Technologies
    with Zend OPcache v8.0.20, Copyright (c), by Zend Technologies

Step 4. Install MySQL database server

To install MySQL database server execute the following commands:

sudo dnf install mysql-server mysql

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

sudo systemctl start mysqld && sudo systemctl enable mysqld

Check the status of the mysqld.service

sudo systemctl status mysqld

You should receive the following output:

[root@host ~]# sudo systemctl status mysqld
● mysqld.service - MySQL 8.0 database server
   Loaded: loaded (/usr/lib/systemd/system/mysqld.service; enabled; vendor preset: disabled)
   Active: active (running) since Sun 2022-07-03 07:53:36 CDT; 2s ago
 Main PID: 39835 (mysqld)
   Status: "Server is operational"
    Tasks: 38 (limit: 23674)
   Memory: 467.1M
   CGroup: /system.slice/mysqld.service
           └─39835 /usr/libexec/mysqld --basedir=/usr

Jul 03 07:53:23 host.test.vps systemd[1]: Starting MySQL 8.0 database server...

Step 5. Download and Install PhpMyAdmin

Go into the default Apache document root directory and download the PHPMyAdmin:

 cd /var/www/html

wget https://files.phpmyadmin.net/phpMyAdmin/5.2.0/phpMyAdmin-5.2.0-all-languages.zip

Once downloaded extract the zip file and rename it to phpmyadmin.

unzip phpMyAdmin-5.2.0-all-languages.zip

mv phpMyAdmin-5.2.0-all-languages/ phpmyadmin/

Set the right permissions:

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

Now, you can access the phpMyAdmin at http://YOURSERVERIPADDRESS/phpmyadmin/ This way we are not able to secure the URL since it is an IP address and the SSL certificate can not be installed on the IP address. In the next steps, we will explain a bit more about this.

Step 6. Create Apache Virtual Host File

First we need to create Apache virtual host file so we can access the phpMyAdmin via a domain name.

touch /etc/httpd/sites-available/phpmyadmin.conf

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

<VirtualHost *:80>
    ServerName yourdomain.com
    DocumentRoot /var/www/html/phpmyadmin
    ErrorLog /var/log/httpd/phpmyadmin_error.log
</VirtualHost>

Save the file, close it and enable the Apache configuration.

ln -s /etc/httpd/sites-available/phpmyadmin.conf /etc/httpd/sites-enabled/

Check the Apache syntax with the command below:

httpd -t

If everything is OK, you should receive the following output:

[root@host html]# httpd -t
Syntax OK

Now, you can restart the Apache service and access your application in browser at http://yourdomain.com

Step 7. Secure the Website with Free Let’s Encrypt SSL certificate

First we need to install the mod_ssl module and the python certbot in order can generate the SSL certificate.

sudo dnf install epel-release mod_ssl -y

sudo dnf install python3-certbot-apache -y

Next we can install the Free Let’s Encrypt SSL certificate with the following command:

sudo certbot --apache --agree-tos --redirect --hsts --staple-ocsp --email admin@yourdomain.com -d yourdomain.com

After successful installation you should see the following output:

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

Deploying certificate
Successfully deployed certificate for yourdomain.com to /etc/httpd/sites-available/phpmyadmin-le-ssl.conf
Congratulations! You have successfully enabled HTTPS on https://yourdomain.com

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

Now, you can access your website securely at https://yourdomain.com

Congratulations! You successfully installed PhpMyAdmin on AlmaLinux with the Let’s Encrypt SSL certificate. If you find it difficult to complete these steps feel free to contact us anytime you want. We are available 24/7.

If you liked this post on how to install and secure PhpMyAdmin on AlmaLinux, 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 Secure PhpMyAdmin on AlmaLinux appeared first on LinuxHostSupport.

]]>
https://linuxhostsupport.com/blog/how-to-install-and-secure-phpmyadmin-on-almalinux/feed/ 0
How to Install and Use Ncdu for Better Overview of Disk Usage in Linux https://linuxhostsupport.com/blog/how-to-install-and-use-ncdu-for-better-overview-of-disk-usage-in-linux/ https://linuxhostsupport.com/blog/how-to-install-and-use-ncdu-for-better-overview-of-disk-usage-in-linux/#respond Wed, 15 Jun 2022 17:30:00 +0000 https://linuxhostsupport.com/blog/?p=1699 The default disk usage command from UNIX based system summarizes directories on trees’ sizes, so it includes all their contents and individual files sizes. But, it is helpful to track down space hogs on your system. In other words, it will list directories and files that consume large amounts of space on the hard disk […]

The post How to Install and Use Ncdu for Better Overview of Disk Usage in Linux appeared first on LinuxHostSupport.

]]>
The default disk usage command from UNIX based system summarizes directories on trees’ sizes, so it includes all their contents and individual files sizes. But, it is helpful to track down space hogs on your system. In other words, it will list directories and files that consume large amounts of space on the hard disk drive.

NCDU explained

Passing the years, ncdu was getting hugely recommended through the internet. NCDU is a disk usage analyzer that has an ncurses interface. However, in this post we’ll explain how to install ncdu on *UNIX-based system to check the disk usage.

Installing NCDU

In order to install NCDU, you’ll have to see what is the Distro that you are using, to use one of the below codes:

1. Debian-based install
– Apt command to install ncdu:

sudo apt install ncdu

2. CentOS/RHEL/Fedora install:
– To install on CentOS/RHEL/Fedora you must enable EPEL repository using this command:

sudo yum install epel-release

– Then you can run the ncdu installation command on CentOS:

sudo yum install ncdu

– Or, if you are running Fedora, you should run:

sudo dnf install ncdu

3. Alpine Linux install:
– You can try to install it using the apk command:

apk add ncdu ncdu-doc

4. OpenSUSE/SUSE Linux:
– For this system, we use zypper:

sudo zypper in ncdu

5. Arch Linux:
– On arch linux, you should use pacman:

pacman -S ncdu

6. FreeBSD unix:
– Type the following command on your terminal:

sudo pkg install ncdu

7. OpenBSD:
– There’s little difference on this one, so just copy below to install it:

doas pkg_add ncdu

How to use NCDU

The syntax of it is really simple, you just need to use as it described below:

ncdu
ncdu <flags> <directories>

Flags and the directory are optional, if not provided, the command will check your current working directory. When you run the command, the disk usage of each directory from your current one will show up as a list. To exit that list, you can simply press “Q”.

You can get info from any directory using NCDU, simply use:

ncdu /root
ncdu /home
ncdu /var/log

NCDU flags

In that section we’ll review some flags available to be used on the NCDU command. The first one is the flag “-x”.

This flag let you scan a full system, your root filesystem. To use it, you can run:

ncdu -x /

We can also enable the extended information mode with the flag -e, simply run:

ncdu -e

If you want your ncdu response to having some colors, you can add this by using the “–color” flag:

ncdu --color dark -x /

We can also exclude files that match the provided pattern:

ncdu --exclude '.ht*'
ncdu -x --exclude '/var/log/ --exclude '/directory2' --exlucde ... /

There are many others and shortcuts that are explained in their manual:

man ncdu

That’s it. You have successfully installed NCDU on Linux and learned its basic syntax. You can now use it on your system to have a better usage description on your server.

The post How to Install and Use Ncdu for Better Overview of Disk Usage in Linux appeared first on LinuxHostSupport.

]]>
https://linuxhostsupport.com/blog/how-to-install-and-use-ncdu-for-better-overview-of-disk-usage-in-linux/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 Ntopng on Debian 11 https://linuxhostsupport.com/blog/how-to-install-ntopng-on-debian-11/ https://linuxhostsupport.com/blog/how-to-install-ntopng-on-debian-11/#comments Wed, 30 Mar 2022 17:30:00 +0000 https://linuxhostsupport.com/blog/?p=1650 In this blog post, we are going to install Ntopng on Debian 11 OS and explain in step-by-step detail the installation process. Ntopng is a web-based application for tracking the network traffic on your server. It is free and open-source and supports different operating systems like Linux, Windows MacOS and etc. Ntopng is a very […]

The post How to Install Ntopng on Debian 11 appeared first on LinuxHostSupport.

]]>
In this blog post, we are going to install Ntopng on Debian 11 OS and explain in step-by-step detail the installation process.

Ntopng is a web-based application for tracking the network traffic on your server. It is free and open-source and supports different operating systems like Linux, Windows MacOS and etc. Ntopng is a very useful monitoring tool that shows, multiple graphs in the GUI such as network usage, analytical data, bandwidth utilization, apps and etc. Also, Ntopng analyzes the traffic and sorts it by source/destination.

Installing Ntopng on Debian 11, is a very easy and straightforward process in just a few steps. Let’s get to work!

Prerequisites

  • A server with Debian 11 as OS
  • User privileges: root or non-root user with sudo privileges

Step 1. Update the System

We need to update the packages to their latest versions available before we start with the installation. Execute the following commands to update the system.

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

Step 2. Add Ntopng Repository

By default Debian 11, does not contain the repository for Ntopng, so we need to add it manually. To add the repository execute the commands below:

cd /opt

wget http://apt.ntop.org/buster/all/apt-ntop.deb

dpkg -i apt-ntop.deb

Step 3. Install Ntopng

Once, the package is added update the system again.

sudo apt update -y

After updating the system, we are ready to execute the command for installing Ntopng.

sudo apt install ntopng

Once, the Ntopng monitoring tool is installed, start and enable the service for automatic boot on system reboot.

sudo systemctl start ntopng && sudo systemctl enable ntopng

Check the status of the Ntopng service with the following command:

sudo systemctl status ntopng

You should receive the following output:

root@vps:/opt# sudo systemctl status ntopng
● ntopng.service - ntopng high-speed web-based traffic monitoring and analysis tool
     Loaded: loaded (/etc/systemd/system/ntopng.service; enabled; vendor preset: enabled)
     Active: active (running) since Mon 2022-02-14 17:27:07 EST; 6min ago
   Main PID: 27734 (2/flow_checks)
      Tasks: 35 (limit: 4678)
     Memory: 205.4M
        CPU: 55.493s
     CGroup: /system.slice/ntopng.service
             └─27734 /usr/bin/ntopng /run/ntopng.conf

Feb 14 17:27:23 ntopng.vps ntopng[27734]: 14/Feb/2022 17:27:23 [startup.lua:120] [lists_utils.lua:421] Updating list 'Abuse.ch URLhaus' [https://urlhaus.abuse.ch>
Feb 14 17:27:23 ntopng.vps ntopng[27734]: 14/Feb/2022 17:27:23 [startup.lua:120] [lists_utils.lua:421] Updating list 'Emerging Threats' [https://rules.emergingth>
Feb 14 17:27:23 ntopng.vps ntopng[27734]: 14/Feb/2022 17:27:23 [startup.lua:120] [lists_utils.lua:421] Updating list 'Feodo Tracker Botnet C2 IP Blocklist' [http>
Feb 14 17:27:23 ntopng.vps ntopng[27734]: 14/Feb/2022 17:27:23 [startup.lua:120] [lists_utils.lua:421] Updating list 'NoCoin Filter List' [https://raw.githubuser>
Feb 14 17:27:23 ntopng.vps ntopng[27734]: 14/Feb/2022 17:27:23 [startup.lua:120] [lists_utils.lua:421] Updating list 'SSLBL Botnet C2 IP Blacklist' [https://sslb>
Feb 14 17:27:24 ntopng.vps ntopng[27734]: 14/Feb/2022 17:27:24 [startup.lua:120] [lists_utils.lua:718] Category Lists (1711 hosts, 2117 IPs, 0 JA3) loaded in 1 s>
Feb 14 17:27:25 ntopng.vps ntopng[27734]: 14/Feb/2022 17:27:25 [startup.lua:202] Completed startup.lua
Feb 14 17:27:25 ntopng.vps ntopng[27734]: 14/Feb/2022 17:27:25 [PeriodicActivities.cpp:167] Found 10 activities
Feb 14 17:27:25 ntopng.vps ntopng[27734]: 14/Feb/2022 17:27:25 [NetworkInterface.cpp:3195] Started packet polling on interface lo [id: 1]...
Feb 14 17:27:25 ntopng.vps ntopng[27734]: 14/Feb/2022 17:27:25 [NetworkInterface.cpp:3195] Started packet polling on interface eth0 [id: 2]...

Step 4. Configure Ntopng

Before we access Ntopng we need to configure it. Open the Ntopng configuration file /etc/ntopng/ntopng.conf

sudo nano /etc/ntopng/ntopng.conf

Paste the following lines of code:

##Define the network interface for network monitoring.
##Define the HTTP port for the web server.
-w=5000

Save the file, and close it. Create new ntopng.start file to define the network.

sudo nano /etc/ntopng/ntopng.start

Paste the following lines of code:

--local-networks "YourLocalIPaddressHere/24"  ## give your local IP Ranges here.
--interface 1

Save the newly created file and restart the Ntopng service.

sudo systemctl restart ntopng

You can check the service if is running on port with the following command:

netstat -tunlp | grep 5000

You should receive the following output:

root@vps:~# netstat -tunlp | grep 5000
tcp        0      0 0.0.0.0:5000            0.0.0.0:*               LISTEN      37148/ntopng

Step 5. Access the Ntopng

To access the Ntopng GUI visit the URL http://YourIpAddress:5000. You will see the screen as described below:

On a fresh installation the default username and password is admin. Once, you enter admin as username and password hit on the “Login” button.

On the next screen you will have to change the default password with a strong one for better security.

Enter the strong password twice and click on the “Change Password” button.

After this, you will be automatically logged in to the Ntopng GUI with the changed password.

Congratulations! You successfully installed and configured Ntopng on Debian 11.

Of course, you don’t have to install Ntopng on Debian 11, if you use one of our SSD VPS Hosting plans, in which case you can simply ask our expert Linux admins to install Ntopng on Debian 11 for you. They are available 24×7 and will take care of your request immediately.

If you liked this post on how to install Ntopng on Debian 11, 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 Ntopng on Debian 11 appeared first on LinuxHostSupport.

]]>
https://linuxhostsupport.com/blog/how-to-install-ntopng-on-debian-11/feed/ 1
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 GitLab on Debian 11 https://linuxhostsupport.com/blog/how-to-install-gitlab-on-debian-11/ https://linuxhostsupport.com/blog/how-to-install-gitlab-on-debian-11/#comments Thu, 30 Dec 2021 18:30:00 +0000 https://linuxhostsupport.com/blog/?p=1609 GitLab is a self-hosted git repository management system. It is a Git repository manager providing wiki, issue-tracking, and continuous integration and deployment. Because of the advantage that brings development, operations, and security teams into a single application, GitLab is now widely used across the globe. Installing GitLab on Debian 11 is a fairly easy task […]

The post How to Install GitLab on Debian 11 appeared first on LinuxHostSupport.

]]>
GitLab is a self-hosted git repository management system. It is a Git repository manager providing wiki, issue-tracking, and continuous integration and deployment. Because of the advantage that brings development, operations, and security teams into a single application, GitLab is now widely used across the globe. Installing GitLab on Debian 11 is a fairly easy task and it should take around 15 minutes for the installation. Today we will show you how to install GitLab on your Debian 11 VPS.

Prerequisites

  • A Debian 11 VPS.
  • At least 4GB of RAM.
  • SSH access with sudo privileges, or root access.

In addition, it is recommended to have at least 2GB of SWAP memory, even if you have enough available RAM.

Step 1. Update System

First of all, we need to log in to our Debian 11 VPS through SSH:

ssh master@IP_Address -p Port_Number

Replace “master” with a user that has sudo privileges or root if necessary. Additionally, replace “IP_Address” and “Port_Number” with your server’s respective IP address and SSH port number. Next, let’s make sure that we’re on Debian 11. You can do that like this:

$ lsb_release -a

You should get this as the output:

Distributor ID: Debian
Description: Debian GNU/Linux 11 (bulleseye)
Release: 11
Codename: bullseye

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

$ sudo apt update && apt upgrade

Step 2. Add Repository

There are two ways to install GitLab on Debian 11; we can install it using the repository or the deb package. In this tutorial, we are going to use the repository to install GitLab on Debian 11.

At this step, we will use the repository for Debian 10, because the repository for Debian 11 is not available at this time of writing.

curl -sS https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.deb.sh | sudo bash

The command above will download the GitLab repository to the APT source list file at /etc/apt/sources.list.d/gitlab_gitlab-ce.list
Since the GitLab package source file is for Debian 10, we need to modify these lines.

deb https://packages.gitlab.com/gitlab/gitlab-ce/debian/ bullseye main
deb-src https://packages.gitlab.com/gitlab/gitlab-ce/debian/ bullseye main

Replace ‘bullseye’ with ‘buster’ by running this command.

$ sudo sed -i 's/bullseye/buster/g' /etc/apt/sources.list.d/gitlab_gitlab-ce.list

Now, we need to update the repository.

$ sudo apt update -y

Step 3. Install GitLab

After adding the repository, we can install GitLab Community Edition by running this command:

$ sudo apt install gitlab-ce -y
installing gitlab on debian 11

Once the installation is finished, we can run this command to reconfigure it and run GitLab

$ sudo gitlab-ctl reconfigure

At this point, you should be able to access GitLab at http://YOUR_SERVER_IP_ADDRESS/ and log in as root using the password in /etc/gitlab/initial_root_password

Please note that the password in /etc/gitlab/initial_root_password is valid only for 24 hours. You can log in and change your password immediately or reset it using this command below

$ sudo gitlab-rake "gitlab:password:reset[root]"

Step 4. Configure GitLab

GitLab has been successfully installed, and it is time to configure it.

Secure GitLab Server with Let’s Encrypt SSL Certificate

By default, when installing GitLab without passing an environment for the EXTERNAL_URL value. The installation will set http://gitlab.example.com as the external URL. If we want to access our GitLab installation through a domain or subdomain name and install an SSL certificate for it, we can edit the configuration file /etc/gitlab/gitlab.rb

Open /etc/gitlab/gitlab.rb and find external_url line

external_url 'http://gitlab.example.com'

Replace it with

external_url 'https://gitlab.yourdomain.com'

Make sure that your domain or subdomain DNS record is pointing to your GitLab server.

Then, still in the same file, make sure these are uncommented and modified as follows.

letsencrypt['enable'] = true
letsencrypt['contact_emails'] = ['you@yourdomain.com'] 
letsencrypt['auto_renew'] = true

Save the file then exit.

Now, we need to reconfigure Omnibus GitLab, and we need to do this every time we edit /etc/gitlab/gitlab.rb file.

$ sudo gitlab-ctl reconfigure

Run the command above and wait, once completed you the SSL certificate from Let’s Encrypt should be installed and you should be able to access your GitLab at https://YOUR_DOMAIN_NAME.COM

Email Configuration

By default, GitLab should be able to send its email using sendmail. However, for better email deliverability, you should consider using an SMTP server for this purpose. With the SMTP credentials, we can configure GitLab to use SMTP to send its email.

Open /etc/gitlab/gitlab.rb

$ sudo nano /etc/gitlab/gitlab.rb

Then, find the following

# gitlab_rails['smtp_enable'] = true
# gitlab_rails['smtp_address'] = "smtp.server"
# gitlab_rails['smtp_port'] = 465
# gitlab_rails['smtp_user_name'] = "smtp user"
# gitlab_rails['smtp_password'] = "smtp password"
# gitlab_rails['smtp_domain'] = "example.com"
# gitlab_rails['smtp_authentication'] = "login"
# gitlab_rails['smtp_enable_starttls_auto'] = true
# gitlab_rails['smtp_tls'] = true
# gitlab_rails['smtp_pool'] = false
# gitlab_rails['smtp_openssl_verify_mode'] = 'none'
# gitlab_rails['smtp_ca_path'] = "/etc/ssl/certs"
# gitlab_rails['smtp_ca_file'] = "/etc/ssl/certs/ca-certificates.crt"

You need to uncomment the lines and use your SMTP credentials to make it work. Also, make sure that your SMTP password does not contain any string delimiters used in a YAML file, otherwise, it will not work. Save your changes then exit the file.

As mentioned earlier, we need to reconfigure Omnibus GitLab after editing the gitlab.rb file.

$ sudo gitlab-ctl reconfigure

And that’s it. From now on, GitLab will send emails through SMTP which will result in better email deliverability if compared to using sendmail. You can log in to your GitLab website at https://yourdomain.com and start using it.

configuring gitlab on debian 11

Congratulations! You have successfully installed GitLab on Debian 11.

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

PS. If you liked this post about how to install GitLab on Debian 11, 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 How to Install GitLab on Debian 11 appeared first on LinuxHostSupport.

]]>
https://linuxhostsupport.com/blog/how-to-install-gitlab-on-debian-11/feed/ 3
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 Apache Tomcat 10 on Debian 10 https://linuxhostsupport.com/blog/how-to-install-apache-tomcat-10-on-debian-10/ https://linuxhostsupport.com/blog/how-to-install-apache-tomcat-10-on-debian-10/#respond Thu, 30 Sep 2021 17:30:33 +0000 https://linuxhostsupport.com/blog/?p=1532 If you ever wondered how to install Apache Tomcat 10, and how to configure it on Debian 10 then you are at the right place. In this tutorial, we are going to cover every step needed to install the latest version on Tomcat 10 with all requirements Apache Tomcat 10 or simply Tomcat 10 is […]

The post How to Install Apache Tomcat 10 on Debian 10 appeared first on LinuxHostSupport.

]]>
Install Apache Tomcat 10 on Debian 10If you ever wondered how to install Apache Tomcat 10, and how to configure it on Debian 10 then you are at the right place. In this tutorial, we are going to cover every step needed to install the latest version on Tomcat 10 with all requirements

Apache Tomcat 10 or simply Tomcat 10 is a Java application server used to render the Java web pages. It is an open-source software developed by the Apache Software Foundation responsible to execute Java servlets and render the Java web pages as mentioned above.

Apache Tomcat 10 is compatible with multiple distributions of Linux as Ubuntu, CentOS, and Debian. Installing Tomcat 10 on Debian is very easy and will take less than 15 minutes with all requirements and configuration files.

Let’s start with the installation on Debian 10!

 

Prerequisites

  • Fresh install of Debian 10
  • User privileges: root or non-root user with sudo privileges
  • Java 8 or higher version.
  • VPS with at least 1GB of RAM

Check the distribution of your OS on your server before the installation.

lsb_release -a

The out should be similar to this:

root@vps:~# lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description: Debian GNU/Linux 10 (buster)
Release: 10
Codename: buster

1. Updating the System

Execute the commands below to get the latest changes on your Debian 10 OS.

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

2. Install Java

Apache Tomcat is based on Java, and that is why we need to install it first on the VPS:

sudo apt install default-jdk -y

Check the installed version with the following command:

java --version

The output should be similar to this:

root@vps:~# java --version
openjdk 11.0.12 2021-07-20
OpenJDK Runtime Environment (build 11.0.12+7-post-Debian-2deb10u1)
OpenJDK 64-Bit Server VM (build 11.0.12+7-post-Debian-2deb10u1, mixed mode, sharing)

3. Tomcat User Creation

In order for Apache Tomcat to run propely we need to create user:

useradd -m -d /opt/tomcat -U -s /bin/false tomcat

4. Downloading and installing Tomcat 10

First, go in /opt directory on your server (cd /opt) and then download the Tomcat within. Tomcat 10 can be downloaded from the official Apache website with the command below:

wget https://downloads.apache.org/tomcat/tomcat-10/v10.0.10/bin/apache-tomcat-10.0.10.tar.gz

The next, step is to extract the archived file into a directory.

tar -xzvf apache-tomcat-10.0.10.tar.gz -C /opt/tomcat --strip-components=1

Once, the extraction is completed, set the right “tomcat” permissions recursively on the tomcat directory:

chown -R tomcat:tomcat /opt/tomcat/

Also, set the execute permissions on scripts in the bin directory of the tomcat installation:

chmod -R u+x /opt/tomcat/bin

5. Systemd Unit File for Tomcat

In the bin directory of Tomcat at /opt/tomcat/bin there are shell scripts for starting and stopping Tomcat. It is not recommended to start and stop Tomcat manually via these scripts thus it is recommended via system unit files. This way Tomcat will be able to start after system boot. Create a systemd file and paste the following lines into it:

nano /etc/systemd/system/tomcat.service
[Unit]
Description="Tomcat Service"
After=network.target
[Service]
Type=forking
User=tomcat
Group=tomcat
Environment="JAVA_HOME=/usr/lib/jvm/java-1.11.0-openjdk-amd64"
Environment="JAVA_OPTS=-Djava.security.egd=file:///dev/urandom"
Environment="CATALINA_BASE=/opt/tomcat"
Environment="CATALINA_HOME=/opt/tomcat"
Environment="CATALINA_PID=/opt/tomcat/temp/tomcat.pid"
Environment="CATALINA_OPTS=-Xms512M -Xmx1024M -server -XX:+UseParallelGC"
ExecStart=/opt/tomcat/bin/startup.sh
ExecStop=/opt/tomcat/bin/shutdown.sh
[Install]
WantedBy=multi-user.target

Save the file, close it and start the service.

systemctl start tomcat
systemctl enable tomcat

To check if the service is up and running execute the command:

systemctl status tomcat

The output will be similar to this:

root@vps:~# systemctl status tomcat
● tomcat.service - "Tomcat Service"
Loaded: loaded (/etc/systemd/system/tomcat.service; disabled; vendor preset: enabled)
Active: active (running) since Thu 2021-08-12 03:54:54 EDT; 4min 27s ago
Process: 17708 ExecStart=/opt/tomcat/bin/startup.sh (code=exited, status=0/SUCCESS)
Main PID: 17715 (java)
Tasks: 32 (limit: 4700)
Memory: 236.0M
CGroup: /system.slice/tomcat.service
└─17715 /usr/lib/jvm/java-1.11.0-openjdk-amd64/bin/java -Djava.util.logging.config.file=/opt/tomcat/conf/logging.properties -Djava.util.logging.manager=org.a

Now you can open the Tomcat GUI in your web browser via your server IP address and port 8080:

http://YOUR_IP_ADDRESS:8080

6. Configuration of Tomcat

Tomcat Manager is a place when you can easily deploy, list, and manage your applications. It has a nice GUI and is very intuitive to use. Later, you will need access to Tomcat Manager and in this step, we are going to enable it. Open the file:

nano /opt/tomcat/conf/tomcat-users.xml

And, add the following lines at the bottom before the line “”:

<role rolename="manager-gui"/>
<role rolename="admin-gui"/>
<user username="admin" password="YourStrongPasswordHere" roles="manager-gui,admin-gui"/>

Save the file and close it. Now we need to allow access to Tomcat for WebApp and Host Managers:

nano /opt/tomcat/webapps/manager/META-INF/context.xml

Comment out the following lines

<!-- 
<Valve className="org.apache.catalina.valves.RemoteAddrValve"
         allow="127\.\d+\.\d+\.\d+|::1|0:0:0:0:0:0:0:1" /> 
-->
nano /opt/tomcat/webapps/host-manager/META-INF/context.xml
<!-- 
<Valve className="org.apache.catalina.valves.RemoteAddrValve"
         allow="127\.\d+\.\d+\.\d+|::1|0:0:0:0:0:0:0:1" /> 
-->

Save the files close it and restart the tomcat service:

systemctl restart tomcat

Install Apache Tomcat 10 on Debian 10Now, refresh the tomcat page and you will be able to access the Manager App at http://162.246.248.185:8080/manager/html with the username and password set above. Congratulations! You successfully installed and configured Tomcat 10 on Debian 10. Now you can easily deploy Java applications and make them run in no time. Of course, if you find some difficulties while installing the app you do not have to install it by yourself. You can always contact our system admins and with their expertise, they will install Tomcat 10 for you. All you need to do is order an SSD VPS plan and contact our support. We are available 24/7.

PS. If you liked this post, on how to install Apache Tomcat 10 on Debian 10, 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 Apache Tomcat 10 on Debian 10 appeared first on LinuxHostSupport.

]]>
https://linuxhostsupport.com/blog/how-to-install-apache-tomcat-10-on-debian-10/feed/ 0
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