debian | 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 PHP 8 on Debian https://linuxhostsupport.com/blog/how-to-install-php-8-on-debian/ https://linuxhostsupport.com/blog/how-to-install-php-8-on-debian/#respond Tue, 30 Jan 2024 18:30:00 +0000 https://linuxhostsupport.com/blog/?p=2026 Let’s follow this step-by-step guide on how to install PHP 8.0 on Debian 10. PHP is an open-source general-purpose scripting language, mostly used by web developers as it can easily be embedded into HTML. PHP version 8.0 was officially released on November 26, 2020, and it is the latest release of the PHP language. It […]

The post How to Install PHP 8 on Debian appeared first on LinuxHostSupport.

]]>
Let’s follow this step-by-step guide on how to install PHP 8.0 on Debian 10. PHP is an open-source general-purpose scripting language, mostly used by web developers as it can easily be embedded into HTML.

PHP version 8.0 was officially released on November 26, 2020, and it is the latest release of the PHP language. It is packed with lots of new improvements, features, and optimizations including named arguments, attributes, constructor property promotion, JIT (Just in Time Compiler), match expression, union types, null safe operator, better error handling, improvements in the type system, and better consistency.

Also, according to multiple tests, PHP 8.0 can handle much more requests per second compared to the older versions of PHP. If your PHP-based website or application is fully compatible with PHP 8.0 you should definitely consider upgrading to the latest version.

Prerequisites

  • A Linux VPS or server running Debian 10.
  • SSH access
  • System user with sudo or root privileges

Login and Update the server

In order to start with the installation of PHP 8.0 on our Debian 10 server, we have to access the server via SSH. We will log in as the root user, but you can use any system user which has sudo privileges:

ssh root@IP_Address -p Port_number

IP_Address and Port_number should be replaced with the actual IP address and SSH port number.

Once the SSH connection is established and you are in, in order to have the latest bug fixes, new features, and security fixes of all installed packages, it is always a good idea to update the installed packages on the server.

apt update && apt upgrade

Add third party APT repository

Debian 10 by default has PHP 7.3 in its repositories. To check what PHP version is available in the Debian repositories, run the following command:

apt-cache policy php

Output:

php:
Installed: 2:7.3+69
Candidate: 2:7.3+69
Version table:
*** 2:7.3+69 500
500 http://httpredir.debian.org/debian buster/main amd64 Packages
100 /var/lib/dpkg/status

Or if PHP is already installed on the VPS, check the installed version:

php -v

Output:

PHP 7.3.27-1~deb10u1 (cli) (built: Feb 13 2021 16:31:40) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.3.27, Copyright (c) 1998-2018 Zend Technologies
with Zend OPcache v7.3.27-1~deb10u1, Copyright (c) 1999-2018, by Zend Technologies

From the output above we can see that we can only install PHP 7.3 from the official Debian repositories, so if need the latest PHP 8.0 version, we will have to add a third-party repository. But first, let’s install some necessary packages:

apt -y install apt-transport-https software-properties-common gnupg2

Once the packages are installed, download the GPG key and add it to your server to verify the necessary PHP packages

wget -qO - https://packages.sury.org/php/apt.gpg | sudo apt-key add -

Create a Personal Package Archives (PPAs) file with the new PHP repository

echo "deb https://packages.sury.org/php/ buster main" | sudo tee /etc/apt/sources.list.d/php.list

And finally, update the repositories and install PHP 8.

apt update && apt install php8.0

Once all dependencies are installed, check the version of PHP installed on your Debian 10 server, to confirm that PHP 8 is successfully installed

php -v

Output:

PHP 8.0.9 (cli) (built: Jul 30 2021 13:09:07) ( NTS )
Copyright (c) The PHP Group
Zend Engine v4.0.9, Copyright (c) Zend Technologies
with Zend OPcache v8.0.9, Copyright (c), by Zend Technologies

Install PHP 8 extensions

In order to enable some extra features, functionalities, or libraries, PHP has lots of additional extensions. To check the list of all available extensions for PHP 8.0, execute the following command:

apt search php8.0-*

Output:

…
php8.0-maxminddb/buster 1.10.1-1+0~20210802.2+debian10~1.gbp162f0b amd64
Reader for the MaxMind DB file format for PHP

php8.0-maxminddb-dbgsym/buster 1.10.1-1+0~20210802.2+debian10~1.gbp162f0b amd64
debug symbols for php8.0-maxminddb

php8.0-mbstring/buster 8.0.9-1+0~20210730.22+debian10~1.gbp99e7e9 amd64
MBSTRING module for PHP

php8.0-mbstring-dbgsym/buster 8.0.9-1+0~20210730.22+debian10~1.gbp99e7e9 amd64
debug symbols for php8.0-mbstring

php8.0-mcrypt/buster 3:1.0.4-5+0~20210223.3+debian10~1.gbp68347e amd64
PHP bindings for the libmcrypt library
…

If for some reason you need to install the PHP mbstring extension for example, you can easily do it with the following command:

apt -y install php8.0-mbstring

That’s all. If you closely followed the tutorial, you have successfully installed PHP 8 on your Debian 10 VPS from a third-party repository. If you need more specific details about this major update of PHP, you can check their release notes or their documentation.

Of course, you don’t need to install PHP 8.0 on Debian 10 yourself if you use our Linux server management plans, in which case you can simply ask our team of expert Linux admins to install and set this up for you. They are available 24/7 and will take care of your request immediately.

If you liked this post on how to install PHP 8.0 on Debian 10, please share it with your friends on the social networks by using the share shortcuts, or simply leave a comment in the comments section. Thank you.

The post How to Install PHP 8 on Debian appeared first on LinuxHostSupport.

]]>
https://linuxhostsupport.com/blog/how-to-install-php-8-on-debian/feed/ 0
How to Install Jellyfin Media Server on Debian 12 https://linuxhostsupport.com/blog/how-to-install-jellyfin-media-server-on-debian-12/ https://linuxhostsupport.com/blog/how-to-install-jellyfin-media-server-on-debian-12/#respond Fri, 15 Dec 2023 18:30:00 +0000 https://linuxhostsupport.com/blog/?p=1957 Jellyfin is a free and open-source media server solution that allows you to control and manage your streaming media. In this tutorial, we will show you how to install Jellyfin on Debian 12. Jellyfin is an alternative to the proprietary Emby and Plex, designed to provide media from a server to end-user devices through a […]

The post How to Install Jellyfin Media Server on Debian 12 appeared first on LinuxHostSupport.

]]>
Jellyfin is a free and open-source media server solution that allows you to control and manage your streaming media. In this tutorial, we will show you how to install Jellyfin on Debian 12.

Jellyfin is an alternative to the proprietary Emby and Plex, designed to provide media from a server to end-user devices through a number of client applications. Media content can be accessed through specialized Jellyfin applications, extensions designed for various streaming platforms, a web interface, or by means of DLNA uPnP streaming to a wide range of compatible devices. Let’s start with the installation.

Prerequisites

  • A Debian 12 server or VPS
  • SSH access with sudo privileges, or root access.

Step 1. Log in to your 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 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 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

Step 2. Install Dependencies

Installing Jellyfin requires some packages. So, before starting, we will install the dependencies on our Debian 12 system. Let’s execute the command below to proceed.

# apt install gnupg curl apt-transport-https ca-certificates -y

Step 3. Add the Jellyfin Repository

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

# curl -fsSL https://repo.Jellyfin.org/Jellyfin_team.gpg.key | gpg --dearmor -o /etc/apt/keyrings/Jellyfin.gpg

Then, we’ll create our Jellyfin source list.

# nano /etc/apt/sources.list.d/Jellyfin.sources

Insert the following into the file.

Types: deb
URIs: https://repo.Jellyfin.org/debian
Suites: bookworm
Components: main
Architectures: amd64
Signed-By: /etc/apt/keyrings/Jellyfin.gpg

Save the file then exit from the editor.

Next, we need to update the package index files on the system.

# apt update

Step 4. Install Jellyfin

After adding the Jellyfin repository and updating the package index files in the previous step, we should be able to install Jellyfin from its repository now. Simply execute this command below.

# apt install jellyfin -y

Once installed, Jellyfin should be up and running on a Debian 12, you can verify this by executing the command below.

# systemctl status Jellyfin

The command should return an output similar to this:

root@debian12:~# systemctl status jellyfin
● jellyfin.service - Jellyfin Media Server
     Loaded: loaded (/lib/systemd/system/jellyfin.service; enabled; preset: enabled)
    Drop-In: /etc/systemd/system/Jellyfin.service.d
             └─jellyfin.service.conf
     Active: active (running) since Mon 2023-10-16 04:59:06 CDT; 2min 19s ago
   Main PID: 590854 (Jellyfin)
      Tasks: 15 (limit: 2306)
     Memory: 183.4M
        CPU: 28.848s
     CGroup: /system.slice/jellyfin.service
             └─590854 /usr/bin/Jellyfin --webdir=/usr/share/jellyfin/web --restartpath=/usr/lib/jellyfin/restart.sh --ffmpeg=/usr/lib/jellyfin-ff>

Oct 16 04:59:33 debian12.linuxhostsupport.net jellyfin[590854]: [04:59:33] [INF] ServerId: c580665228f148dc8e24e556ee48d263
Oct 16 04:59:34 debian12.linuxhostsupport.net jellyfin[590854]: [04:59:34] [INF] Executed all pre-startup entry points in 0:00:00.430609
Oct 16 04:59:34 debian12.linuxhostsupport.net jellyfin[590854]: [04:59:34] [INF] Core startup complete
Oct 16 04:59:34 debian12.linuxhostsupport.net jellyfin[590854]: [04:59:34] [INF] StartupTrigger fired for task: Update Plugins
Oct 16 04:59:34 debian12.linuxhostsupport.net jellyfin[590854]: [04:59:34] [INF] Queuing task PluginUpdateTask
Oct 16 04:59:34 debian12.linuxhostsupport.net jellyfin[590854]: [04:59:34] [INF] Executing Update Plugins
Oct 16 04:59:34 debian12.linuxhostsupport.net jellyfin[590854]: [04:59:34] [INF] Executed all post-startup entry points in 0:00:00.7256918
Oct 16 04:59:34 debian12.linuxhostsupport.net jellyfin[590854]: [04:59:34] [INF] Startup complete 0:00:25.7226079
Oct 16 04:59:36 debian12.linuxhostsupport.net jellyfin[590854]: [04:59:36] [INF] Update Plugins Completed after 0 minute(s) and 2 seconds
Oct 16 04:59:36 debian12.linuxhostsupport.net jellyfin[590854]: [04:59:36] [INF] ExecuteQueuedTasks

You should be able to access Jellyfin at http://YOUR_SERVER_IP_ADDRESS:8096

Step 5. Install and Configure Nginx

To access Jellyfin using your domain or subdomain, we need to install and configure a reverse proxy. In this step, we will install Nginx and create an Nginx server block for our Jellyfin website.

# apt install nginx

Once installed, we can create a new configuration file.

# nano /etc/nginx/sites-enabled/Jellyfin.yourdomain.com.conf

Insert the following into the file.

upstream jellyfin {
 server 127.0.0.1:8096;
}

server {
      listen 80;
      server_name jellyfin.yourdomain.com;

      access_log /var/log/nginx/jellyfin.access.log;
      error_log /var/log/nginx/jellyfin.error.log;

    resolver 127.0.0.1 valid=30;

    
    add_header X-Frame-Options "SAMEORIGIN";
    add_header X-XSS-Protection "1; mode=block";
    add_header X-Content-Type-Options "nosniff";


    location / {
        
        proxy_pass http://jellyfin;
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
        proxy_set_header X-Forwarded-Protocol $scheme;
        proxy_set_header X-Forwarded-Host $http_host;

        proxy_buffering off;
    }

    
    location = /web/ {
        
        proxy_pass http://jellyfin/web/index.html;
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
        proxy_set_header X-Forwarded-Protocol $scheme;
        proxy_set_header X-Forwarded-Host $http_host;
    }

    location /socket {
        
        proxy_pass http://jellyfin/socket;
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "upgrade";
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
        proxy_set_header X-Forwarded-Protocol $scheme;
        proxy_set_header X-Forwarded-Host $http_host;
    }
}

Do not forget to replace jellyfin.yourdomain.com with your actual domain or subdomain name which is already pointing to your server IP address. Then, save the file, exit, and restart Nginx.

# systemctl restart nginx

At this point, you should be able to access your Jellyfin website at http://jellyfin.yourdomain.com

Choose your language then click on the Next button.

In this step, we can create a new account. Fill in the blanks with your preferred values, then click Next to proceed.

In this step, you can create a media library or simply hit the Next button to skip it.

Here, you can choose your language then country, and click Next to continue.

Check the “Allow remote connections to this server” then click Next.

Click Finish, then you will be brought to the login page.

Log in using the credentials you created earlier to access the backend.

