How To Install Ntopng on Ubuntu 18.04 LTS

Install Ntopng on Ubuntu 18

Ntopng is a relatively useful tool if you are looking to monitor different network protocols on your servers. It provides a bunch of tools for monitoring various protocols, traffic variants, and yes, bandwidth across multiple time frames. ntopng is based on libpcap and it has been written in a portable way in order to virtually run on every Unix platform, Mac OS and on Win32 as well.

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 Ntopng on a Ubuntu 18.04 LTS (Bionic Beaver) server.

Install Ntopng on Ubuntu 18.04 LTS

Step 1. First make sure that all your system packages are up-to-date

sudo apt-get update
sudo apt-get upgrade

Step 2. Installing Ntopng on Ubuntu 18.04 LTS.

To install Ntopng, run the following command as your server’s root user:

wget http://apt.ntop.org/18.04/all/apt-ntop.deb
dpkg -i apt-ntop.deb

Then, run:

apt-get update
apt-get install pfring-dkms nprobe ntopng n2disk cento

Step 3. Configure Ntopng.

Create ntopng configuration file, In this article we use nano as text editor. You can use your favorite text editor to create ntopng configuration files:

sudo nano /etc/ntopng/ntopng.conf

# /etc/ntopng/ntopng.conf
#
#        The  configuration  file is similar to the command line, with the exception that an equal
#        sign '=' must be used between key and value. Example:  -i=p1p2  or  --interface=p1p2  For
#        options with no value (e.g. -v) the equal is also necessary. Example: "-v=" must be used.
#
#
#       -G|--pid-path
#        Specifies the path where the PID (process ID) is saved.
#
-G=/var/tmp/ntopng.pid
#
#       -e|--daemon
#        This  parameter  causes ntop to become a daemon, i.e. a task which runs in the background
#        without connection to a specific terminal. To use ntop other than as a casual  monitoring
#        tool, you probably will want to use this option.
#
-e=
#
#       -i|--interface
#        Specifies  the  network  interface or collector endpoint to be used by ntopng for network
#        monitoring. On Unix you can specify both the interface name  (e.g.  lo)  or  the  numeric
#        interface id as shown by ntopng -h. On Windows you must use the interface number instead.
#        Note that you can specify -i multiple times in order to instruct ntopng to create  multi‐
#        ple interfaces.
#
-i=1
#
#       -w|--http-port
#        Sets the HTTP port of the embedded web server.
#
-w=3000
#
#       -m|--local-networks
#        ntopng determines the ip addresses and netmasks for each active interface. Any traffic on
#        those  networks  is considered local. This parameter allows the user to define additional
#        networks and subnetworks whose traffic is also considered local in  ntopng  reports.  All
#        other hosts are considered remote. If not specified the default is set to 192.168.1.0/24.
#
#        Commas  separate  multiple  network  values.  Both netmask and CIDR notation may be used,
#        even mixed together, for instance "131.114.21.0/24,10.0.0.0/255.0.0.0".
#
-m=192.168.1.0/24
#
#       -n|--dns-mode
#        Sets the DNS address resolution mode: 0 - Decode DNS responses  and  resolve  only  local
#        (-m)  numeric  IPs  1  -  Decode DNS responses and resolve all numeric IPs 2 - Decode DNS
#        responses and don't resolve numeric IPs 3 - Don't decode DNS responses and don't  resolve
#
-n=1
#
#       -S|--sticky-hosts
#        ntopng  periodically purges idle hosts. With this option you can modify this behaviour by
#        telling ntopng not to purge the hosts specified by -S. This parameter requires  an  argu‐
#        ment  that  can  be  "all"  (Keep  all hosts in memory), "local" (Keep only local hosts),
#        "remote" (Keep only remote hosts), "none" (Flush hosts when idle).
#
-S=
#
#       -d|--data-dir
#        Specifies the data directory (it must be writable). Default directory is ./data
#
-d=/var/tmp/ntopng
#
#       -q|--disable-autologout
#        Disable web interface logout for inactivity.
#
-q=

Create ntopng.start file:

sudo nano /etc/ntopng/ntopng.start

##Add this line##

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

To see all available interfaces and options, use the ntopng -h option:

sudo ntopng -h

Start Ntopng server daemon:

systemctl start ntopng.service
systemctl start redis-server.service

Step 4. Test Ntopng.

Now you can test your ntopng application by typing http://yourserver.name:3000. You will see ntopng login page. For the first time, you can use user ‘admin’ and password ‘admin’.
Ntopng-web-interface

Congratulation’s! You have successfully installed Ntopng. Thanks for using this tutorial for installing Ntopng high speed web-based traffic analysis and flow collection on your Ubuntu 18.04 LTS Bionic Beaver system. For additional help or useful information, we recommend you to check the official Ntopng web site.

