How To Install Cacti Monitoring on Ubuntu 16.04 LTS

Install Cacti Monitoring on Ubuntu 16

Cacti is an open-source, web-based network monitoring and graphing tool designed as a front-end application for the open-source, industry-standard data logging tool RRDtool. It is used by IT businesses and stores all of the necessary information about bandwidth, hard disk usage, CPU usage, load average, RAM statistics etc in a MySQL database. Cacti creates graphs and populates them with data. It offers SNMP support, 3rd party templates and plugins and has built in user authentications and user permission features.

Install Cacti Monitoring on Ubuntu 16.04 LTS

This article assumes you have at least basic knowledge of linux, know how to use the shell, and most importantly, you host your site on your own VPS. The installation is quite simple and assumes you are running in the root account, if not you may need to add ‘sudo’ to the commands to get root privileges. I will show you through the step by step installation Cacti Monitoring on a Ubuntu 16.04 (Xenial Xerus) server.

Step 1. First make sure that all your system packages are up-to-date by running these following apt-get commands in the terminal.

sudo apt-get update
sudo apt-get upgrade

Step 2. Install LAMP (Linux, Apache, MariaDB, PHP) server.

A Ubuntu 16.04 LAMP server is required. If you do not have LAMP installed, you can follow our guide here. Cacti only supports MySQL 5.6, whereas the current version in the Ubuntu default repository is MySQL 5.7. In order to install this older version of MYSQL, you will need to add this repository and grab it from there:

nano /etc/apt/sources.list
deb http://archive.ubuntu.com/ubuntu trusty universe
apt-get update

Now install the following packages for Cacti setup on your Ubuntu server with the help of given below command:

apt-get install apache2 mysql-server-5.6 php libapache2-mod-php -y

Start the web server and MySQL server. Set them to automatically start up on server boot:

systemctl start apache2.service
systemctl enable apache2.service
systemctl start mysql.service
systemctl enable mysql.service

Step 3. Installing the Cacti packages.

Install SNMP and SNMP and RRDtools:

apt-get install snmp snmpd rrdtool -y

Now use the following command to install Cacti:

apt-get install cacti cacti-spine -y

During the installation process you will be prompted to configure Cacti with few options to select from available options. First of all Choose the web server that you wish to use for configure with Cacti like we are using Apache and then press ‘OK’ key to continue:
Install Cacti Monitoring on Ubuntu 16
Now it will ask you for a webserver that you will use it, we choose Apache2 since that’s what we installed in the dependencies.
Install Cacti Monitoring on Ubuntu 16-2
Next it will ask to configure the Cacti database, select Yes
cacti-installation-ubunut-3
Now it will ask for your root password of MySQL/MariaDB database.
cacti-installation-ubunut-4
Once the installation process is complete, you will have to restart all services to reflect the changes made:

systemctl restart apache2.service
systemctl restart mysql.service
systemctl restart snmpd.service

Step 3. Accessing cacti.

Cacti will be available on HTTP port 80 by default. Open your favorite browser and navigate to http://yourdomain.com/cacti or http://server-ip/cacti and complete the required the steps to finish the installation. You will get the “Cacti Installation Guide” on screen. Click on ‘Next’ button.
Cacti-installing-1
In next screen, you will get drop down button. Because this fresh installation select ‘New Install’ and click ‘Next’ button.
Cacti_installing-2
acti will now check for the packages it needs to run properly. Make sure all the checks appear with an “OK” status, and then click Finish.
Cacti_installing-3
The next page is the login page. The first time you log into Cacti, use admin as username and password
Cacti-installing-4
Congratulation’s! You have successfully installed Cacti. Thanks for using this tutorial for installing Apache Cassandra on Ubuntu 16.04 LTS (Xenial Xerus) system. For additional help or useful information, we recommend you to check the official Cacti Monitoring web site.

How To Install Cassandra on Ubuntu 16.04 LTS

Install Cassandra on Ubuntu 16

Apache Cassandra is a NoSQL database intended for storing large amounts of data in a decentralized, highly available cluster. NoSQL refers to a database with a data model other than the tabular relations used in relational databases such as MySQL, PostgreSQL, and Microsoft SQL. The Apache Cassandra database is the right choice when you need scalability and high availability without compromising performance.

This article assumes you have at least basic knowledge of linux, know how to use the shell, and most importantly, you host your site on your own VPS. The installation is quite simple and assumes you are running in the root account, if not you may need to add ‘sudo’ to the commands to get root privileges. We will show you through the step by step installation Apache Cassandra on a Ubuntu 16.04 (Xenial Xerus) server.
Install Cassandra on Ubuntu 16.04 LTS

Step 1. First make sure that all your system packages are up-to-date by running these following apt-get commands in the terminal.