Once logged, in you can navigate to the dashboard and customize your Jellyfin installation.

Congratulations! You have successfully installed Jellyfin on Debian 12.

Of course, if you are one of our Managed Linux Support customers, you don’t have to install Jellyfin on Debian 12 yourself – simply ask our admins, sit back, and relax. Our support team will install Jellyfin on Debian 12 for you immediately without any additional fee, along with anything else you need.

If you liked this post about how to install Jellyfin on Debian 12, please share it with your friends on social networks using the share buttons, or simply leave a comment in the comments section. Thanks.

The post How to Install Jellyfin Media Server on Debian 12 appeared first on LinuxHostSupport.

]]>
https://linuxhostsupport.com/blog/how-to-install-jellyfin-media-server-on-debian-12/feed/ 0
How to Set Up an OpenVPN Server on Debian 11 https://linuxhostsupport.com/blog/how-to-set-up-an-openvpn-server-on-debian-11/ https://linuxhostsupport.com/blog/how-to-set-up-an-openvpn-server-on-debian-11/#respond Wed, 30 Aug 2023 17:30:00 +0000 https://linuxhostsupport.com/blog/?p=1858 OpenVPN is a well-known VPN protocol that secures your connection when accessing the internet. It is a tool that lets you browse the internet world with some level of anonymity. OpenVPN is an open-source network protocol to facilitate a secure connection between two points in a network. In this tutorial, we will show you how […]

The post How to Set Up an OpenVPN Server on Debian 11 appeared first on LinuxHostSupport.

]]>
OpenVPN is a well-known VPN protocol that secures your connection when accessing the internet. It is a tool that lets you browse the internet world with some level of anonymity.

OpenVPN is an open-source network protocol to facilitate a secure connection between two points in a network. In this tutorial, we will show you how to install OpenVPN on the Debian 11 server.

Prerequisites

  • A Debian 11 VPS
  • SSH root access or a user with sudo privileges

Step 1. Log in to your server via SSH

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

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

# lsb_release -a

The command will show you an output like this.

No LSB modules are available.
Distributor ID: Debian
Description: Debian GNU/Linux 11 (bullseye)
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:

# apt update

Step 2. Install OpenVPN Server

OpenVPN server packages are available in the default Debian 11 repository. But, in this article, we will use a shell script we can download from github.com to install the OpenVPN server. The installation is fairly easy and straightforward. Let’s download the script and proceed with the OpenVPN Server installation.

# wget https://git.io/vpn -O openvpn-install.sh

The installation script has been downloaded and saved as openvpn-install.sh; let’s execute the file and proceed with the installation.

# bash openvpn-install.sh

After the executable is executed, you will be prompted for a few options. Select UDP as the protocol, port 1194, and choose your favorite DNS resolver and the VPN client name.

Welcome to this OpenVPN road warrior installer!

Which protocol should OpenVPN use?
1) UDP (recommended)
2) TCP
Protocol [1]: 1

What port should OpenVPN listen to?
Port [1194]:

Select a DNS server for the clients:
1) Current system resolvers
2) Google
3) 1.1.1.1
4) OpenDNS
5) Quad9
6) AdGuard
DNS server [1]: 3

Enter a name for the first client:
Name [client]: vpnclient

OpenVPN installation is ready to begin.
Press any key to continue…

At this point, we can press any keyboard key to start the installation. It will finish in a few seconds, depending on your network speed.

Once installed, the OpenVPN service will be automatically up and running. You will see a message about where the .ovpn file you can download.

Step 3. Connecto to OpenVPN Server

A VPN client is required to connect to our OpenVPN server. If you are using a Windows machine, you can use OpenVPN Client or Tunnelblick if you are using a MacOS device. For Linux desktops users, you can use the openvpn client file to import the network configuration file and then connect to your VPN server.

In this tutorial, we created ‘vpnclient’ as a VPN user, and the installation script generated the configuration file at /root/vpnclient.ovpn. We can download this file to connect to our OpenVPN server.

The client configuration is available in: /root/vpnclient.ovpn
New clients can be added by running this script again.

Download the file or print the file using the cat command, then create a .ovpn using the file’s content. Then, simply double-click on it to start using the VPN client.

Step 4. Create Additional OpenVPN Users

To create new VPN users, simply execute the installation script, and the script will ask you one of the options.

OpenVPN is already installed.

Select an option:
1) Add a new client
2) Revoke an existing client
3) Remove OpenVPN
4) Exit
Option:

Choose number 1, then ENTER. You will be asked for a client name. And it will show you an output like this.

* Using Easy-RSA configuration:
  /etc/openvpn/server/easy-rsa/pki/vars

* Using SSL: openssl OpenSSL 1.1.1n  15 Mar 2022

Generating a RSA private key
............................+++++
............+++++
writing new private key to '/etc/openvpn/server/easy-rsa/pki/5e4b9ee0/temp.1.1'
-----

Notice
------
Keypair and certificate request completed. Your files are:
* req: /etc/openvpn/server/easy-rsa/pki/reqs/rosehosting.req
* key: /etc/openvpn/server/easy-rsa/pki/private/rosehosting.key 

Using configuration from /etc/openvpn/server/easy-rsa/pki/5e4b9ee0/temp.4.1
Check that the request matches the signature
Signature ok
The Subject's Distinguished Name is as follows
commonName            :ASN.1 12:'rosehosting'
Certificate is to be certified until Jun 16 07:27:20 2033 GMT (3650 days)

Write out database with 1 new entries
Data Base Updated

Notice
------
Certificate created at:
* /etc/openvpn/server/easy-rsa/pki/issued/rosehosting.crt

Notice
------
Inline file created:
* /etc/openvpn/server/easy-rsa/pki/inline/rosehosting.inline


rosehosting added. Configuration available in: /root/rosehosting.ovpn

That’s it! You have successfully installed the OpenVPN server the easy way. You can now add more users and use the VPN network for your activity.

Check out a more complicated installation without a script.

Of course, you don’t have to install OpenVPN server on Debian 11 if you use one of our Debian Hosting services, in which case you can simply ask our admins, sit back, and relax. Our admins will install and set up OpenVPN on Debian 11 immediately without any additional fee, along with many useful optimizations we can do for you. Managing an OpenVPN server is not just about the installation; we can help you optimize your OpenVPN installation if you have a VPS with us.

PS. If you liked this post on how to set up an OpenVPN Server on Debian 11, please share it with your friends on social networks or simply leave a reply below. Thanks.

The post How to Set Up an OpenVPN Server on Debian 11 appeared first on LinuxHostSupport.

]]>
https://linuxhostsupport.com/blog/how-to-set-up-an-openvpn-server-on-debian-11/feed/ 0
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 Docker Compose on Debian 9 https://linuxhostsupport.com/blog/how-to-install-docker-compose-on-debian-9/ https://linuxhostsupport.com/blog/how-to-install-docker-compose-on-debian-9/#respond Fri, 18 Dec 2020 11:28:27 +0000 https://linuxhostsupport.com/blog/?p=1311 Docker is an open-source application that provides lightweight operating-system-level virtualization through the use of containers. The key benefit of Docker is that it allows users to package an application with all of its dependencies into a standardized unit for software development. Docker Engine is available in Community Edition (CE) and Enterprise Edition (EE). In this […]

The post How to Install Docker Compose on Debian 9 appeared first on LinuxHostSupport.

]]>
installing docker compose on debian 9 Docker is an open-source application that provides lightweight operating-system-level virtualization through the use of containers. The key benefit of Docker is that it allows users to package an application with all of its dependencies into a standardized unit for software development.

Docker Engine is available in Community Edition (CE) and Enterprise Edition (EE). In this guide, we will do the installation of Docker Community Edition on Debian 9.

Requirements

  • For the purposes of this tutorial, we will be using a Debian 9 Server.
  • Full SSH root access or a user with sudo privileges is also required.

Step 1: Connect via SSH

Connect to your server via SSH as the root user using the following command:

ssh root@IP_ADDRESS -p PORT_NUMBER

Remember to replace “IP_ADDRESS” and “PORT_NUMBER” with your actual server IP address and SSH port number. Replace “root” with your admin username if you’re not planning on using the root account.

Before starting with the installation, we need to update the OS packages to their latest versions.

We can do this by running the following commands:

$ apt-get update 
$ apt-get upgrade

Once the upgrade is complete, we can move on to the next step.

Step 2: Install Dependency packages

Start the installation by ensuring that all the packages used by docker as dependencies are installed.

apt-get install -y apt-transport-https ca-certificates curl gnupg2 software-properties-common build-essential

Step 3: Setting Up Docker Repository

To add the Docker repository to our server, we need to add the GPG keys first with the following commands:

curl -fsSL https://download.docker.com/linux/debian/gpg | sudo apt-key add -

Once added, add the repository pointing to ‘stable’ update channel.

add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/debian $(lsb_release -cs) stable"

We can now update our packages, which should include the repository from Docker.

apt-get update

After applying the command, you should see the repository link added:

Get:5 https://download.docker.com/linux/debian stretch InRelease [44.8 kB]
Get:7 https://download.docker.com/linux/debian stretch/stable amd64 Packages [8,437 B]

Step 4: Installing Docker CE

After setting up the repository, we can now install the Docker CE, as well as the Docker CLI by running the following command:

apt-get install -y docker-ce docker-ce-cli

This might take some time as it will also install any additional libraries that it requires.

Once the installation is done, verify that the docker service is running by typing:

systemctl status docker

Output:

docker.service - Docker Application Container Engine
   Loaded: loaded (/lib/systemd/system/docker.service; enabled; vendor preset: enabled)
   Active: active (running) since Sun 2019-07-14 03:40:16 EDT; 38s ago
     Docs: https://docs.docker.com
 Main PID: 4434 (dockerd)
   CGroup: /system.slice/docker.service
           └─4434 /usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock

You can also check and verify the Docker version using:

docker -v

Output:

Docker version 18.09.7, build 2d0083d

Finally, make sure that the docker service will run at boot:

systemctl enable docker

The docker the group is created but no users are added. Add normal user to the group to run docker commands as a non-privileged user.

sudo usermod -aG docker $USER

Step 5: Testing Docker CE

Let’s now test if we can run Docker containers. You can test your Docker installation by running the classic “Hello World”.

$ docker run hello-world

Hello from Docker.
This message shows that your installation appears to be working correctly.
...

You can use the docker images a command to see a list of all images on your system.

REPOSITORY          TAG                 IMAGE ID            CREATED             SIZE
hello-world         latest              fce289e99eb9        6 months ago        1.84kB

The docker ps command shows you all containers that are currently running.

CONTAINER ID        IMAGE               COMMAND             CREATED             STATUS              PORTS               NAMES

Since no containers are running, we see a blank line. Let’s try a more useful variant: docker ps -a

CONTAINER ID        IMAGE               COMMAND             CREATED             STATUS                      PORTS               NAMES
1a9048235446        hello-world         "/hello"            24 minutes ago      Exited (0) 24 minutes ago                       amazing_bassi

Throughout this tutorial, you will run multiple times, and leaving stray containers will eat up disk space. Hence, as a rule of thumb, I clean up containers once I’m done with them. To do that, you can run the docker rm command. Just copy the container IDs from above and paste them alongside the command.

docker rm 1a9048235446
1a9048235446

In later versions of Docker, the docker container prune command can be used to achieve the same effect.

$ docker container prune
WARNING! This will remove all stopped containers.
Are you sure you want to continue? [y/N] y

If you want to see the options available to a specific command execute the following command:

docker --help

The output should be similar to this:

install docker compose on debian 9

That’s it! Docker CE has been successfully installed on your Debian 9 server.


docker installation on debian 9Of 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 CE onto your server for you. They are available 24×7 and will take care of your request immediately.

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

The post How to Install Docker Compose on Debian 9 appeared first on LinuxHostSupport.

]]>
https://linuxhostsupport.com/blog/how-to-install-docker-compose-on-debian-9/feed/ 0
How to Install Vanilla Forums on Debian 9 https://linuxhostsupport.com/blog/how-to-install-vanilla-forums-on-debian-9/ https://linuxhostsupport.com/blog/how-to-install-vanilla-forums-on-debian-9/#respond Fri, 14 Aug 2020 17:20:16 +0000 https://linuxhostsupport.com/blog/?p=1251 In this tutorial, we will show you how to install Vanilla Forums on a Debian 9 server or VPS. Vanilla Forums is a modern, lightweight, and open-source forum software written in PHP. Vanilla Forums has many features, settings, and areas that can be customized. The flexibility and free nature of Vanilla Forums (plus its modern […]

The post How to Install Vanilla Forums on Debian 9 appeared first on LinuxHostSupport.

]]>
In this tutorial, we will show you how to install Vanilla Forums on a Debian 9 server or VPS.