How To Install phpMyAdmin 4.8.5 on Ubuntu 18.04 LTS

Install phpMyAdmin on Ubuntu 18

phpMyAdmin is web-based client written in php for managing MySQL and MariaDB databases. It provides a user friendly web interface to access and manage your databases. To ease usage to a wide range of people, phpMyAdmin is being translated into 72 languages and supports both LTR and RTL languages.

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 phpMyAdmin on a Ubuntu 18.04 LTS (Bionic Beaver) server.

Install phpMyAdmin on Ubuntu 18.04 LTS

Step 1. First make sure that all your system packages are up-to-date

sudo apt-get update
sudo apt-get upgrade

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

A Ubuntu 18.04 LAMP server is required. If you do not have LAMP installed, you can follow our guide here. Also install all required PHP modules:

apt-get install php7.1-cli php7.1-gd php7.1-opcache php7.1-mysql php7.1-json php7.1-mcrypt php7.1-xml php7.1-curl

Step 3. Installing phpMyAdmin on Ubuntu 18.04 LTS.

Use this command to install phpmyadmin on Ubuntu 18.04:


sudo apt install phpmyadmin

Important, this step will ask you to select the web server where the application would be installed, it is mandatory that you select with the spacebar “Apache” server or your designate, not doing this will cause the files wont’t be copied correctly and then can not find the installed application.

Step 4. Accessing phpMyAdmin.

Now open your browser and surf to http://your-ip-address/phpmyadmin and your phpmyadmin will ask you for user and password of your mysql installation such as on step 2, you can use root as user and the root mysql password, or any other mysql user/password. If you are using a firewall, please open port 80 to enable access to the control panel.

phpMyAdmin-login

Congratulation’s! You have successfully installed phpMyAdmin. Thanks for using this tutorial for installing phpMyAdmin on Ubuntu 18.04 LTS system. For additional help or useful information, we recommend you to check the official phpMyAdmin web site.

How To Install Cockpit 192 on Ubuntu 18.04 LTS

Install Cockpit on Ubuntu 18

Cockpit is a free software which delivers a web-based interface for your system admin to do tasks, such as launching containers, storage management, network setup, inspecting logs and so forth.
Cockpit features

Easy to use — Cockpit is ideal for new sysadmins, allowing them to easily perform simple tasks such as storage administration, inspecting journals and stopping and starting services.
No interference — Jumping between the terminal and the internet tool is no problem. A service began via Cockpit could be stopped through the terminal. If an error happens in the terminal, it can be understood from the Cockpit journal interface.

Multi-server — You can track and manage several servers at the same

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 Cockpit on a Ubuntu 18.04 LTS (Bionic Beaver) server.

Install Cockpit on Ubuntu 18.04 LTS Bionic Beaver

Step 1. First make sure that all your system packages are up-to-date

sudo apt-get update
sudo apt-get upgrade

Step 2. Installing Cockpit on Ubuntu 18.04 LTS.

The cockpit package is available in the official Ubuntu 18.04 repositories, so installing using following command:

apt install cockpit

The cockpit-docker supports Docker management. So install using following command:

apt install -y cockpit-docker

Step 3. Accessing to Cockpit.

Cockpit will be available on HTTP port 9090 by default. Open your favorite browser and navigate to http://yourdomain.com:9090 or http://server-ip:9090 and complete the required the steps to finish the installation. We’ll be asked to enter the login details in order to enter into the dashboard. Here, the username and password is the same as that of the login details we use to login to our linux server. If you are using a firewall, please open port 9090 to enable access to the control panel.
Cockpit-Userinterface
Congratulation’s! You have successfully installed Cockpit. Thanks for using this tutorial for installing Cockpit in Ubuntu 18.04 LTS Bionic Beaver system. For additional help or useful information, we recommend you to check the official Cockpit web site.

How To Install EHCP on Ubuntu 18.04 LTS

Install EHCP on Ubuntu 18

EHCP (Easy Hosting Control Panel) is an open-source and powerful hosting control panel that lets you to host any websites, create email accounts, create additional (sub) domains and create FTP accounts and many more. Ehcp is the only first hosting control panel was written using PHP programming language and available for free.

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 Easy Hosting Control Panel on a Ubuntu 18.04 (Bionic Beaver) server.

Install EHCP on Ubuntu 18.04 LTS

Step 1. First make sure that all your system packages are up-to-date

sudo apt-get update
sudo apt-get upgrade

Step 2. Installing EHCP on Ubuntu 18.04 LTS.

First, download the latest EHCP version from the official website with the following command:

wget http://ehcp.net/ehcp_1804.tgz

Extract the ehcp source using following tar command:

tar -zxvf ehcp_1804.tgz

Change to ehcp directory, then run install.sh script:

cd ehcp
./install.sh