sudo apt-get update
sudo apt-get upgrade

Step 2. Installing Java.

Cassandra needs Java application to be running on your server, make sure you have installed latest Java version:

add-apt-repository ppa:webupd8team/java

After added the PPA, run commands below one by one to install Java:

apt-get update
apt-get install oracle-java8-set-default

Verify Installed Java Version:

# java -version
java version "1.8.0_101"
Java(TM) SE Runtime Environment (build 1.8.0_101-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.101-b13, mixed mode)

Step 2. Installing Cassandra.

We will install Cassandra using official package available on Apache Software Foundation, so add Cassandra repository to make the package available to your system:

echo "deb http://www.apache.org/dist/cassandra/debian 36x main" | sudo tee -a /etc/apt/sources.list.d/cassandra.list

Add the public key for Cassandra repo so that you won’t encounter GPG error:

gpg --keyserver pgp.mit.edu --recv-keys 749D6EEC0353B12C
gpg --export --armor 749D6EEC0353B12C | sudo apt-key add -

Install Cassandra:

apt-get update
apt-get install cassandra -y

Start Cassandra up and configure it to your liking. You’ll most likely want to enable it to start on boot. In case of a power outage or maintenance, you won’t forget to start it back up after a reboot:

systemctl start cassandra
systemctl enable cassandra

Cassandra uses a separate command line to be controlled, so we need to make sure to activate that:

[[email protected] ~]# cqlsh
Connected to Test Cluster at 127.0.0.1:9042.
[cqlsh 5.0.1 | Cassandra 3.0.9 | CQL spec 3.4.0 | Native protocol v4]
Use HELP for help.
cqlsh>

You may want to check information about the node and cluster to get an idea of how to fix various issues or update information:

[[email protected] ~] nodetool status
Datacenter: datacenter1
=======================
Status=Up/Down
|/ State=Normal/Leaving/Joining/Moving
-- Address Load Tokens Owns (effective) Host ID Rack
UN 127.0.0.1 216.14 KB 256 100.0% 2a0b7fa9-23c6-e46-83a4-e6c06e2f5736 rack1

Congratulation’s! You have successfully installed Cassandra. Thanks for using this tutorial for installing Apache Cassandra on Ubuntu 16.04 LTS (Xenial Xerus) system. For additional help or useful information, we recommend you to check the official Apache Cassandra web site.

How To Install Tmux Terminal Multiplexer on Linux

Install Tmux Terminal Multiplexer on Linux

Tmux is a terminal multiplexer that lets you switch easily between several programs in one terminal, detach them (they keep running in the background) and reattach them to a different terminal.

This article assumes you have at least basic knowledge of linux, know how to use the shell, and most importantly, you host your site on your own VPS. The installation is quite simple and assumes you are running in the root account, if not you may need to add ‘sudo’ to the commands to get root privileges. I will show you through the step by step installation Tmux Terminal Multiplexer on a Linux server.
Install Tmux Terminal Multiplexer on Linux

Step 1. First make sure that all your system packages are up-to-date by running these following apt-get commands in the terminal.

sudo apt-get update
sudo apt-get upgrade

Step 2. Installing Tmux.

Installation is pretty straightforward if you have Ubuntu or CentOS distribution you can install tmux with:

### Debian / Ubuntu based ###
apt-get install tmux

### On RedHat / CentOS based ###
yum install tmux

After the installation is finish, then type tmux on your console to run tmux:

tmux

Step 3. Tmux Commands QuickStart.

Ctrl+b is the Tmux command prefix. Here below for the sake of Clarity the Ctrl+b will be repeated for every command:

To List the Available Commands:

Ctrl+b ?

To Create a New Pane:

Ctrl+b "

To Change Panes Layouts:

Ctrl+b Space

To Rotate Panes into Layout:

Ctrl+b Ctrl+o

To Switch into another Pane:

Ctrl+b ;

Congratulation’s! You have successfully installed Tmux. Thanks for using this tutorial for installing Tmux Terminal Multiplexer on Linux server. For additional help or useful information, we recommend you to check the official Tmux web site.

How To Install Varnish on Ubuntu 16.04 LTS

Install Varnish on Ubuntu 16

Varnish Cache is a powerful open source HTTP accelerator that can be installed in front of any Webserver such as Apache or Nginx. Varnish Cache can improve overall performance of your web server by caching contents. The Varnish cache stores the copy of user request’s and serves the same page when the user revisits the webpage. It makes your website really fast and accelerate your web site performance up-to 300 – 1000x (means 80% or more).

This article assumes you have at least basic knowledge of linux, know how to use the shell, and most importantly, you host your site on your own VPS. The installation is quite simple and assumes you are running in the root account, if not you may need to add ‘sudo’ to the commands to get root privileges. I will show you through the step by step installation Varnish Cache on a Ubuntu 16.04 (Xenial Xerus) server.
Install Varnish on Ubuntu 16.04 LTS

