Install and Setup TIG Stack on Ubuntu 20.04

In this tutorial, we are going to learn how to install and setup TIG Stack on Ubuntu 20.04.

TIG stack is a group of powerful open-source monitoring tools, Telegraf, InfluxDB and Grafana where;

  • Telegraf is an open-source server agent for collecting and sending metrics and events from databases, systems, and IoT sensors.
  • InfluxDB is an open-source time series database and provides datastore for metrics, events, and real-time analytics.
  • Grafana is a data visualization and monitoring tool and supports time series datastores such as Graphite, InfluxDB, Prometheus, Elasticsearch.

TIG stack can be used for monitoring system metrics such as memory, disk, logged in users, system load, swap usage, system uptime, system processes. 

Installing and Setup TIG Stack on Ubuntu 20.04

In order to install TIG stack, you need to install and setup each individual component of the stack, Telegraf, InfluxDB, Grafana.

Run System Update
To begin with, ensure that your system packages are up-to-date;

apt update
apt upgrade

Install Telegraf on Ubuntu 20.04

You can install Telegraf on Ubuntu 20.04 either by downloading the DEB package file or directly from the InfluxData repos.

Install Telegraf using DEB Package File

To install Telegraf using the DEB binary, grab the binary installer from the InfluxData downloads page. You can simply obtain the link to binary installer and pull it with wget;

wget https://dl.influxdata.com/telegraf/releases/telegraf_1.14.3-1_amd64.deb

Once you have the binary downloaded, you can install it as follows

Read more

Share

Setup Apache, FastCGI and PHP 7.4 on Ubuntu 20

Prerequisites

Update the installed packages.

apt update

Install the Ondřej PHP repository.

apt install software-properties-commonsudo
add-apt-repository ppa:ondrej/php
apt update

Check that the repositories are correctly installed.

grep ^ /etc/apt/sources.list /etc/apt/sources.list.d/*

Step 1 – Install Apache

apt install apache2

Read more

Share

Install InfluxDB on Ubuntu 20

InfluxDB is a time-series database licensed under open source. It helps to collect metric data from devices such as servers, switches, virtual servers, ups and plot graphs in realtime. It is written in Go language and optimized for fast and high availability.

Enabling Repository

Install InfluxDB by importing the key and enable the required repository.

$ wget -qO- https://repos.influxdata.com/influxdb.key | sudo apt-key add -
$ source /etc/lsb-release
$ echo "deb https://repos.influxdata.com/${DISTRIB_ID,,} ${DISTRIB_CODENAME} stable" | sudo tee /etc/apt/sources.list.d/influxdb.list

Install InfluxDB

Right after enabling the repository, Install Influxdb packages by running package manager for the respective operating system.

Use apt for installing on Ubuntu Linux distributions

Installing on Ubuntu

To install the influxdb on Ubuntu use the apt.

$ sudo apt-get update
$ sudo apt-get install influxdb

Enable the Service

Right after installing the package enable the service to start persistently, however don’t start it.

Read more

Share

Install MySQL 5.7 on Ubuntu 20.04

Prerequisites

  • Linux servers running Ubuntu 20.04
  • root privileges

Step 1 – Add MySQL APT repository in Ubuntu

Ubuntu already comes with the default MySQL package repositories. In order to add or install the latest repositories, we are going to install package repositories . Download the repository using the below command:

sudo apt update
sudo apt install wget -y
wget https://dev.mysql.com/get/mysql-apt-config_0.8.12-1_all.deb

Once downloaded, install the repository by running the command below:

sudo dpkg -i mysql-apt-config_0.8.12-1_all.deb

In the prompt, choose Ubuntu Bionic and click Ok

The next prompt shows MySQL 8.0 chosen by default. Choose the first option and click OK

Read more

Share

Mount Oracle Object Storage to Ubuntu Linux

Step 1. Install s3fs on an OCI compute instance running Ubuntu

SSH remotely into your Ubuntu server and run sudo apt update to update your system repository. Then type the command 

sudo apt install s3fs awscli -y 

to install S3fs on your system. To verify proper installation, run which s3fs and you should be able to see the path of the program.

Note: refer to our other tutorials  on how to create and connect to cloud compute instance through Bastion host.

Read more

Share

Get rid of esm-apps while ubuntu updates

If you ever encounter similar issue like below-

Get more security updates through Ubuntu Pro with 'esm-apps' enabled:
libavformat58 libavfilter7 ffmpeg mc sntp libswresample3 lynx-common libzmq5
fail2ban mc-data redis lynx libpostproc55 ntp ntpdate libgsasl7 redis-tools
cpanminus libavcodec58 libavutil56 libavdevice58 libswscale5 libsdl2-2.0-0
libmysofa1 redis-server libavresample4

And don’t like to be financially trapped into Ubuntu long term commercials, do this (Kidding, it’s actually good to keep the esm as it’s worth for expanded security)-run command to navigate to that directory:

Read more

Share

Troubleshooting ubuntu: dpkg: unrecoverable fatal error, aborting: files list file for package ‘linux-generic’ is missing final newline

If you ever encounter with such similar of an error (in my case it occurred on my Ubuntu 20 distro), you may apply the following process to get a fix. 

The error:

Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
The following packages will be upgraded:
apt apt-transport-https apt-utils dpkg libapt-inst2.0 libapt-pkg5.0 ntpdate
oracle-java8-installer oracle-java8-set-default thermald
10 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/4,389 kB of archives.
After this operation, 8,192 B of additional disk space will be used.
Do you want to continue? [Y/n] Y
Preconfiguring packages ...
dpkg: unrecoverable fatal error, aborting:
files list file for package 'linux-generic' is missing final newline
E: Sub-process /usr/bin/dpkg returned an error code (2)

Disclaimer: it worked for me, that doesn’t necessary means that would work same for you! However, you may give it a try.

Read more

Share

Install mail server on Ubuntu or Debian

Disclaimer:
This howto is tested on Ubuntu 16, 18, 20 and Debian 10, 11 edition.

Installing and configuring  postfix

Step 1 » Assign static IP and hostname and add a host entry for the host name .

Assign hostname in /etc/hostname

mail.tweenpath.net

Add a host entry in /etc/hosts

192.168.1.10 mail.tweenpath.net

Step 2 » Update the repositories.

tweenpath@mail:~$ sudo apt-get update

Step 3 » Install postfix and dependencies . Press enter for all prompted questions during installation. we will do that in the next step.

tweenpath@mail:~$ sudo apt-get install postfix

Step 4 » After installation issue the below command to configure postfix.

tweenpath@mail:~$ sudo dpkg-reconfigure postfix

Now you will be prompted for set of details . choose the following values and replace tweenpath.net with your domain name.

Read more

Share