Read the instructions carefully, your server will send statistical information to the EHCP developers. If you choose to move on, the install script will install all required packages including Apache, MySql and Postfix. You will need to provide some information to configure the services and set the admin passwords.

Step 4. Accessing Easy Hosting Control Panel.

EHCP will be available on HTTP port 80 by default. Open your favorite browser and navigate to http://yourdomain.com or http://server-ip. Enter the administrative credentials. Default admin username is ‘admin‘ and default admin password is ‘1234‘. If you had entered a new password during the installation please provide the same. If you are using a firewall, please open port 80 to enable access to the control panel.

Congratulation’s! You have successfully installed EHCP. Thanks for using this tutorial for installing Easy Hosting Control Panel in Ubuntu 18.04 LTS (Bionic Beaver) systems. For additional help or useful information, we recommend you to check the official EHCP web site.

How To Install ClamAV (0.101.2.tar.gz.sig)on Ubuntu 18.04 LTS

Install ClamAV on Ubuntu 18

ClamAV is an open source (GPL) antivirus engine designed for detecting viruses, malware and other malicious threats on Linux. It’s easy to use and best for Linux based Web and Mail server.

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 ClamAV on a Ubuntu 18.04 LTS (Bionic Beaver) server.

Install ClamAV on Ubuntu 18.04 LTS

Step 1. First make sure that all your system packages are up-to-date

sudo apt-get update
sudo apt-get upgrade

Step 2. Installing ClamAV on Ubuntu 18.04 LTS.

ClamAV is available in the Ubuntu repositories, you can install using following command:

sudo apt install clamav

Update virus database with Freshclam:

sudo freshclam

It’ll take a few minutes to complete. When it’s done, restart the service:

sudo systemctl start clamav-freshclam

Try to scan:

clamscan --infected --remove --recursive /home

Step 3. Installing ClamTK.

ClamTK package provides GUI window, This is useful for desktop user:

sudo apt install clamtk

ClamTk-GUI

Congratulation’s! You have successfully installed ClamAV. Thanks for using this tutorial for installing ClamAV open source antivirus engine in Ubuntu 18.04 LTS Bionic Beaver system. For additional help or useful information, we recommend you to check the official ClamAV web site.

How To Install Nextcloud on Ubuntu 18.04 LTS

Install Nextcloud on Ubuntu 18

Nextcloud is open source self-hosted file sync and share application (Calendar, Contacts, Documents, Email, and more). The developers at Nextcloud are doing their best to give the users a more secure platform, fewer bugs and overall a better product.

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 Nextcloud on a Ubuntu 18.04 LTS (Bionic Beaver) server.

Install Nextcloud on Ubuntu 18.04 LTS

Step 1. First make sure that all your system packages are up-to-date

sudo apt-get update
sudo apt-get upgrade

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

A Ubuntu 18.04 LAMP server is required. If you do not have LAMP installed, you can follow our guide here. Also install all required PHP modules:

apt-get install php7.1-cli php7.1-gd php7.1-opcache php7.1-mysql php7.1-json php7.1-mcrypt php7.1-xml php7.1-curl

Step 3. Installing Nextcloud.

First thing to do is to go to Nextcloud’s download page and download the latest stable version of Nextcloud, At the moment of writing this article it is version 13.0.2:

wget https://download.nextcloud.com/server/releases/nextcloud-13.0.2.zip

Unpack the Nextcloud archive to the document root directory on your server:

unzip nextcloud-13.0.2.zip
mv nextcloud /var/www/html

We will need to change some folders permissions:

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

Step 4. Configuring MariaDB for Nextcloud.

By default, MariaDB is not hardened. You can secure MariaDB using the mysql_secure_installation script. You should read and below each steps carefully which will set root password, remove anonymous users, disallow remote root login, and remove the test database and access to secure MariaDB.

mysql_secure_installation

Configure it like this:

- Set root password? [Y/n] y
- 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

Next we will need to log in to the MariaDB console and create a database for the Nextcloud. Run the following command:

mysql -u root -p

This will prompt you for a password, so enter your MariaDB root password and hit Enter. Once you are logged in to your database server you need to create a database for Nextcloud installation:

MariaDB [(none)]> CREATE DATABASE nextcloud;
MariaDB [(none)]> GRANT ALL PRIVILEGES ON nextcloud.* TO 'nextcloud'@'localhost' IDENTIFIED BY 'strong_password';
MariaDB [(none)]> FLUSH PRIVILEGES;
MariaDB [(none)]> \q

Disable MariaDB binary logging by commenting the following lines:

nano /etc/mysql/my.cnf

Add the following three lines in [mysqld] section:

log-bin        = /var/log/mysql/mariadb-bin
log-bin-index  = /var/log/mysql/mariadb-bin.index
binlog_format  = mixed

Step 5. Configuring Apache web server for Nextcloud.

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

