Install Graylog2 on Debian 9

1 Install Required Packages

Before starting, you will need to install Java 8 and other required packages to your system. Not all required packages are available in Debian 9 standard repository, so you will need to add Debian Backports to the list of package source. First, login with root user and create a backport.list file:

nano /etc/apt/sources.list.d/backport.list

Add the following line:

deb http://ftp.debian.org/debian stretch-backports main

Save the file when you are finished, then update your system with the following command:

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

Once your system is up-to-date, install all the packages with the following command:

apt-get install apt-transport-https openjdk-8-jre-headless uuid-runtime pwgen -y

Once all the required packages are installed, you can proceed to install MongoDB. Continue reading “Install Graylog2 on Debian 9” »

Share

How To Install MySQL on Debian 9 (Stretch) with version selection

Step 1 – Prerequisites

Login to your Debian 9 system using shell access. For remote systems connect with SSH. Windows users can use Putty or other alternatives applications for SSH connection.

ssh root@debian9

Run below commands to upgrade the current packages to the latest version.

sudo apt update 
sudo apt upgrade

Step 2 – Configure MySQL PPA

MySQL team provides official MySQL PPA for Debian Linux. You can download and install the package on your Debian system, which will add PPA file to your system. Run below command to enable PPA.

wget http://repo.mysql.com/mysql-apt-config_0.8.13-1_all.deb
sudo dpkg -i mysql-apt-config_0.8.13-1_all.deb

During the installation of MySQL apt config package, It will prompt to select MySQL version to install. Select the MySQL 5.7 or 5.6 option to install on your system.

Continue reading “How To Install MySQL on Debian 9 (Stretch) with version selection” »

Share

Install PHP 7.2 on Debian 9

Before you start with the installation of PHP 7.2 on your Debian VPS, make sure that you have full root access to it. Connect to the server via SSH and upgrade all the system software to the latest version available. You can do this by running the following commands in the terminal:

sudo apt-get update 
sudo apt-get upgrade

This will update the package index and will update the software currently installed on the server to the latest version.

Once your system is fully up to date, you can proceed to the next step, which is installing PHP 7.2.

Import the signing key and enable the PPA for PHP 7.2 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

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

sudo apt-get update

In case you get an error like the one below:

Reading package lists... Done
E: The method driver /usr/lib/apt/methods/https could not be found.
N: Is the package apt-transport-https installed?
E: Failed to fetch https://packages.sury.org/php/dists/stretch/InRelease
E: Some index files failed to download. They have been ignored, or old ones used instead.

It means there are some missing packages that you need to install first. Install the required packages by running the following command:

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

The run the update command again.

Finally, install PHP 7.2 on your Debian 9 VPS including some of the commonly used extensions using the command below:

sudo apt-get install php7.2 php7.2-cli php7.2-common php7.2-opcache php7.2-curl php7.2-mbstring php7.2-mysql php7.2-zip php7.2-xml

To verify the installation is completed run the following command:

php -v

The output should be very similar to the one below:

# php -v
PHP 7.2.9-1+0~20180901081133.4+stretch~1.gbpdaac35 (cli) (built: Sep 1 2018 08:11:34) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies
with Zend OPcache v7.2.9-1+0~20180901081133.4+stretch~1.gbpdaac35, Copyright (c) 1999-2018, by Zend Technologies

Change/Customize PHP 7.2 settings on a Debian VPS
Next thing you may want to complete is to customize the PHP 7.2 settings to meet your requirements. You can do so by editing the php.ini file. To find the path to this file, you can use the command below:

php --ini | grep "Loaded Configuration File"

It will return the path to the php.ini file which is currently loaded.

# php --ini | grep "Loaded Configuration File"

Loaded Configuration File: /etc/php/7.2/cli/php.ini

Edit the file using a text editor of your choice. We will use nano in this example.

nano /etc/php/7.2/cli/php.ini

Once you change the settings, save and close the file. If you are using Apache as a web server, you need to restart it for the new configuration to be loaded and for the changes to take effect. If you are using Nginx and PHP-FPM, you should restart the PHP-FPM service.

You can also create a sample info.php and see if the PHP files and executed on the server.

To create the file:

nano /var/www/html/info.php

and paste the following:

<?php phpinfo(); ?>

Save and close the file, then open you favorite web browser and access the file by using your server IP address in the URL followed by the name of the file.

http://IP-ADDRESS/info.php
Share

Install Proxmox VE on Debian 9 – Stretch

The installation of a supported Proxmox VE server should be done via Bare-metal_ISO_Installer. In some case it makes sense to install Proxmox VE on top of a running Debian Stretch 64-bit, especially if you want a custom partition layout. For this HowTO the following Debian Stretch ISO was used:

Install a standard Debian Stretch (amd64)

Install a standard Debian Stretch, for details see Debian, and select a fixed IP. It is recommended to only install the “standard” package selection and nothing else, as Proxmox VE brings its own packages for qemu, lxc.

Add an /etc/hosts entry for your IP address
Please make sure that your hostname is resolvable via /etc/hosts, i.e you need an entry in /etc/hosts which assigns an IPv4 address to that hostname.

Note: Make sure that no IPv6 address for your hostname is specified in `/etc/hosts`

For instance if your IP address is 192.168.15.77, and your hostname prox4m1, then your /etc/hosts file should look like: Continue reading “Install Proxmox VE on Debian 9 – Stretch” »

Share

How to disable Network Manager on Linux

First Check if NetworkManager is running on Ubuntu / Debian

Usually you should be using NetworkManager by default (Ubuntu 14.04), just in case you want to be sure, use this command to verify:

dpkg --get-selections | grep network-manager

In case there is some output like:

network-manager install

it is installed, if there is nothing returned, you are probably using a different network managing daemon. It would be possible that network manager is installed but inactive. Lets check if its running the hard way:

ps aux | grep network-manager

If thats returning something different than itself, you can be sure using the NetworkManager in Ubuntu / Debian.

Disable Network Manager Completely

Here is how to disable Network Manager completely, so that Network Manager stops running on your Linux system.

To disable Network Manager on Debian 8 or later:

$ sudo systemctl stop NetworkManager.service
$ sudo systemctl disable NetworkManager.service

To disable Network Manager on Debian 7 or earlier:

$ sudo /etc/init.d/network-manager stop
$ sudo update-rc.d network-manager remove

To disable Network Manager on Ubuntu or Linux Mint: Continue reading “How to disable Network Manager on Linux” »

Share