Vanilla Forums is a modern, lightweight, and open-source forum software written in PHP. Vanilla Forums has many features, settings, and areas that can be customized. The flexibility and free nature of Vanilla Forums (plus its modern design and feature set) makes it an attractive choice for anyone looking to start their own forum to talk to people on. Installing Vanilla Forums on Debian 9 is an easy task if you follow the steps below carefully. Let’s begin with the installation.

Prerequisites

  • A server or VPS running Debian 9.
  • Apache web server 2.0 or higher including the mod_rewrite Apache module. Alternatively, you can use Nginx as a web server with PHP support in place of Apache 2.
  • PHP 7.1 or higher (PHP 7.3 is preferred) with the following PHP extensions enabled: mbstring, cURL, GD, and PDO.
  • MySQL 5.7 or higher (or Percona/MariaDB).
  • Access to the root user account (or access to an admin account with root privileges).

We’ll be covering the installation of all of these prerequisites, so don’t worry if you’re missing some or all of them. You can skip over the ones that you already have installed if needed, but we recommend following along in case something is configured differently from your setup.

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

Log in to your Debian 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 we can start with the Vanilla Forums installation, we have to make sure that all Debian packages installed on the server are up to date. We can do this by running the following commands:

sudo apt-get update
sudo apt-get upgrade

Once all packages are up to date, we can begin by installing Apache.

Step 2: Apache Web Server Installation

To install the Apache web server, run the following command:

apt-get install apache2

After the installation is complete, enable Apache to start automatically upon server boot with:

systemctl enable apache2

We can also check the status of your Apache service with the following command:

systemctl status apache2

Output:

● apache2.service - The Apache HTTP Server
   Loaded: loaded (/lib/systemd/system/apache2.service; disabled; vendor preset: enabled)
   Active: active (running) since Wed 2019-07-24 10:09:17 CDT; 8s ago
  Process: 1204 ExecStart=/usr/sbin/apachectl start (code=exited, status=0/SUCCESS)
 Main PID: 1208 (apache2)
   CGroup: /system.slice/apache2.service
           ├─1208 /usr/sbin/apache2 -k start
           └─1209 /usr/sbin/apache2 -k start

Step 3: Install MariaDB and Create a MariaDB Database

For the purposes of this tutorial, we will install MariaDB to serve as the database server. This is where Vanilla Forums will store its posts and content. Run the following command to install MariaDB 10.1, the latest version available in the official Debian 9 repositories at the time of this article being written, along with some required MariaDB packages:

sudo apt-get install mariadb-common mariadb-client-10.1 mariadb-client-core-10.1 mariadb-server-10.1 mariadb-server-core-10.1

Once the installation is complete, issue the following command to further improve the security of your MariaDB server installation. The command is optional, however we strongly recommend it as it improves the security of your MariaDB server:

mysql_secure_installation

We recommend answering every prompt with  ‘Y’.

Once this is done, create a new MariaDB database and user for the Vanilla Forums installation.

Log in to the MariaDB console as MariaDB user (e.g. root):

sudo mysql -uroot -p

Run the following commands to create a new MariaDB database, user, and grant privileges for the user to access the database:

MariaDB [(none)]> CREATE DATABASE vanilladb character set UTF8 collate utf8_bin;
MariaDB [(none)]> GRANT ALL PRIVILEGES ON vanilladb.* TO 'vanilla'@'localhost' IDENTIFIED BY 'StrongPassword';
MariaDB [(none)]> FLUSH PRIVILEGES;
MariaDB [(none)]> quit

Remember to replace StrongPassword with an actual strong password.

Step 4: Install PHP 7.3 and Required PHP Packages

We will be using the Ondřej Surý repository for PHP to install PHP 7.3. Import the signing key and enable the PPA for PHP 7.3 by using the following commands:

wget -q https://packages.sury.org/php/apt.gpg -O- | sudo apt-key add -
echo "deb https://packages.sury.org/php/ stretch main" | sudo tee /etc/apt/sources.list.d/php.list

Install the ca-certificates and apt-transport-https packages by running the following command:

sudo apt-get install ca-certificates apt-transport-https

Once you are done with this, update your package manager once again using the command below:

sudo apt-get update

Install PHP 7.3 and PHP extensions:

apt-get install php7.3 php7.3-cli php7.3-common php7.3-curl php7.3-gd php7.3-intl php7.3-json php7.3-mbstring php7.3-mysql php7.3-zip libapache2-mod-php7.3

Disable PHP 7.0 if it is currently enabled:

sudo a2dismod php7.0

Then, enable PHP 7.3:

sudo a2enmod php7.3

Step 5: Create a new Apache Configuration File

Create a new Apache configuration file for the domain/subdomain name that we will be using to access the Vanilla Forums application. For this tutorial, we will use ‘vanilla.domain.com‘. Be sure to replace any occurrence of that domain name with your own registered domain name.

vi /etc/apache2/sites-available/vanilla.conf

Add the following lines:

<VirtualHost *:80>
ServerName vanilla.domain.com
DocumentRoot /var/www/vanilla/
CustomLog ${APACHE_LOG_DIR}/vanilla.domain.com.access.log combined
ErrorLog ${APACHE_LOG_DIR}/vanilla.domain.com.error.log
<Directory /var/www/vanilla>
DirectoryIndex index.php
Options -Indexes
AllowOverride All
Order allow,deny
allow from all
</Directory>
</VirtualHost>

Again, do not forget to replace vanilla.domain.com with your actual domain/subdomain name. Save and close the Apache configuration file.

Create a new directory named ‘vanilla’ in your web server’s directory:

mkdir -p /var/www/vanilla

To enable the newly created configuration file in Apache, run:

sudo a2ensite vanilla

Then, disable the default Apache configuration file using this next line:

sudo a2dissite 000-default

Also, we need to enable the Apache ‘rewrite’ module (if it is not already enabled):

sudo a2enmod rewrite

Check if there are errors with the newly created Apache configuration:

sudo apachectl -t
Syntax OK

If the syntax is OK and there are no errors, we can restart the Apache web service:

sudo systemctl restart apache2.service

Step 6: Install Vanilla Forums

At the time of writing this tutorial, the latest stable version of Vanilla Forums is 3.1. Download the latest stable version of Vanilla Forums and extract it in the /var/www/ directory:

cd /var/www/
wget https://us.v-cdn.net/5018160/uploads/addons/1KCWYE1PTWN7.zip -o vanilla-core-3.1.zip
mv package/* vanilla
mv /var/www/package/.htaccess.dist /var/www/vanilla/.htaccess

Change the owner and set the correct permissions for all files in the /var/www/vanilla/ directory using the following command:

sudo chown -R www-data:www-data /var/www/vanilla

Open http://vanilla.domain.com in your favorite web browser and follow the easy instructions: enter the database name, database username and password and set the username and password for the administrator user account of the Vanilla Forums application.

Then, click on the ‘Continue’ button and we will automatically be logged in to the Vanilla Forums administration back-end:

That’s it! You now have a working Vanilla Forums instance on your Debian 9 VPS.


Of course, you don’t have to install Vanilla Forums on Debian 9 if your server is covered by our Managed Linux Support services, in which case you can simply ask our expert Linux admins to install Vanilla Forums on your Debian VPS for you. They can install it, configure it, and do anything else that you might need. They are available 24×7 and will take care of all of your requests immediately.

PS. If you liked this post on how to install Vanilla Forums on Debian 9, please share it with your friends on the social networks using the share shortcuts, or simply leave a reply in the comments sections. Thanks.

The post How to Install Vanilla Forums on Debian 9 appeared first on LinuxHostSupport.

]]>
https://linuxhostsupport.com/blog/how-to-install-vanilla-forums-on-debian-9/feed/ 0
How to Install SOPlanning on Debian 9 https://linuxhostsupport.com/blog/how-to-install-soplanning-on-debian-9/ https://linuxhostsupport.com/blog/how-to-install-soplanning-on-debian-9/#respond Fri, 07 Aug 2020 19:47:36 +0000 https://linuxhostsupport.com/blog/?p=1239 In this article, we will show you how to install SOPlanning on a Debian 9 server. SOPlanning is an open-source and free-to-use online planning tool that is designed to organize tasks and projects easily and efficiently. SOPlanning provides users with many features, such as built-in PDF export, email notifications, .XLS or .CSV export, synchronization with Google […]

The post How to Install SOPlanning on Debian 9 appeared first on LinuxHostSupport.

]]>
In this article, we will show you how to install SOPlanning on a Debian 9 server.

SOPlanning is an open-source and free-to-use online planning tool that is designed to organize tasks and projects easily and efficiently. SOPlanning provides users with many features, such as built-in PDF export, email notifications, .XLS or .CSV export, synchronization with Google Calendar and Outlook, and lots more.

Since SOPlanning is an open source software, we can make modifications, change colors, customize the company logo etc. This application is commonly used in IT Project Management, Industrial Production, Material Reservation, Online booking systems and more.

1. Log in via SSH on the Debian server

Log in via SSH to your server as user root (or user with sudo privileges)

ssh root@Server_IP_Address -p Port_Number

Do not forget to replace the Server_IP_Address and Port_Number fields with your actual server IP address and SSH port number. The default port for SSH is 22, so try that first if you don’t know yours. Also, if you want to connect with a user that has root privileges, simply change the ‘root’ user with the user that you would like to use.

2. Update all Packages

The first thing to do when you are logged in is to make sure that all the installed packages are up to date:

sudo apt update
sudo apt upgrade

That shouldn’t take too long, and it’ll ensure that everything is secure and ready.

3. Install LAMP Server

A LAMP setup is required in order for SOPlanning to work. If you don’t already have a LAMP (Apache, MySQL (or MariaDB) and PHP) server installed on your server or VPS, you can install it with the next few steps. To install Apache and MariaDB, you can execute the following command to install both at the same time:

sudo apt-get install apache2 mariadb-server -y

Once the installation is complete, you will need to add the Ondrej PHP repository to your system so that you can install the required PHP version. We need a third-party repository since the PHP version that we need isn’t included in the built-in repositories:

sudo apt install ca-certificates apt-transport-https 
wget -q https://packages.sury.org/php/apt.gpg -O- | sudo apt-key add -
echo "deb https://packages.sury.org/php/ stretch main" | sudo tee /etc/apt/sources.list.d/php.list

The latest version of PHP for this application is PHP version 7.3. To install this version of PHP with all of the necessary modules, run the following commands:

sudo apt update
sudo apt-get install php7.3 php7.3-mysql php7.3-curl php7.3-json php7.3-cgi php7.3-recode php7.3-intl libapache2-mod-php7.3 php7.3-xmlrpc php7.3-gd php7.3-mbstring php7.3 php7.3-common php7.3-xmlrpc php7.3-soap php7.3-xml php7.3-intl php7.3-cli php7.3-ldap php7.3-zip php7.3-readline php7.3-imap php7.3-tidy -y

After all packages are installed, run the Apache and MariaDB services and allow them to start on boot with the commands:

sudo systemctl start apache2
sudo systemctl enable apache2
sudo systemctl start mariadb
sudo systemctl enable mariadb

4. Create a Database

To create a database, you need to log in to the MySQL console:

mysql -u root -p

By using the following query, you can create a database. We chose the name soplanning, but you can name it however you want:

CREATE DATABASE soplanning;

You then need to add a separate user that will be able to interact with your ‘soplanning’ database with the query:

GRANT ALL PRIVILEGES ON soplanning.* TO 'soplanning'@'localhost' IDENTIFIED BY '5tr0ng_PaS5w0rD';

Please do not forget to change the ‘5tr0ng_PaS5w0rD‘ with an actual strong password.

To apply the privileges that you set, you need to run this command:

FLUSH PRIVILEGES;

After we finish, we can exit from the MySQL session with the command:

quit

5. Install SOPlanning

First, download the latest stable version of SOPlanning in the /opt directory on the server and extract it in the /var/www/html/ directory:

cd /opt
wget https://sourceforge.net/projects/soplanning/files/soplanning/v1.44/soplanning-1-44.zip
unzip soplanning-1-44.zip -d /var/www/html/

Next, you need to set the appropriate ownership and file permissions (in this example it’ll be www-data because you are using the Apache web server) to the files:

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

6. Configure the Apache Web Server

In this step, you will set up a new virtual host on the web server in order for Apache to be able to serve the SOPlanning directory. To do this, you need to create a new configuration file using your preferred text editor:

sudo nano /etc/apache2/sites-available/soplanning.conf

Now add and modify the following lines:

<VirtualHost *:80>

   ServerName your_domain.com
   ServerAdmin admin@your_domain.com
   DocumentRoot /var/www/html/soplanning/

     <Directory /var/www/html/soplanning/>
       AllowOverride All
       Order allow,deny
       allow from all
     </Directory>

    ErrorLog /var/log/apache2/soplanning_error.log
    CustomLog /var/log/apache2/soplanning_custom.log combined

</VirtualHost>

Do not forget to change all mentions of your_domain.com with your actual domain name. Save and exit.

Enable the Apache SOPlanning configuration by executing this command:

sudo a2ensite soplanning.conf

To disable the Apache default configuration, run this command next:

sudo a2dissite 000-default

Also, make sure that the mod_rewrite Apache module is enabled:

sudo a2enmod rewrite

Once you make all the changes above, you need to restart the Apache web server:

systemctl restart apache2

6. Access SOPlanning

You can now open your favorite web browser and enter the domain you added as your_domain.com in the above configuration file.

http://your_domain.com/

You should be able to see the SOPlanning Installation Assistant page.

 

Enter the information about the database that we created in step 4 of this article.

Mysql server: localhost

Database name: soplanning

Mysql login: soplanning

Once the installation is complete, you can click on ‘Click here’ button and you will be redirected to a login page where you will be able to log in as an administrator user by using ‘admin’ for both username and password.

 

Congratulations, the installation is now complete and you should be able to see the SoPlanning dashboard as shown in the following screen:

 

It is recommended to change the password for the username ‘admin’ and use a strong password. You can do that from the SOPlanning dashboard by modifying your admin profile.

 

Now you can continue to explore this useful application by organizing your time and your projects.


Of course, you don’t have to install SOPlanning on Debian 9 if you use one of our Managed Linux Support services, in which case you can simply ask our expert system administrators to install SOPlanning on your Debian 9 server for you, using the LAMP stack or any other web hosting stack of your choice. They can also help you with almost any other aspect of your server’s functions and maintenance. They are available 24×7 and will take care of any requests immediately.

If you liked this post on how to install SOPlanning on Debian 9, please share it with your friends on the social networks using the share shortcuts, or simply let us know how the installation went in the comments section below. Thank you.

The post How to Install SOPlanning on Debian 9 appeared first on LinuxHostSupport.

]]>
https://linuxhostsupport.com/blog/how-to-install-soplanning-on-debian-9/feed/ 0
How to Install Apache Kafka on Debian 9 https://linuxhostsupport.com/blog/how-to-install-apache-kafka-on-debian-9/ https://linuxhostsupport.com/blog/how-to-install-apache-kafka-on-debian-9/#respond Wed, 15 Jul 2020 18:58:54 +0000 https://linuxhostsupport.com/blog/?p=1199 In this guide, we will show you how to install Apache Kafka on a Debian 9 VPS. Apache Kafka is a free and open-source distributed streaming software platform that lets you publish and subscribe to streams of records and store streams of records in a fault-tolerant and durable manner. Apache Kafka is written in Scala […]

The post How to Install Apache Kafka on Debian 9 appeared first on LinuxHostSupport.

]]>
In this guide, we will show you how to install Apache Kafka on a Debian 9 VPS.

Apache Kafka is a free and open-source distributed streaming software platform that lets you publish and subscribe to streams of records and store streams of records in a fault-tolerant and durable manner. Apache Kafka is written in Scala and Java. Used in thousands of companies across the world, Apache Kafka provides anyone with the ability to create streaming and stream processing applications that can read and store data in real time. This has a variety of use cases – anything from logging, to messaging, to processing almost any sort of data stream you could imagine. Let’s get started with the installation.

In order to run Apache Kafka on your VPS, the following requirements have to be met:

  • Java 8 or higher needs to be installed
  • ZooKeeper installed and running on the server
  • A VPS with at least 4GB of RAM

If you don’t have Java or ZooKeeper, don’t worry, we’ll be installing them in this tutorial as well.

Step 1 – Update OS Packages

Before we can start with the Apache Kafka installation, we have to make sure that all Debian OS packages that are installed on the server are up to date. We can do this by executing the following commands:

sudo apt-get update
sudo apt-get upgrade

Step 2 – Install JAVA

In order to run Apache Kafka on our server, we’ll need to have Java installed. We can check if Java is already installed using this command:

which java

If there is no output, that means that Java is not installed on the server yet. We can install it using the following command:

sudo apt-get install default-jdk

In order to check the Java version, run the following command on your server:

java -version

We should receive the following output:

openjdk version "1.8.0_181"
OpenJDK Runtime Environment (build 1.8.0_181-8u181-b13-2~deb9u1-b13)
OpenJDK 64-Bit Server VM (build 25.181-b13, mixed mode)

Step 3 – Install Zookeeper

Kafka uses ZooKeeper to store persistent cluster metadata, so we need to install ZooKeeper. The ZooKeeper service is responsible for configuration management, leader detection, synchronization, etc. ZooKeeper is available in the official Debian package repository, so we can install it using the following command:

sudo apt-get install zookeeperd

ZooKeeper is running on port 2181 and it doesn’t require much maintenance.

Step 4 – Install Apache Kafka

Crate a new system user dedicated for the Kafka service using the following command (we’re using the kafka name for our username, you can use any name you like):

useradd kafka -m

Set a password for the newly created user:

passwd kafka

Use a strong password and enter it twice. Next, add the user to the sudo group with:

adduser kafka sudo

Stop the ZooKeeper service:

systemctl stop zookeeper.service

Log in as the newly created admin user with:

su kafka

Download the latest version of Apache Kafka available at https://kafka.apache.org/downloads and extract it in a directory on your server:

cd ~
wget -O kafka.tgz http://apache.osuosl.org/kafka/2.1.0/kafka_2.12-2.1.0.tgz
tar -xvzf kafka.tgz
mv kafka_2.12-2.1.0/* .
rmdir /home/kafka/kafka_2.12-2.1.0

Edit the ZooKeeper systemd script:

vi /lib/systemd/system/zookeeper.service
[Unit]
Requires=network.target remote-fs.target
After=network.target remote-fs.target

[Service]
Type=simple
User=kafka
ExecStart=/home/kafka/bin/zookeeper-server-start.sh /home/kafka/config/zookeeper.properties
ExecStop=/home/kafka/bin/zookeeper-server-stop.sh
Restart=on-abnormal

[Install]
WantedBy=multi-user.target

Create a systemd unit file for Apache Kafka, so that you can run Kafka as a service on your server:

vi /etc/systemd/system/kafka.service

Add the following lines:

[Unit]
Requires=network.target remote-fs.target zookeeper.service
After=network.target remote-fs.target zookeeper.service

[Service]
Type=simple
User=kafka
ExecStart=/home/kafka/bin/kafka-server-start.sh /home/kafka/config/server.properties
ExecStop=/home/kafka/bin/kafka-server-stop.sh
Restart=on-abnormal

[Install]
WantedBy=multi-user.target

Edit the server.properties file and add/modify the following properties:

vi /home/kafka/config/server.properties
listeners=PLAINTEXT://:9092
log.dirs=/var/log/kafka

After we make changes to a unit file, we should always run the systemctl daemon-reload command:

systemctl daemon-reload

Create a new directory called kafka in the /var/log/ directory on your server:

mkdir -p /var/log/kafka
chown kafka:kafka -R /var/log/kafka

This can be useful for troubleshooting. Then, start the ZooKeeper and  Apache Kafka services:

systemctl start zookeeper.service
systemctl start kafka.service

Enable the Apache Kafka service to automatically start on server boot:

systemctl enable kafka.service

In order to check if ZooKeeper and Kafka services are up and running, run the following command on your VPS:

systemctl status zookeeper.service

We should then receive an output similar to this:

zookeeper.service
Loaded: loaded (/lib/systemd/system/zookeeper.service; enabled; vendor preset: enabled)
Active: active (running) since Wed 2018-12-19 06:23:33 EST; 25min ago
Main PID: 20157 (java)
Tasks: 21 (limit: 4915)
CGroup: /system.slice/zookeeper.service
└─20157 java -Xmx512M -Xms512M -server -XX:+UseG1GC -XX:MaxGCPauseMillis=20 -XX:InitiatingHeapOccupancyPercent=35 -XX:+ExplicitGCInvokesConcurrent -Djava.awt.headless=true -Xloggc:/home/kafka/bin/../l

Run this command next:

systemctl status kafka.service

The output of this command should be similar to this one:

kafka.service
Loaded: loaded (/etc/systemd/system/kafka.service; disabled; vendor preset: enabled)
Active: active (running) since Wed 2018-12-19 06:46:49 EST; 27s ago
Process: 22520 ExecStop=/home/kafka/bin/kafka-server-stop.sh (code=exited, status=0/SUCCESS)
Main PID: 22540 (java)
Tasks: 62 (limit: 4915)
CGroup: /system.slice/kafka.service
└─22540 java -Xmx1G -Xms1G -server -XX:+UseG1GC -XX:MaxGCPauseMillis=20 -XX:InitiatingHeapOccupancyPercent=35 -XX:+ExplicitGCInvokesConcurrent -Djava.awt.headless=true -Xloggc:/home/kafka/bin/../logs/

We can also use netstat command to check if Kafka and ZooKeeper services are listening on ports 9092 and 2181, respectively:

netstat -tunlp | grep -e \:9092 -e \:2181
tcp6       0      0 :::9092                 :::*                    LISTEN      22540/java
tcp6       0      0 :::2181                 :::*                    LISTEN      20157/java

If they are both running, and both ports are open and listening, then that is all. We have successfully installed Apache Kafka.


Of course, you don’t have to install and configure Apache Kafka on Debian 9 if you use one of our Managed Debian Support solutions, in which case you can simply ask our expert Linux admins to setup and configure Apache Kafka on Debian 9 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 Apache Kafka on a Debian 9 VPS, 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 Kafka on Debian 9 appeared first on LinuxHostSupport.

]]>
https://linuxhostsupport.com/blog/how-to-install-apache-kafka-on-debian-9/feed/ 0
How to Install Kanboard on Debian 9 https://linuxhostsupport.com/blog/how-to-install-kanboard-on-debian-9/ https://linuxhostsupport.com/blog/how-to-install-kanboard-on-debian-9/#respond Mon, 06 Jul 2020 16:42:18 +0000 https://linuxhostsupport.com/blog/?p=1190 In this tutorial, we will show you how to install Kanboard on a Debian 9 Server. Kanboard is a Project Management Software utilizing the Kanban methodology. Kanboard helps teams visualize their workflow by showing projects and tasks in an easy-to-understand format. This helps teams collaborate more efficiently and complete their projects on time and with […]

The post How to Install Kanboard on Debian 9 appeared first on LinuxHostSupport.

]]>
In this tutorial, we will show you how to install Kanboard on a Debian 9 Server.

Kanboard is a Project Management Software utilizing the Kanban methodology. Kanboard helps teams visualize their workflow by showing projects and tasks in an easy-to-understand format. This helps teams collaborate more efficiently and complete their projects on time and with as little conflict as possible. We can also use Kanboard to manage multiple projects simultaneously. We can easily move the project or task status by simply dragging and dropping the task into its respective column, each of which represents a stage in the project’s completion. Kanboard supports plugins as well as full integration with external services.

Prerequisites

  • A computer or server running Debian 9
  • SSH access with a root-privileged account, or access to the root user itself

Step 1 – Install Package Updates

Log in to your Debian 9 VPS

ssh root@IP_Address -p Port_number

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

# lsb_release -a

You should get this output:

Distributor ID: Debian
Description: Debian GNU/Linux 9.9 (Stretch)
Release: 9.9
Codename: stretch

Then, run the following command to make sure that all installed packages on the server are updated to the latest available version. This maximizes compatibility and gives you all of the latest features.

# apt update && apt upgrade

Step 2 – Install the Apache Web Server

Kanboard supports Apache, Nginx, Microsoft IIS, and Caddy Server web servers. If you choose Apache, make sure you have the mod_version module installed. Make sure that you do not have the mod_security module installed, because Kanboard is not compatible with mod_security. In this tutorial, we will install and use Apache as a web server.

Let’s install Apache by issuing this command:

# apt install apache2 -y

We would also want to enable it to run on server boot:

# systemctl enable apache2
# systemctl start apache2

2.1. Create an Apache VirtualHost

We can now create our virtual host files. The virtual host configuration files usually end with the .conf extension.
Run the following command to create the virtual host configuration file for our web domain, yourdomain.com:

Make sure you replace all instances of yourdomain.com with your registered domain name in order for the configuration file to work.

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

And add the following content to the file:

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

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

<Directory /var/www/html/kanboard/>
    AllowOverride FileInfo Options=All,MultiViews AuthConfig
</Directory>

</VirtualHost>

Once added and saved, we can enable the virtual host by running this command:

# a2ensite yourdomain.com
# systemctl restart apache2

Step 3 – Install a Database Server

Kanboard supports the following types of databases

  • SQLite
  • MySQL
  • PostgreSQL

In this tutorial, we will use MySQL/MariaDB as the database storage engine.

# apt install mariadb-server

To start the MariaDB service and enable it to start on boot, execute the following commands:

# systemctl start mariadb
# systemctl enable mariadb

Now, you can skip the following step if you prefer not to have a MySQL root password.

# mysql_secure_installation

When prompted, answer the questions below by following the guide.

Enter current password for root (enter for none): Just press the [Enter] key, there is no password set by default
Set root password? [Y/n]: Y
New password: Enter password
Re-enter new password: Repeat 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

If you followed the above step, then you will have a password set for your MySQL root user, so you can run this command to access the MySQL shell:

# mysql -u root -p

3.1 Create a Database

Let’s proceed with creating a database for Kanboard. Run these commands one by one to log into the MySQL shell, create a database, create a user and grant access to the new database, and save the changes:

# mysql -u root -p
MariaDB [(none)]> CREATE DATABASE kanboard;
MariaDB [(none)]> GRANT ALL PRIVILEGES ON kanboard.* TO 'kanboard'@'localhost' IDENTIFIED BY 'M0d1fyth15';
MariaDB [(none)]> FLUSH PRIVILEGES;
MariaDB [(none)]> \q

Make sure you replace the phrase M0d1fyth15 with a unique and strong password.

After that is done, run the following command to import the database schema to the newly created Kanboard database.

# mysql -u root -p kanboard < /var/www/html/kanboard/app/Schema/Sql/mysql.sql

Step 4 – Install PHP and all Necessary PHP Modules

Since version 1.2, Kanboard requires at least PHP 5.6, and a later or the latest version of PHP is recommended. We will use PHP 7.0 in this tutorial. This command will install PHP and all of the required packages for it to function with Kanboard:

# apt install php php-mbstring php-imap php-mysql libapache2-mod-php7.0 php-gd php-json php-xml php-opcache php-fpm

Now that PHP 7.2 is installed, let’s check and verify it.

# php -v

Here’s the output we expect to see:

PHP 7.0.33-0+deb9u3 (cli) (built: Mar  8 2019 10:01:24) ( NTS )
Copyright (c) 1997-2017 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2017 Zend Technologies
    with Zend OPcache v7.0.33-0+deb9u3, Copyright (c) 1999-2017, by Zend Technologies

Step 5 – Install Kanboard

In this step, we will download and install Kanboard from GitHub. First, let’s make sure that we have the git package installed:

# apt install git -y

From there, let’s switch into the Apache web server directory and clone the Kanboard GitHub project into it:

# cd /var/www/html/
# git clone https://github.com/kanboard/kanboard.git

After that, create a configuration file by copying the example that was included.

# cp kanboard/config.default.php kanboard/config.php

Let’s also make sure that all of the files in the directory are owned by the www-data user, which is the user that belongs to Apache:

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

Now, it is time to modify the database configuration file to match with the database credentials.

# nano /var/www/html/kanboard/config.php

Modify the values as follows (change the values as needed if you used values different from the ones in the tutorial):

// Database driver: sqlite, mysql or postgres (sqlite by default)
define('DB_DRIVER', 'mysql');

// Mysql/Postgres username
define('DB_USERNAME', 'kanboard');

// Mysql/Postgres password
define('DB_PASSWORD', 'M0d1fyth15');

// Mysql/Postgres hostname
define('DB_HOSTNAME', 'localhost');

// Mysql/Postgres database name
define('DB_NAME', 'kanboard');

At this point, Kanboard has been successfully installed – you can navigate to your http://yourdomain.com to start using it. You can use the following credentials to access the Kanboard backend.

Username: admin
Password: admin

You will want to update the default password as soon as possible.

Additionally, if you want your Kanboard installation to use pretty permalinks, you can enable it by enabling the feature in your config.php file

define('ENABLE_URL_REWRITE', true);

Make sure that your Apache mod rewrite is also enabled. You can do so by running this command:

# a2enmod rewrite
# systemctl restart apache2

That’s all there is to it – you should be able to access your Kanboard application at http://yourdomain.com now.


Of course, you don’t have to install Kanboard on Debian 9 if you use one of our Fully Managed VPS Support services, in which case you can simply ask our expert Linux admins to install Kanboard on your Debian 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 Kanboard on Debian 9, please share it with your friends on the social networks using the buttons below or simply leave a reply in the comments sections. Thanks.

The post How to Install Kanboard on Debian 9 appeared first on LinuxHostSupport.

]]>
https://linuxhostsupport.com/blog/how-to-install-kanboard-on-debian-9/feed/ 0
How to Add a User to Sudo Group on Debian 9 https://linuxhostsupport.com/blog/how-to-add-a-user-to-sudo-group-on-debian-9/ https://linuxhostsupport.com/blog/how-to-add-a-user-to-sudo-group-on-debian-9/#respond Wed, 20 May 2020 18:06:20 +0000 https://linuxhostsupport.com/blog/?p=1149 In this article, we will show you how to add a user to the sudo group in Debian 9. Every time you install a fresh new operating system, a user named root is being created automatically. This user is extremely powerful and even dangerous because it has a complete access to the server. Typically, the […]

The post How to Add a User to Sudo Group on Debian 9 appeared first on LinuxHostSupport.

]]>
In this article, we will show you how to add a user to the sudo group in Debian 9.

Every time you install a fresh new operating system, a user named root is being created automatically. This user is extremely powerful and even dangerous because it has a complete access to the server. Typically, the root user is only used for administrative tasks, as there are no restrictions present like they are for any other user.

Note that Linux does not have an “undo” command. In order to reduce the risk of irreversible damage to the system, we can create a user who will not have privileges to execute commands that can affect the server. However, having administrative access may still be appropriate for everyday tasks – sometimes we need the power to execute some command as an administrative user. This benefit can be utilized using the sudo command. However, to use the sudo command, the user is required to be present in the sudo group. Let’s get started with the tutorial. This should work in Debian 10 as well as other future versions of Debian, as these commands usually only have small variations over time.

Step 1. Connect to your server via SSH and Update your Server OS packages

NOTE: You will need access to the root account in order to add users to the sudo group.

The first thing we need to do is access the Debian server via SSH as the root user.

ssh root@server_ip_address -p port_number

Do not forget to replace the “server_ip_address” and “port_number” with your actual server IP address and port number.

It’s not a mandatory step for this tutorial, however it’s a good practice to update your server packages frequently. It maximizes security and can introduce new features to your server. Once you have logged in, you can update your Debian 9 packages to the latest version using:

# apt update && apt upgrade

Step 2. Adding a New User

In this step, we’ll be adding a new user. When we add new users to the system, these users are by default not privileged with any administrative access. This means that these users will be able to add or edit files only if they are owners of those files.

Since we are currently logged in as a root user, we can add the new user with the following command:

# adduser testuser

Do not forget to replace testuser with your desired username.

When we run this command it will request to enter information about the new user. Please make sure that the password for the new user is a strong password utilizing at least 10 characters including alphanumeric and grammatical symbols.

Never use passwords based upon dictionary words or significant dates.

Output:

Adding user `testuser' ...
Adding new group `testuser' (1001) ...
Adding new user `testuser' (1001) with group `testuser' ...
Creating home directory `/home/testuser' ...
Copying files from `/etc/skel' ...
Enter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully

After you set the user password, the home directory will be created for that user and will prompt you to set up information for this new user.

Changing the user information for testuser
Enter the new value, or press ENTER for the default
Full Name []:
Room Number []:
Work Phone []:
Home Phone []:
Other []:
Is the information correct? [Y/n]

Note that you are not required to enter information for the fields you don’t wish to populate. The only exception is the password.

When you enter the desired information just confirm the information by typing Y.

Step 3. Accessing the New User

After we created a new system user account, we can log in with our newly created user through SSH by typing:

$ ssh testuser@server_ip_address -p port_number

There is also a different way to quickly switch to a different user if we are already logged in to the server. This is possible by using the su command. The su command stands for substitute user, and it allows us to enter directly into a different user account without logging out of our currently logged in user. We can use it like this:

$ su - testuser

When executing this command, the password for the testuser will be requested. If we enter the correct password, we will change the current user to our new testuser. If we  want to go back to the previous session, we can do that using the exit command:

$ exit

Step 4. Add the User to the sudo Group

As we mentioned, our new user testuser is created without administrative privileges by default. For example, if we want to execute a command that requires these privileges, it will list the following output:

testuser is not in the sudoers file. This incident will be reported.

If we want our user to have access to these privileges, we need to add it to the sudo group. All users belonging to the sudo group are allowed to use the sudo command for any purpose.

Using the following command executed as root user, we can add our testuser to the sudo group:

# usermod -aG sudo testuser

Now, when we log in as our testuser, we can run commands that require root privileges using sudo.

$ sudo command_name

When we execute the command with sudo, we will be prompted for the password for our testuser (not the root password), and then the command will be executed with elevated access.

The first time we use the sudo command, it will indicate a message:

We trust you have received the usual lecture from the local System
Administrator. It usually boils down to these three things:

#1) Respect the privacy of others.
#2) Think before you type.
#3) With great power comes great responsibility.

[sudo] password for testuser:

We can test the sudo access with the whoami command:

$ sudo whoami

Because we just added our user testuser to sudo group, our output of the whoami command will be root:

Output:
root

Step 5. Remove the User from sudo Group and Delete a User

In our last step, we will also cover how to remove sudo privileges from the user and how to delete a user.

If we no longer need a user to have root privileges, we can remove it from the sudo group with this command:

# deluser testuser sudo

and we will receive the following output

Output:

Removing user `testuser' from group `sudo' ...
Done.

This will only take sudo access away from our user testuser, which will not delete the user itself. But if we no longer need that user, we can delete this user by using this syntax:

# deluser --remove-home testuser

The --remove-home option will delete the home directory that belongs to our user testuser.

Output:

Looking for files to backup/remove ...
Removing files ...
Removing user `testuser' ...
Warning: group `testuser' has no more members.
Done.

Conclusion

In this article, we show you how to add, access, grant sudo privileges, remove sudo privileges, and delete users on a Debian 9 server. These are basic tasks for managing users. By familiarizing yourself with these processes you will be able to configure your Debian 9 server faster and safer.


Of course, you don’t have to add a user to Sudo group on Debian 9, if you use one of our Debian Hosting services, in which case you can simply ask our expert Linux admins to add or remove a sudo user on Debian 9, for you. They are available 24×7 and will take care of your request immediately.

PS. If you liked this post on how to add a user to Sudo group on Debian 9, 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 Add a User to Sudo Group on Debian 9 appeared first on LinuxHostSupport.

]]>
https://linuxhostsupport.com/blog/how-to-add-a-user-to-sudo-group-on-debian-9/feed/ 0
How to Install Phabricator on Debian 9 https://linuxhostsupport.com/blog/how-to-install-phabricator-on-debian-9/ https://linuxhostsupport.com/blog/how-to-install-phabricator-on-debian-9/#comments Wed, 11 Jul 2018 08:49:12 +0000 https://linuxhostsupport.com/blog/?p=608 Phabricator is free and open source set of tools that ease the process of building software and allows developers and companies to build better software. It includes tools for differential code review, repository hosting and browsing, monitoring tool, bug tracker, wiki and much more. Phabricator originally was developed as an internal tool at Facebook, but […]

The post How to Install Phabricator on Debian 9 appeared first on LinuxHostSupport.

]]>
Phabricator is free and open source set of tools that ease the process of building software and allows developers and companies to build better software. It includes tools for differential code review, repository hosting and browsing, monitoring tool, bug tracker, wiki and much more. Phabricator originally was developed as an internal tool at Facebook, but now it is under active development by hundreds of unique developers. In this tutorial we will install Phabricator on a Debian 9 VPS with Apache, PHP and MySQL server.

Phabricator has some very useful features, such as:
– Pre-Commit Code Review
– Git, Mercurial, and SVN Support
– Customizable Task Management
– Workboards and Sprints
– Chat Channels
– Business Rules
– Command Line Tools
– Conduit API
and much more…

Prerequisites

Phabricator requires the following software to be installed in order to properly run:
– Debian 9 VPS with SSH root privileges
– Domain or subdomain. Phabricator cannot be installed in a subdirectory. We will use phabricator.yourdomain.com
– Web server – Apache, Nginx, LiteSpeed, …
– PHP version 5.2 or newer, with the mbstring, iconv, mysql (or mysqli), curl and pcntl PHP extensions
– MySQL server version 5.5 or newer

In this tutorial we will install all necessary prerequisites. We will use Debian 9 VPS running on our SSD 2 VPS hosting plan.

Step 1: Login via SSH and upgrade the system

As usual, login to your Debian 9 VPS via SSH as user root

ssh root@IP_Address -p Port_Number

and make sure that all installed packages are updated to the latest available version

apt update && apt upgrade

Step 2: Install Apache web server and PHP

As mentioned in the Prerequisites section, we have to install a web server in order to run Phabricator. In this tutorial we will install Apache web server.

apt install apache2

Once installed, enable Apache to start upon server restart

systemctl enable apache2

Next, we will install PHP and all PHP extensions required by Phabricator

apt install php php-common php-mbstring php-mysql php-curl

Step 3: Install MySQL server

Database server is also requires, so run the following command to install MySQL database server

apt install mysql-server

Once the database server is installed, run the mysql_secure_installation post-installation script to secure the server and set your MySQL root password.

Step 4: Create Apache Virtual host

In order to access Phabricator with a domain or subdomain, we have to create a new Apache virtual host. In this tutorial we will use phabricator.yourdomain.com to access Phabricator. Create a new file with the following content

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

ServerName phabricator.yourdomain.com
ServerAdmin webmaster@yourdomain.com

DocumentRoot /var/www/html/phabricator/webroot

RewriteEngine on
RewriteRule ^/rsrc/(.*) - [L,QSA]
RewriteRule ^/favicon.ico - [L,QSA]
RewriteRule ^(.*)$ /index.php?__path__=$1 [B,L,QSA]

ErrorLog ${APACHE_LOG_DIR}/pphabricator.yourdomain.com-error.log
CustomLog ${APACHE_LOG_DIR}/phabricator.yourdomain.com-access.log combined

<Directory "/var/www/html/phabricator/webroot">
Require all granted

Save the file, and enable the virtual host configuration

a2ensite phabricator.yourdomain.com
Enabling site phabricator.yourdomain.com.
To activate the new configuration, you need to run:
  systemctl reload apache2

and restart the web server for the changes to take effect

systemctl restart apache2

Step 5: Download and configure Phabricator

We will clone Phabricator and its dependencies from their official git repositories, so make sure that git is isntalled on your server:

apt install git
Now, run the following command to clone the repositories:
cd /var/www/html
git clone https://github.com/phacility/libphutil.git
git clone https://github.com/phacility/arcanist.git
git clone https://github.com/phacility/phabricator.git

Next, change the current working directory to Phabricator’s directory

cd /var/www/html/phabricator

and run the following commands to configure MySQL configuration file for Phabricator

./bin/config set mysql.host localhost
./bin/config set mysql.user root
./bin/config set mysql.pass MySQL_root_password

and load the Phabricator schemata by executing the following command

./bin/storage upgrade

Are you ready to continue? [y/N] y

Applying schema adjustments...
Done.
Completed applying all schema adjustments.
 ANALYZE  Analyzing tables...
Done.
 ANALYZED  Analyzed 510 table(s).

Note that, you have to run this script every time you update Phabricator in order to apply the new updates.

Finally, open your favorite web browser and navigate to http://phabricator.yourdomain.com and follow the on-screen insctructions to complete the installation and create your initial administrator account. For more information on how to configure and use Phabricator, please check their official documentation.


Install Phabricator on Debian 9 Of course you don’t have to Install Phabricator on a Debian 9 VPS, if you use one of our Linux Server Management services, in which case you can simply ask our expert Linux admins to install Phabricator 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 Phabricator on Ubuntu 16.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 Phabricator on Debian 9 appeared first on LinuxHostSupport.

]]>
https://linuxhostsupport.com/blog/how-to-install-phabricator-on-debian-9/feed/ 1
How To Set Up Apache with HTTP/2 Support on Debian 9 https://linuxhostsupport.com/blog/how-to-set-up-apache-with-http-2-support-on-debian-9/ https://linuxhostsupport.com/blog/how-to-set-up-apache-with-http-2-support-on-debian-9/#comments Wed, 04 Jul 2018 08:30:32 +0000 https://linuxhostsupport.com/blog/?p=604 We will show you how to set up Apache with HTTP/2 support on Debian 9. HTTP/2 is a major revision of the HTTP network protocol. It is derived from the experimental SPDY protocol developed by Google. The primary goal of HTTP/2 is to reduce the latency, minimize the protocol overhead and add support for request […]

The post How To Set Up Apache with HTTP/2 Support on Debian 9 appeared first on LinuxHostSupport.

]]>
We will show you how to set up Apache with HTTP/2 support on Debian 9. HTTP/2 is a major revision of the HTTP network protocol. It is derived from the experimental SPDY protocol developed by Google. The primary goal of HTTP/2 is to reduce the latency, minimize the protocol overhead and add support for request prioritization. This makes the web applications to load much faster.High level syntax like status codes, methods, headers fields, URIs etc. are the same as the earlier version of HTTP except there is a difference on how the data is framed and transported between the client and the server.

The Apache web server version that is available in the Debian 9 repositories has HTTP/2 support out of the box. Basically, when you install Apache web server on your Debian 9 VPS, you have the HTTP/2 module available to use. There is no need to install Apache from source like before when the earlier versions of HTTP/2 were not ready for production.

Enable HTTP/2 module in Apache

The HTTP/2 protocol is implemented by its own Apache module named mod_http2. To be able to use HTTP/2 in Apache you need to make sure the module is enabled. Connect to your server via SSH and run the following command to enable the HTTP/2 module in Apache:

a2enmod http2

You will see the following output:

# a2enmod http2
Enabling module http2.
To activate the new configuration, you need to run:
  systemctl restart apache2

The output tells you that the module is enabled in Apache and that you need to restart the Apache service for the changes to take effect. To restart the Apache service, run the following command:

systemctl restart apache2

To make sure the module is enabled and ready to use make check the following file:

cat /etc/apache2/mods-enabled/http2.load

and make sure the following line is there:

LoadModule http2_module /usr/lib/apache2/modules/mod_http2.so

Or, simply use the following command and it will show you whether the module is enabled or not:

apache2ctl -M | grep http2

If it is enabled, the output will be similar to the following:

# apache2ctl -M | grep http2
 http2_module (shared)

Enable HTTP/2 in your Apache virtual host

Most browsers will speak HTTP/2 only via HTTPS which means your web server must have support for HTTPS and you need to have a valid SSL certificate installed. Otherwise, HTTP/2 will not work. To enable global support for HTTP/2 in Apache edit the default SSL virtual host configuration file using a text editor of your choice. We are using nano in our example:

nano /etc/apache2/sites-enabled/default-ssl.conf

and add the following line after the opening <VirtualHost *:443> tag:

Protocols h2 h2c http/1.1

If you want to enable HTTP/2 for specific domain/website, add that line in the virtual host for that specific website. The virtual host for your domain should look like the following one:

<VirtualHost *:443>
    Protocols h2 h2c http/1.1
    ServerAdmin info@example.com
    ServerName www.example.com
    ServerAlias example.com
    DocumentRoot /var/www/html/example.com

    SSLEngine On
    SSLCertificateFile /etc/ssl/certs/example.com.crt
    SSLCertificateKeyFile /etc/ssl/private/example.com.key
    SSLCACertificateFile /etc/ssl/certs/ca-certificates.crt

    <Directory /var/www/html/example.com/>
      Options Indexes FollowSymLinks MultiViews
      AllowOverride All
      Order allow,deny
      allow from all
     </Directory>

    ErrorLog /var/www/html/example.com/log/error.log
    CustomLog /var/www/html/example.com/log/access.log combined
</VirtualHost>

Once you add the line related to protocols in your Apache virtual host file, you have to restart Apache again for the changes to take effect.

Please note, the order of protocols is relevant so the first one is the most preferred protocol when the client offers multiple choices. Here, h2 means HTTP/2 will be used over TLS (protocol negotiation via ALPN), while h2c means HTTP/s will be used over TCP. http/1.1 means that if the client doesn’t accept HTTP/2 then the request will be served over HTTP/1.1.

Verify that HTTP/2 support is enabled in Apache

To check whether HTTP/2 is successfully enabled in Apache you can use RoseHosting’s online HTTP/2 checker tool or any other similar tool available online.


Of course, you don’t have to set up Apache with HTTP/2 support on Debian 9, if you use one of our Linux Server Management Services, in which case you can simply ask our expert Linux admins to set up Apache with HTTP/2 support on Debian 9 for you. They are available 24×7 and will take care of your request immediately.

PS. If you liked this post on how to set up Apache with HTTP/2 support on Debian 9, 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 Set Up Apache with HTTP/2 Support on Debian 9 appeared first on LinuxHostSupport.

]]>
https://linuxhostsupport.com/blog/how-to-set-up-apache-with-http-2-support-on-debian-9/feed/ 3
How to install Buildbot on Debian 9 https://linuxhostsupport.com/blog/how-to-install-buildbot-on-debian-9/ https://linuxhostsupport.com/blog/how-to-install-buildbot-on-debian-9/#comments Wed, 23 May 2018 07:06:43 +0000 https://linuxhostsupport.com/blog/?p=562 Buildbot is a continuous integration framework written in Python which automates the test, build and release software cycles. It is built using the Twisted networking engine, supports parallel execution of jobs across multiple platforms and runs on all major operating systems. The Buildbot installation can have one or more masters and multiple workers. In this […]

The post How to install Buildbot on Debian 9 appeared first on LinuxHostSupport.

]]>
Buildbot is a continuous integration framework written in Python which automates the test, build and release software cycles. It is built using the Twisted networking engine, supports parallel execution of jobs across multiple platforms and runs on all major operating systems. The Buildbot installation can have one or more masters and multiple workers. In this tutorial, we will show you how to install Buildbot master and worker on Debian 9.

1. Update the System

Before continuing with the tutorial, make sure the package index is updated and all system packages are up to date:

sudo apt-get update
sudo apt-get upgrade

2. Installing Buildbot

Installing Buildbot with pip is pretty simple process. If you don’t have pip installed on your Debian server you can install pip and python development packages with the following command:

sudo apt-get install python-pip python-dev

To upgrade the pip to the latest version, execute the following command:

sudo pip install --upgrade pip

The output should look something like bellow:

Collecting pip
  Downloading https://files.pythonhosted.org/packages/0f/74/ecd13431bcc456ed390b44c8a6e917c1820365cbebcb6a8974d1cd045ab4/pip-10.0.1-py2.py3-none-any.whl (1.3MB)
    100% |################################| 1.3MB 82kB/s
Installing collected packages: pip
  Found existing installation: pip 9.0.1
    Not uninstalling pip at /usr/lib/python2.7/dist-packages, outside environment /usr
Successfully installed pip-10.0.1

Once pip is installed and updated to the latest version you can proceed with the Buildbot installation. Buildbot can be installed as any other pip package. Execute the following command to install Buildbot with pip:

sudo pip install 'buildbot[bundle]'

If the installation is successful the output should look something like bellow:

Successfully built future Twisted sqlalchemy zope.interface MarkupSafe Tempita
Installing collected packages: txaio, autobahn, future, PyJWT, attrs, Automat, constantly, idna, hyperlink, incremental, zope.interface, Twisted, sqlalchemy, python-dateutil, MarkupSafe, Jinja2, pbr, sqlparse, decorator, Tempita, sqlalchemy-migrate, buildbot-console-view, buildbot-grid-view, buildbot-waterfall-view, buildbot-www, buildbot-worker, buildbot
  Found existing installation: idna 2.2
    Uninstalling idna-2.2:
      Successfully uninstalled idna-2.2
Successfully installed Automat-0.6.0 Jinja2-2.10 MarkupSafe-1.0 PyJWT-1.6.1 Tempita-0.5.2 Twisted-18.4.0 attrs-18.1.0 autobahn-18.5.1 buildbot-1.1.2 buildbot-console-view-1.1.2 buildbot-grid-view-1.1.2 buildbot-waterfall-view-1.1.2 buildbot-worker-1.1.2 buildbot-www-1.1.2 constantly-15.1.0 decorator-4.3.0 future-0.16.0 hyperlink-18.0.0 idna-2.6 incremental-17.5.0 pbr-4.0.3 python-dateutil-2.7.3 sqlalchemy-1.2.7 sqlalchemy-migrate-0.11.0 sqlparse-0.2.4 txaio-2.10.0 zope.interface-4.5.0

4. Verify the Buildbot installation

To verify if Buildbot has been correctly installed issue the following command which will print the Buildbot version:

sudo buildbot --version
Buildbot version: 1.1.2
Twisted version: 18.4.0

5. Create a new system user for Buildbot

To create a new system user and group which will run our Buildbot services, type the following command:

sudo adduser --home /opt/buildbot --shell /bin/bash  buildbot

6. Configuring the Buildbot Master

Now that we have Buildbot installed we can continue and create and configure our first Buildbot master.

Before executing the next commands make sure you switch to the new buildbot user by typing:

sudo su - buildbot

To create the Buildbot master type the following command:

buildbot create-master master

The output should look something like this:
The output should look something like this:

mkdir /opt/buildbot/master
creating /opt/buildbot/master/master.cfg.sample
creating database (sqlite:///state.sqlite)
buildmaster configured in /opt/buildbot/master

Copy the default sample Buildbot configuration file by using the following command:

cp master/master.cfg.sample master/master.cfg

To be able to access the Buildbot’s web interface on your server IP address or domain you will need to edit the Buildbot configuration file and change the BuildbotURL setting. Open the configuration file:

nano master/master.cfg
c['buildbotURL'] = "http://your_ip_or_domain:8010/"

Do not forget to replace your_ip_or_domain with your server IP address or your actual domain.

Run the following command to verify the master configuration:

buildbot checkconfig master

If everything is OK you should see the following output:

Config file is good!

To start the Buildbot master run the following command:

buildbot start master

If the server starts successfully you should see the following output:

Following twistd.log until startup finished..
The buildmaster appears to have (re)started correctly.

Once the Buildbot master is started you can access the web interface at:

http://your_ip_or_domain:8010/

7. Configuring a Buildbot Worker

We will install and configure our first Buildbot worker on the same server as the master.

To create the Buildbot worker named ‘example-worker’ with password ‘pass’ on ‘localhost’, execute the following command:

buildbot-worker create-worker worker localhost example-worker pass

The output should look something like this:

mkdir /opt/buildbot/worker
mkdir /opt/buildbot/worker/info
Creating info/admin, you need to edit it appropriately.
Creating info/host, you need to edit it appropriately.
Not creating info/access_uri - add it if you wish
Please edit the files in /opt/buildbot/worker/info appropriately.
worker configured in /opt/buildbot/worker

If you want to use a different username (example-worker), and password (pass) you need to update the following line in the master/master.cfg file:

# a Worker object, specifying a unique worker name and password.  The same
# worker name and password must be configured on the worker.
c['workers'] = [worker.Worker("example-worker", "pass")]

Finally to start the worker type:

buildbot-worker start worker

If there are no errors you should see the following output:

Following twistd.log until startup finished..
The buildbot-worker appears to have (re)started correctly.

8. Finalize the Buildbot installation via web browser

You can now navigate to http://yor_ip_or_domain:8010/ and start configuring your Buildbot installation.

Of course you don’t have to install Buildbot on Debian 9, if you use one of our Linux Server Support Services, in which case you can simply ask our expert Linux admins to install Buildbot 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 Buildbot on Debian 9, 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 Buildbot on Debian 9 appeared first on LinuxHostSupport.

]]>
https://linuxhostsupport.com/blog/how-to-install-buildbot-on-debian-9/feed/ 1
How To Change Your Hostname on Debian https://linuxhostsupport.com/blog/how-to-change-your-hostname-on-debian/ https://linuxhostsupport.com/blog/how-to-change-your-hostname-on-debian/#respond Wed, 21 Feb 2018 08:29:09 +0000 https://linuxhostsupport.com/blog/?p=448 In this tutorial, we will show you how to change your hostname on a Debian operating system. Changing the hostname of your Debian server is a very easy task and if you carefully follow the instructions provided in this tutorial it will take you no longer than 5 minutes to do it. What is a […]

The post How To Change Your Hostname on Debian appeared first on LinuxHostSupport.

]]>
In this tutorial, we will show you how to change your hostname on a Debian operating system. Changing the hostname of your Debian server is a very easy task and if you carefully follow the instructions provided in this tutorial it will take you no longer than 5 minutes to do it.

What is a hostname?

The hostname is a label that is assigned during the initial server setup and it is used to identify and easily distinguish one server from another. When choosing your hostname you should also make sure to use a Fully Qualified Domain Name (FQDN) and it should be pointed to your server IP address so you can access your server by using it.

Connect to your server

Before you change your hostname, you will first need to connect to your Debian server via SSH.

Once you have successfully connected to your server, you can use the following command to check your current hostname:

hostname

And to check your Fully Qualified Domain name (FQDN) you can run the following command instead:

hostname -f

Change your hostname

To change your hostname, we can simply run the following command:

hostname new.hostname.com

Make sure you replace “new.hostname.com” with the hostname you would like to use. This will change your hostname but only until next server reboot.

On Debian based systems, the hostname of the system is stored in the /etc/hostname file. Upon server boot, the hostname contained in this file is assigned to the system by the init script located at /etc/init.d/hostname.sh.

So in order to change our hostname permanently, you will need to update this file. You can open it with your favorite text editor, for example:

nano /etc/hostname

Change the hostname, save the file and exit the text editor.

You can now execute the init script in order to make the change active immediately:

/etc/init.d/hostname.sh start

This will also permanently update our hostname even after a server reboot.

Change hostname with hostnamectl command

Another alternative way to change your hostname is to use the hostnamectl command. You can run the following command in order to permanently update the hostname of your system:

hostnamectl set-hostname new.hostname.com

You can also check the current hostname status with:

hostnamectl status

You should get an output similar to this:

Static hostname: new.hostname.com
Icon name: computer-container
Chassis: container
Machine ID: ****
Boot ID: ***
Operating System: Debian GNU/Linux 9 (stretch)
Kernel: Linux 2.6.32-042stab127.2
Architecture: x86-64

For more information about the hostnamectl command use the –help flag:

hostnamectl --help

hostnamectl [OPTIONS...] COMMAND ...

Query or change system hostname.

 -h --help Show this help
    --version Show package version
    --no-ask-password Do not prompt for password
 -H --host=[USER@]HOST Operate on remote host
 -M --machine=CONTAINER Operate on local container
    --transient Only set transient hostname
    --static Only set static hostname
    --pretty Only set pretty hostname

Commands:
 status Show current hostname settings
 set-hostname NAME Set system hostname
 set-icon-name NAME Set icon name for host
 set-chassis NAME Set chassis type for host
 set-deployment NAME Set deployment environment for host
 set-location NAME Set location for host

 

If you use one of our Linux Support Services, you don’t have to change your hostname yourself, you can simply ask our expert Linux admins to change the hostname on your Debian 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 Change Your Hostname on Debian, 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 Change Your Hostname on Debian appeared first on LinuxHostSupport.

]]>
https://linuxhostsupport.com/blog/how-to-change-your-hostname-on-debian/feed/ 0
How to Install and Configure Observium on Debian 9 https://linuxhostsupport.com/blog/how-to-install-and-configure-observium-on-debian-9/ https://linuxhostsupport.com/blog/how-to-install-and-configure-observium-on-debian-9/#comments Wed, 07 Feb 2018 08:31:55 +0000 https://linuxhostsupport.com/blog/?p=434 We’ll show you how to install Observium on a Debian 9 server. Observium is a network monitoring software written in PHP. It is a cross-platform application and supports all popular operating systems, but this tutorial was written for Debian 9 OS. At the time of writing this tutorial, the latest stable version of Observium is 17.9, and […]

The post How to Install and Configure Observium on Debian 9 appeared first on LinuxHostSupport.

]]>
We’ll show you how to install Observium on a Debian 9 server. Observium is a network monitoring software written in PHP. It is a cross-platform application and supports all popular operating systems, but this tutorial was written for Debian 9 OS. At the time of writing this tutorial, the latest stable version of Observium is 17.9, and it requires:

  • PHP 5.6 or higher (preferably PHP 7.0), with mbstring, pear, mcrypt, JSON, mysqli and GD PHP extensions enabled. PHP 7.1 is not supported on the current community edition release.
  • MySQL 5, MariaDB 5 or later
  • Apache web server 2.2 or higher compiled with mod_rewrite module and AllowOverride set to ‘All’ (please note, the default setting for AllowOverride in Apache 2.3.9 and higher is ‘None’).

This install guide assumes that Apache and MySQL/MariaDB are already installed and configured on your virtual server.

Let’s start with the installation procedure.

1. Update the System Packages

Make sure your server Debian 9 OS packages are fully up-to-date:

apt-get update 
apt-get upgrade

2. Install the Required Packages

Install the required packages for Observium:

apt-get install php7.0-cli php7.0-mysql php7.0-mysqli php7.0-gd php7.0-mcrypt php7.0-json php-pear imagemagick snmp fping python-mysqldb subversion whois mtr-tiny ipmitool graphviz rrdtool

3. Enable Apache Rewrite Module

Enable Apache rewrite module if it is not already done so:

a2enmod rewrite

4. Restart Apache

Restart the Apache service for the changes to take effect:

service apache2 restart

5. Install Observium on Debian 9

Download the latest community version of Observium available at http://www.observium.org in the /opt/ directory on the server:

cd /opt/
wget http://www.observium.org/observium-community-latest.tar.gz
tar zxvf observium-community-latest.tar.gz
mv observium /var/www/html/observium
mkdir -p /var/www/html/observium/rrd
        

6. Set Proper Ownership of Observium Files

All files have to be readable by the web server, so set a proper ownership:

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

7. Create Database and User

Create a new MySQL database and user:

mysql -u root -p
mysql> SET GLOBAL sql_mode='';
mysql> CREATE DATABASE observiumdb;
mysql> CREATE USER 'observiumuser'@'localhost' IDENTIFIED BY 'y0uR-pa5sW0rd';
mysql> GRANT ALL PRIVILEGES ON observiumdb.* TO 'observiumuser'@'localhost';
mysql> FLUSH PRIVILEGES;
mysql> quit

Do not forget to replace ‘y0uR-pa5sW0rd’ with a strong password.

8. Create a New Virtual Host

Create a new virtual host directive in Apache. For example, create a new Apache configuration file named ‘observium.conf’ on your virtual server:

touch /etc/apache2/sites-available/observium.conf
ln -s /etc/apache2/sites-available/observium.conf /etc/apache2/sites-enabled/observium.conf
vi /etc/apache2/sites-available/observium.conf

Then, add the following lines:

<VirtualHost *:80>
ServerAdmin admin@your-domain.com
DocumentRoot /var/www/html/observium/html
ServerName your-domain.com
ServerAlias www.your-domain.com
 <FilesMatch \.php$>
 SetHandler application/x-httpd-php
 </FilesMatch>
 <Directory />
 Options FollowSymLinks
 AllowOverride None
 </Directory>
<Directory /var/www/html/observium/html>
DirectoryIndex index.php
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Require all granted
</Directory>
ErrorLog /var/log/apache2/your-domain.com-error_log
CustomLog /var/log/apache2/your-domain.com-access_log common
</VirtualHost>

Remove the 000-default.conf file:

rm /etc/apache2/sites-enabled/000-default.conf

9. Restart Apache Web Server

Restart the Apache web server for the changes to take effect:

service apache2 restart

10. Create a config.php File

vi /var/www/html/observium/config.php

Add the following lines:

<?php

$config[‘db_extension’] = ‘mysqli’;
$config[‘db_host’] = ‘localhost’;
$config[‘db_user’] = ‘observiumuser’;
$config[‘db_pass’] = ‘y0uR-pa5sW0rd’;
$config[‘db_name’] = ‘observiumdb’;

$config[‘snmp’][‘community’] = array(“public”);
$config[‘auth_mechanism’] = “mysql”;

Then, run the following commands to insert the default schema:

cd /var/www/html/observium/
php ./discovery.php -u

11. Create a user account

Create a user account, use level of 10 for admin .e.g.:

./adduser.php admin <password> 10

12. Continue Observium Installation in a Web Browser

Open http://your-domain.com in your favorite web browser and log in using the newly created admin account:

Install Observium on Debian 9

Install and Configure Observium on Debian 9

That is it. Observium has been installed on your server.


Of course you don’t have to install Observium on Debian,  if you use one of our Outsourced Hosting Support services, in which case you can simply ask our expert Linux admins to install Observium on a Debian 9 server, for you. They are available 24×7 and will take care of your request immediately.

PS. If you enjoy reading this post on how to Install Observium on a Debian 9 server , feel free to share it on social networks using the shortcuts below, or simply leave a comment.

The post How to Install and Configure Observium on Debian 9 appeared first on LinuxHostSupport.

]]>
https://linuxhostsupport.com/blog/how-to-install-and-configure-observium-on-debian-9/feed/ 3
How to Install Cacti SNMP Monitoring Tool on Debian 9 https://linuxhostsupport.com/blog/how-to-install-cacti-snmp-monitoring-tool-on-debian-9/ https://linuxhostsupport.com/blog/how-to-install-cacti-snmp-monitoring-tool-on-debian-9/#comments Wed, 27 Dec 2017 08:33:15 +0000 https://linuxhostsupport.com/blog/?p=308 In today’s tutorial, we will show you how to install and Cacti on a Debian 9 server. Cacti is an open-source, web-based network graphing solution written in PHP and build on top of the industry-standard data logging tool RRDtool. Cacti stores all of the necessary information in a MySQL database and allows a user to poll […]

The post How to Install Cacti SNMP Monitoring Tool on Debian 9 appeared first on LinuxHostSupport.

]]>
In today’s tutorial, we will show you how to install and Cacti on a Debian 9 server. Cacti is an open-source, web-based network graphing solution written in PHP and build on top of the industry-standard data logging tool RRDtool. Cacti stores all of the necessary information in a MySQL database and allows a user to poll services at predetermined intervals and graph the resulting data using RRDtool. This guide should work on other Linux VPS systems as well, but was tested and written for a Debian 9 VPS.

1. Login to your VPS via SSH

ssh user@vps_IP

2. Update the system

sudo apt update && sudo apt -y upgrade

3. Install MariaDB Server

We will the install MariaDB 10.1 server from the official Debian repositories, you can skip this step if MariaDB/MySQL server is already installed on your machine.
To install the MariaDB server , run the following commands:

sudo apt install mariadb-server mariadb-client

4. Secure MariaDB Installation

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

mysql_secure_installation

5. Enable large Varchar Indexes

Edit your MariaDB/MySQL configuration and enable large varchar indexes:

sudo nano /etc/mysql/mariadb.conf.d/50-server.cnf
[mysqld]
innodb_file_format = Barracuda
innodb_file_per_table = 1
innodb_large_prefix

character-set-server = utf8mb4
collation-server = utf8mb4_unicode_ci
skip-character-set-client-handshake

6. Restart MariaDB

Restart the mariadb service for changes to take effect:

sudo systemctl restart mariadb

7. Install Apache2, PHP and required PHP modules

Chances are that you already have Apache and PHP installed on your machine, if not execute the following command:

sudo apt install apache2 php php-mysql php-snmp

8. Install Cacti

Once Apache, PHP, and MariaDB are installed, we can proceed with the Cacti installation. The easiest way to install Cacti on Debian 9 is to use the Cacti deb package from the Debian’s apt repository.

The following command will install Cacti and all the necessary requirements including the rrdtool tool:

sudo apt install cacti snmpd

The installation will now prompt you to answer a series of questions.

Configure database for cacti with dbconfig-common?

Select Yes and click [enter]

 Please provide a password for cacti to register with the database server. If left blank, a random password will be generated.
 MySQL application password for cacti:

Leave it empty and click [enter]

 Please select the web server for which Cacti should be automatically configured
Select "None" if you would like to configure the web server manually.

Select Apache2 and click [enter]

9. Set Admin Password

Once the installation is completed, set the admin password using the following command:

mysql -u root -p -D cacti -e "update user_auth set password=md5('your_new_admin_password') where username='admin';"

That’s it. You have successfully installed Cacti on your Debian 9 VPS.  Now you can login to the Cacti web interface at http://YOUR_IP/cacti using username admin and password your_new_admin_password.

For more information about how to configure and manage your Cacti installation, please refer to the official Cacti documentation.


Of course, you don’t have to install Cacti SNMP Monitoring Tool on Debian 9, if you use one of our outsourced server support services, in which case you can simply ask our expert Linux admins to install Cacti SNMP Monitoring Tool on Debian 9r. They are available 24×7 and will take care of your request immediately.

PS. If you liked this post on how to install Cacti SNMP Monitoring Tool on Debian 9,  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 Cacti SNMP Monitoring Tool on Debian 9 appeared first on LinuxHostSupport.

]]>
https://linuxhostsupport.com/blog/how-to-install-cacti-snmp-monitoring-tool-on-debian-9/feed/ 2
How to Install WordPress with PHP 7.1 and Nginx on Debian 9 https://linuxhostsupport.com/blog/how-to-install-wordpress-with-php-7-1-and-nginx-on-a-debian-9-vps/ https://linuxhostsupport.com/blog/how-to-install-wordpress-with-php-7-1-and-nginx-on-a-debian-9-vps/#comments Wed, 26 Jul 2017 12:28:04 +0000 https://linuxhostsupport.com/blog/?p=153 In this guide, we will walk you through the basic installation process of WordPress on a Debian 9 VPS with Nginx, MariaDB and PHP 7.1. WordPress is the most popular CMS in the world with unlimited customization options. This should work on other Linux VPS systems as well but was tested and written for Debian […]

The post How to Install WordPress with PHP 7.1 and Nginx on Debian 9 appeared first on LinuxHostSupport.

]]>
In this guide, we will walk you through the basic installation process of WordPress on a Debian 9 VPS with Nginx, MariaDB and PHP 7.1. WordPress is the most popular CMS in the world with unlimited customization options. This should work on other Linux VPS systems as well but was tested and written for Debian 9.

1. Update the system and install necessary packages.

apt -y update && sudo apt -y upgrade
sudo apt install apt-transport-https lsb-release ca-certificates wget

2. Install MariaDB 10.1

sudo apt-get install mariadb-server

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

mysql_secure_installation

Next, we need to create a database for our WordPress instance.

mysql -uroot -p
MariaDB [(none)]> CREATE DATABASE wpdb;
MariaDB [(none)]> GRANT ALL PRIVILEGES ON wpdb.* TO 'wpuser'@'localhost' IDENTIFIED BY 'wpuser_passwd';
MariaDB [(none)]> FLUSH PRIVILEGES;
MariaDB [(none)]> \q

3. Install and configure PHP 7.1

PHP 7.1 is not available via the default Debian repositories, so we will add the “packages.sury.org/php” repository, update the system and install the PHP 7.1 packages.

sudo wget -O /etc/apt/trusted.gpg.d/php.gpg https://packages.sury.org/php/apt.gpg
sudo sh -c 'echo "deb https://packages.sury.org/php/ $(lsb_release -sc) main" > /etc/apt/sources.list.d/php.list'
sudo apt update

To install the latest version of PHP 7.1 and all necessary modules, run:

sudo apt install php7.1-common  php7.1-readline php7.1-fpm php7.1-cli php7.1-gd php7.1-mysql php7.1-mcrypt php7.1-curl php7.1-mbstring php7.1-opcache php7.1-json 

Change few default PHP settings:

sudo sed -i "s/memory_limit = .*/memory_limit = 256M/" /etc/php/7.1/fpm/php.ini
sudo sed -i "s/upload_max_filesize = .*/upload_max_filesize = 128M/" /etc/php/7.1/fpm/php.ini
sudo sed -i "s/zlib.output_compression = .*/zlib.output_compression = on/" /etc/php/7.1/fpm/php.ini
sudo sed -i "s/max_execution_time = .*/max_execution_time = 18000/" /etc/php/7.1/fpm/php.ini