sudo a2enmod rewrite
touch /etc/apache2/sites-available/nextcloud.conf
ln -s /etc/apache2/sites-available/nextcloud.conf /etc/apache2/sites-enabled/nextcloud.conf
nano /etc/apache2/sites-available/nextcloud.conf

Add the following lines:

<VirtualHost *:80>
ServerAdmin [email protected]
DocumentRoot "/var/www/html/nextcloud/"
ServerName your-domain.com
ServerAlias www.your-domain.com
<Directory "/var/www/html/nextcloud/">
Options FollowSymLinks
AllowOverride All
Order allow,deny
allow from all
</Directory>
ErrorLog /var/log/apache2/your-domain.com-error_log
CustomLog /var/log/apache2/your-domain.com-access_log common
</VirtualHost>

Now, we can restart Apache web server so that the changes take place:

systemctl restart apache2.service

Step 6. Accessing Nextcloud.

Nextcloud will be available on HTTP port 80 by default. Open your favorite browser and navigate to http://yourdomain.com/ or http://server-ip/ and complete the required the steps to finish the installation. If you are using a firewall, please open port 80 to enable access to the control panel. What you do with Nextcloud is up to you. You can add new modules or just use it as a cloud-based file sync and share. You can install the Android app and even make use of the ownCloud desktop clients (they’ll work fine with Nextcloud).

install-nextcloud-on-Ubuntu-16.04

Congratulation’s! You have successfully installed Nextcloud. Thanks for using this tutorial for installing Nextcloud personal cloud storage on your Ubuntu 18.04 LTS (Bionic Beaver) system. For additional help or useful information, we recommend you to check the official Nextcloud web site.

How To Install MongoDB 4.0. on Ubuntu 18.04 LTS

Install MongoDB on Ubuntu 18

MongoDB is a cross-platform document-oriented database program. Classified as a NoSQL database program, MongoDB uses JSON-like documents with schemata. MongoDB is developed by MongoDB Inc. and licensed under the Server Side Public License (SSPL).

MongoDB is a NoSQL document-oriented database. Refers to a database with a data model other than the tabular format used in relational databases such as MySQL, PostgreSQL, and Microsoft SQL. MongoDB features include: full index support, replication, high availability, and auto-sharding. It is a cross-platform and it makes the process of data integration faster and much easier. Since it is free and open-source, MongoDB is used by number of websites and organizations.

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 MongoDB on a Ubuntu 18.04 LTS (Bionic Beaver) server.

Install MongoDB on Ubuntu 18.04 LTS

Step 1. First make sure that all your system packages are up-to-date

sudo apt-get update
sudo apt-get upgrade

Step 2. Install MongoDB on Ubuntu 18.04 LTS.

First to completely remove an existing Mongodb from your machine if you have that in already:

sudo apt-get remove mongodb
sudo apt-get autoremove

A stable version of MongoDB packages are already in the default Ubuntu repository. However, the version in Ubuntu’s repository isn’t the latest. If you want to install the latest version you must add a third-party repository to your system and install it from there:

sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 0C49F3730359A14518585931BC711F9BA15703C6

After adding the repository key to Ubuntu, run the commands below to add MongoDB repository to your system:

echo "deb http://repo.mongodb.org/apt/ubuntu trusty/mongodb-org/3.4 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.4.list

After that, update your system and refresh existing repositories by running the commands below:

apt update

And now install the latest stable version of MongoDB:

apt install -y mongodb-org

Step 3. Verifying MongoDB database.

After installing MongoDB, the commands below can be used to stop, start and enable MongoDB to automatically startup when the systems boots up:

# sudo systemctl start mongod.service
# sudo systemctl enable mongod.service
# sudo systemctl status mongod.service
● mongodb.service - LSB: An object/document-oriented database
   Loaded: loaded (/etc/init.d/mongodb; bad; vendor preset: enabled)
   Active: active (running) since Thu 2016-06-4 16:40:35 IST; 14s ago
     Docs: man:systemd-sysv-generator(8)
  Process: 2849 ExecStart=/etc/init.d/mongodb start (code=exited, status=0/SUCCESS)
  Main PID: 1593 (code=exited, status=0/SUCCESS)
    Tasks: 13 (limit: 512)
   Memory: 51.9M
      CPU: 100ms
   CGroup: /system.slice/mongodb.service
           └─2861 /usr/bin/mongod --config /etc/mongodb.conf

A good way to start using MongoDB on your Ubuntu 16.04 is to read the MongoDB manual on the official web site.

https://docs.mongodb.org/manual/

Congratulation’s! You have successfully installed MongoDB. Thanks for using this tutorial for installing MongoDB in Ubuntu 18.04 LTS Bionic Beaver system. For additional help or useful information, we recommend you to check the official MongoDB web site.