Step 1. First make sure that all your system packages are up-to-date by running these following apt-get commands in the terminal.

sudo apt-get update
sudo apt-get upgrade

Step 2. Install Apache web server.

For this part we will be assuming that you have already installed Apache on your server and have it running properly. If not write this command in your terminal:

sudo apt-get install apache2

Step 3. Installing Varnish.

Install Varnish using apt-get command:

apt-get install varnish

After the installation is finished, start and enable varnish.service using the systemctl command:

systemctl start varnish.service
systemctl enable varnish.service

Step 4. Configuring Varnish.

Varnish is automatically configured to server content over port 80 and fetch contents from Apache on port 8080, we need to update Apache to serve content over port 8080:

### nano /etc/apache2/ports.conf
Listen 127.0.0.1:8080

If you have any virtual hosts configured, you will need to update these as well – ensure your configuration looks like this:

<VirtualHost 127.0.0.1:8080>

We need to configure varnish to run on port 80. First, create a file called varnish.service inside the /etc/systemd/system directory:

### nano /etc/systemd/system/varnish.service

Then, add the following configuration:

[Service]
ExecStart=/usr/sbin/varnishd -j unix,user=vcache -F -a :80 -T localhost:6082 -f /etc/varnish/default.vcl -S /etc/varnish/secret -s malloc,256m

Once you save and exit out of that file, open up the default.vcl file:

### nano /etc/varnish/default.vcl
backend default {
    .host = "127.0.0.1";
    .port = "8080";
}

Restart the Apache and Varnish service for the changes to take effect:

systemctl restart apache2.service
systemctl restart varnish.service

You can check to see if varnish is working by typing the following command:

varnishstat

Step 5. Testing Varnish.

The test consists in making a HTTP request via curl and verifying that it is handled by Varnish:

[root@wpcademy ~ ]# curl -I 192.168.146.161
 HTTP/1.1 403 Forbidden
 Date: Mon, 01 May 2017 24:06:10 GMT
 Server: Apache/2.4.6 (Ubuntu) PHP/7.0.16
 Last-Modified: Thu, 16 Dec 2016 19:30:58 GMT
 ETag: "1321-5058ranty728280"
 Accept-Ranges: bytes
 Content-Length: 4897
 Content-Type: text/html; charset=UTF-8
 X-Varnish: 32779
 Age: 4
 Via: 1.1 varnish-v4
 Connection: keep-alive

Congratulation’s! You have successfully installed Varnish. Thanks for using this tutorial for installing Varnish Cache on Ubuntu 16.04 LTS (Xenial Xerus) system. For additional help or useful information, we recommend you to check the official Varnish web site.

How To Upgrade From Ubuntu 16.10 to Ubuntu 17.04

Upgrade From Ubuntu 16.10 to Ubuntu 17

Ubuntu 17.04 released, codenamed “Zesty Zapus”;  bringing yet another version of a remarkable operating system in the Ubuntu ecosystem, with the latest and some of the greatest open source technologies in a high-quality, easy-to-use Linux distribution.

This article assumes you have at least basic knowledge of linux, know how to use the shell, and most importantly, you host your site on your own VPS. The installation is quite simple and assumes you are running in the root account, if not you may need to add ‘sudo’ to the commands to get root privileges. We will show you through the step by step upgrade from Ubuntu 16.10 to Ubuntu 17.04 (Zesty Zapus).

Prerequisites:

There a couple of things you should do before performing an Ubuntu upgrade, like making a backup of important files and folders, disabling or purging third-party PPAs (the upgrade process will disable these, but it doesn’t hurt to be proactive), and installing all available updates.
Upgrade From Ubuntu 16.10 to Ubuntu 17.04

Step 1. First make sure that all your system packages are up-to-date by running these following apt-get commands in the terminal.

sudo apt update
sudo apt dist-upgrade

Step 2. Upgrade Ubuntu 16.10 to 17.04.

You can upgrade to Ubuntu 17.04 in one of two ways, using the Software Updater app, or using the command line.
Upgrade Ubuntu 16.10 to Ubuntu 17.04 Using Command Line

Then make sure you have update-manager-core package installed:

sudo apt install update-manager-core

Next, edit a configuration file using nano or your preferred command line text editor:

sudo nano /etc/update-manager/release-upgrades

At the bottom of this file, change the value of Prompt from lts to normal:

Prompt=normal

Afterwards, launch the upgrade tool with the command below:

sudo do-release-upgrade
[php]


Once that upgrade has completed reboot, login and run the command again, this time to upgrade to Ubuntu 17.04:
[php]
sudo do-release-upgrade -d