PHP-FPM process manager has three choices: Static, Dynamic and Ondemand. The default setting for the process manager is “dynamic”, we will change it to “ondemand”.
Rename the default FPM  pool configuration file and create a new one:

sudo mv /etc/php/7.1/fpm/pool.d/www.conf /etc/php/7.1/fpm/pool.d/www.conf.org
sudo nano /etc/php/7.1/fpm/pool.d/www.conf
[www]
user = www-data
group = www-data
listen = /run/php/php7.1-fpm.sock
listen.owner = www-data
listen.group = www-data
listen.mode = 0666
pm = ondemand
pm.max_children = 5
pm.process_idle_timeout = 10s
pm.max_requests = 200
chdir = /

Restart PHP-FPM:

sudo systemctl restart php7.1-fpm 

4. Install and configure Nginx

Install Nginx from the official Debian repositories:

sudo apt -y install nginx

Create a new Nginx server block with the following content:

nano /etc/nginx/sites-available/example.com
server {
  server_name example.com;
  listen 80;
  root /var/www/html/example.com;
  access_log /var/log/nginx/access.log;
  error_log /var/log/nginx/error.log;
  index index.php;

  location / {
    try_files $uri $uri/ /index.php?q=$uri&$args;
  }

  location ~* \.(jpg|jpeg|gif|css|png|js|ico|html)$ {
    access_log off;
    expires max;
  }

  location ~ /\.ht {
    deny  all;
  }

  location ~ \.php$ {
    fastcgi_index index.php;
    fastcgi_keep_conn on;
    include /etc/nginx/fastcgi_params;
    fastcgi_pass unix:/run/php/php7.1-fpm.sock;
    fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
  }
}

Activate the server block by creating a symlink:

sudo ln -s /etc/nginx/sites-available/example.com /etc/nginx/sites-enabled/example.com

Test the Nginx configuration and restart the server by running the following commands:

sudo nginx -t
sudo systemctl restart nginx

5. Install WordPress

Create a new directory for your WordPress site:

sudo mkdir -p /var/www/html/example.com

Download and extract the WordPress package:

wget -q -O - http://wordpress.org/latest.tar.gz | sudo tar -xzf - --strip 1 -C /var/www/html/example.com

Set the correct permissions:

sudo chown www-data: -R /var/www/html/example.com

Finally, run the WordPress installation script by accessing the URL in your web browser of choice. http://example.com/, enter the details for the database we created earlier in this post and create your WordPress admin user.


Of course, you don’t have to Install WordPress with PHP 7.1 and Nginx on Debian 9 if you use one of our WordPress Maintenance Services, in which case you can simply ask our expert Linux admins to Install WordPress with PHP 7.1 and Nginx on Debian 9 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 WordPress with PHP 7.1 and Nginx on Debian 9, 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 WordPress with PHP 7.1 and Nginx on Debian 9 appeared first on LinuxHostSupport.

]]>
https://linuxhostsupport.com/blog/how-to-install-wordpress-with-php-7-1-and-nginx-on-a-debian-9-vps/feed/ 3
How to Install Sentora on Debian 8 https://linuxhostsupport.com/blog/how-to-install-sentora-on-debian-8/ https://linuxhostsupport.com/blog/how-to-install-sentora-on-debian-8/#respond Wed, 17 May 2017 12:18:22 +0000 https://linuxhostsupport.com/blog/?p=82 In this tutorial, we will show you how to install Sentora on a Debian 8 VPS. Sentora is a web-based hosting control panel which is very easy to install and use. Let’s start with the installation. Make sure your server Ubuntu OS packages are fully up-to-date: apt-get update apt-get upgrade Install the required packages: sudo […]