Upgrade Ubuntu 16.10 to Ubuntu 17.04 Using Graphical Update Manager

Ensure that you system is fully up-to-date, run the commands below:

sudo apt update
sudo apt dist-upgrade

Then open Software & Updates from Unity Dash or your favorite application menu:

software center and updates
Next, Select the Updates tab and then at the bottom of window, change notification settings from For long-term support version to For any new version:
click on updates then select new version
Click the close button. You will be asked to enter your password to apply the above changes. Next, issue the following command in terminal:

update-manager -d

You should be notified that software is up-to-date and Ubuntu 17.04 is now available. Click the Upgrade button:
click on upgrade
Then enter your password. The Ubuntu 17.04 release notes window will appear. Click Upgrade and wait for the upgrade to finish:
Upgrade From Ubuntu 16.10 to Ubuntu 17

Congratulation’s! You have successfully upgrade Ubuntu. Thanks for using this tutorial for upgrade from Ubuntu 16.10 to Ubuntu 17.04 (Zesty Zapus) system. For additional help or useful information, we recommend you to check the official Ubuntu web site.

You Might Also Like: How To Install Ubuntu 17.04 Server Zesty Zapus

How To Install Facebook Messenger Desktop on Ubuntu 16.04 LTS

Install Facebook Messenger Desktop on Ubuntu 16

Messenger for Desktop is a wrapper for the official client messenger.com. Therefore it works like a regular browser which can only navigate to the messenger.com web app. MFD doesn’t touch your messages, account or personal data. All that is handled securely by Facebook.

This article assumes you have at least basic knowledge of linux, know how to use the shell, and most importantly, you host your site on your own VPS. The installation is quite simple and assumes you are running in the root account, if not you may need to add ‘sudo’ to the commands to get root privileges. I will show you through the step by step installation Facebook Messenger Desktop on a Ubuntu 16.04 (Xenial Xerus) server.
Install Facebook Messenger Desktop on Ubuntu 16.04 LTS

Step 1. First make sure that all your system packages are up-to-date by running these following apt-get commands in the terminal.

sudo apt-get update
sudo apt-get upgrade

Step 2. Installing Facebook Messenger Desktop.

First, Download the deb package from this page and run the following commands to install Facebook Messenger Desktop on Ubuntu systems:

sudo apt-get install gdebi
wget https://github.com/aluxian/Messenger-for-Desktop/releases/download/v2.0.9/messengerfordesktop-2.0.9-linux-amd64.deb
sudo dpkg -i messengerfordesktop*.deb

Once installed, Facebook Messenger Desktop can be started from Unity Dash or your preferred app launcher or from the terminal:

messengerfordesktop

Congratulation’s! You have successfully installed Facebook Messenger App. Thanks for using this tutorial for installing Facebook Messenger Desktop on Ubuntu 16.04 LTS (Xenial Xerus) system. For additional help or useful information, we recommend you to check the official Facebook Messenger Desktop web site.

How To Check Ubuntu Version

How To Check Ubuntu Version

In this tutorial we will show you how to check the Ubuntu version from the command line. As a system administrator, the first question you should ask yourself after getting a new Ubuntu server to manage is what version of Ubuntu am I running? The version of the operating system in use on our server is important as it is critical that we have all the latest updates to ensure that the server is secure. There are a few ways to check your VPS hosting is using what version of Ubuntu. With commands below you can choose one of them to find out which Ubuntu version is running on your system.
Check Ubuntu Version

There are several ways on how to check what version of Ubuntu is running on your system. Below you can find multiple examples on how to determine Ubuntu version.

The first place to look for Ubuntu version is to look inside /etc/issue file. From terminal run command:

### cat /etc/issue
Ubuntu Xenial Xerus \n \l

To obtain a Ubuntu release number check content of /etc/lsb-release file:

### cat /etc/lsb-release 
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=16.04
DISTRIB_CODENAME=xenial
DISTRIB_DESCRIPTION="Ubuntu Xenial Xerus

Additional information regarding Ubuntu version can be found within /etc/os-release:

### cat /etc/os-release 
NAME="Ubuntu"
VERSION="16.04 (Xenial Xerus)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 16.04"
VERSION_ID="16.04"
HOME_URL="http://www.ubuntu.com/"
SUPPORT_URL="http://help.ubuntu.com/"
BUG_REPORT_URL="http://bugs.launchpad.net/ubuntu/"
UBUNTU_CODENAME=xenial

Furthermore, the following command will provide you with a neat output of your current Ubuntu version:

### lsb_release -da
No LSB modules are available.
Distributor ID:    Ubuntu
Description:    Ubuntu Xenial Xerus (development branch)
Release:    16.04
Codename:   xenial