The post How to Install Sentora on Debian 8 appeared first on LinuxHostSupport.

]]>
In this tutorial, we will show you how to install Sentora on a Debian 8 VPS.
Sentora is a web-based hosting control panel which is very easy to install and use.

Let’s start with the installation.

Make sure your server Ubuntu OS packages are fully up-to-date:

apt-get update 
apt-get upgrade

Install the required packages:

sudo apt-get install ca-certificates wget nano dbconfig-common sqlite3 postfix dovecot-imapd dovecot-lmtpd dovecot-pop3d dovecot-sqlite

Download the latest version of Sentora installation script and run it:

bash <(curl -L -Ss https://raw.githubusercontent.com/sentora/sentora-installers/master/sentora_install.sh)
  • Select the geographic area in which you live so that time zone rules can be set correctly and click ‘Ok’.
  • Select the city or region corresponding to your time zone.
  • Enter the sub-domain you want to access Sentora panel: (for example: sentora.yourdomain.com)
  • Enter (or confirm) the public IP for this server.
  • All is ok. Do you want to install Sentora now (y/n)? y

Wait a few minutes for the installation to complete.

########################################################
Congratulations Sentora has now been installed on your
server. Please review the log file left in /root/ for
any errors encountered during installation.

Login to Sentora at http://sentora.yourdomain.com
Sentora Username  : zadmin
Sentora Password  : eXBisXF546rVJg

MySQL Root Password      : YC2bTRFU6otwKf
MySQL Postfix Password   : SYY4psDHHpNuYm
MySQL ProFTPd Password   : xjfxmOBfaIEq0H
MySQL Roundcube Password : lNoV7zFw0mjiA6
(theses passwords are saved in /root/passwords.txt)
########################################################

Restart your server now to complete the install (y/n)? n

Install the postfix-mysql package using the following command:

apt-get install postfix-mysql

Also, set the postfix daemon directory using:

postconf -e "daemon_directory=/usr/lib/postfix"

Restart the server:

shutdown -r now

That is it. The Sentora installation is now complete.

Log in to Sentora control panel at http://sentora.yourdomain.com and start using it.

sentora back end

Listed below are some basic usage scenarios:

  • Start BIND

To start BIND (named service),  go to Admin >> Module Admin >> DNS Config >> Services >> Start Service >> click ‘GO’.

  • Add a new domain:

Go to Domain >> Create a new domain >> enter your domain name

Home directory:     Create a new home directory and click ‘Create’.

  • Add a new email account:

Go to Mail >> Mailboxes >> Create a new mailbox >> Email Address >> enter your email address and password and click ‘Create’.

If you receive an error message like this one:

The selected domain was not valid

Edit the /etc/sentora/panel/modules/mailboxes/code/controller.ext.php file and change:

if(!self::IsValidDomain($domain))

to:

if(self::IsValidDomain($domain))
  • Configure the FTP module:

Go to Admin >> Module Admin >> FTP config >> Configure your FTP Settings

FTP Config File: /etc/proftpd/proftpd.conf

Click ‘Save Changes’.

  • Create a new FTP account with full access to yourdomain.com directory.

Go to File >> FTP Accounts >> Current FTP accounts >> enter username and password

Access type >> Full access

Home directory >> Use Domain directory /yourdomain.com

Click ‘Create’.

  • Create a new MySQL database

Go to Database >> MySQL database >> Create a new MySQL database , enter your new database name and click ‘Create’.

Of course, you don’t have to do any of this if you use one of our Software Installation Services, in which case you can simply ask our expert Linux admins to install Sentora for you. They are available 24×7 and will take care of your request immediately.

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

 

The post How to Install Sentora on Debian 8 appeared first on LinuxHostSupport.

]]>
https://linuxhostsupport.com/blog/how-to-install-sentora-on-debian-8/feed/ 0