How To Install Nginx Mainline Version on CentOS 7

Nginx Mainline Version on CentOS 7

Nginx has two primary repositories or branches that folks can use to install or update Nginx packages. When you install Nginx from CentOS default repositories, you’re installing Nginx from the stable repository.

Every new feature is added to the mainline repository first and after it has been tested and proven to be stable, before the repository switches to be stable. If you’re not overly cautious and wish to install the latest and greatest Nginx packages and features, you may have to install Nginx from it Mainline repository.

Table of Contents

Step 1. First let’s start by ensuring your system is up-to-date.

Step 2. Installing Mainline version.

 

Prerequisites

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 install Nginx mainline version on CentOS 7 server.
Install Nginx Mainline Version on CentOS 7

Step 1. First let’s start by ensuring your system is up-to-date.

yum clean all
yum -y update

Step 2. Installing Mainline version.

First, create nginx repository file in CentOS:

nano /etc/yum.repos.d/nginx.repo

Add these lines into the file and save it:

[nginx.org]
name=nginx.org repo
baseurl=http://nginx.org/packages/centos/7/$basearch/
gpgcheck=1
enabled=1

Now update repositories and install Nginx:

yum update
yum install nginx -y

Check Nginx version:

### nginx -v
nginx version: nginx/1.13.8

Start Nginx and add it to automatically start on your system start-up using:

systemctl restart nginx
systemctl enable nginx

You can verify that Nginx is really running by opening your favorite web browser and entering the URL http://your-server’s-address, if it is installed, then you will see this:
nginx-default-page
Congratulation’s! You have successfully installed Nginx on CentOS 7. Thanks for using this tutorial for installing Nginx mainline version web server on CentOS 7 systems. For additional help or useful information, we recommend you to check the official Nginx web site.

How To Install Nginx Amplify Agent on CentOS 7

Nginx Amplify Agent on CentOS 7

Nginx Amplify Agent is a Strong Nginx monitoring tool written in Python. Its function is to collect various metrics and metadata and send Them securely into the backend for storage and visualization. After appropriate Installation, it supplies you with NGINX Amplify web interface and also you Should observe real-time metrics to your monitored systems.

Table of Contents

Step 1. First let’s start by ensuring your system is up-to-date.

Step 2. Installing Nginx Amplify Agent.

Step 3. Configuring the Nginx Amplify Agent.

 

 

Prerequisites

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 the Nginx Amplify Agent monitoring tool on a CentOS 7 server.
Install Nginx Amplify Agent on CentOS 7

Step 1. First let’s start by ensuring your system is up-to-date.

yum clean all
yum -y update

Step 2. Installing Nginx Amplify Agent.

First, Create a repo file:

# cat >/etc/yum.repos.d/nginx-amplify.repo <

Install the Nginx Amplify Agent rpm package:

yum install nginx-amplify-agent

Verify the installtion by inspectivng the log file ‘/var/log/amplify-agent/agent.log‘

Once installed, These commands can be used to start/stop the agent:

systemctl enable amplify-agent
systemctl start amplify-agent

Step 3. Configuring the Nginx Amplify Agent.

Checklist:

    stub status
    extended access logging
    ‘warn’ level on error logging

server {
 listen [::]:80;
 server_name bmw.idroot.us localhost [::1] 127.0.0.1;
 keepalive_timeout 60;

location /nginx_status {
 stub_status;
 access_log off;

allow ::1;
 allow 127.0.0.1;
 deny all;
 }
}

The logging needs to be confiured to have extended information as per the documentation:

log_format  main      '$remote_addr - $remote_user [$time_local] "$request" '
                      ' $status $body_bytes_sent "$http_referer" '
                      '"$http_user_agent" "$http_x_forwarded_for" '
                      'rt=$request_time ua="$upstream_addr" '
                      'us="$upstream_status" ut="$upstream_response_time" '
                      'ul="$upstream_response_length" '
                      'cs=$upstream_cache_status' ;

Ensure warnings are logged to the error log:

error_log /var/log/nginx/error.log warn

Finally steps, You can overview the status of our monitored server in the Web interface logging to your Amplify Account as in the snapshot:
nginx-amplify-agent
Congratulation’s! You have successfully installed Nginx Amplify. Thanks for using this tutorial for installing Nginx Amplify monitoring tool on CentOS 7 systems. For additional help or useful information, we recommend you to check the official Nginx Amplify Agent web site.

How To Install LibreNMS on CentOS 7

LibreNMS on CentOS 7

LibreNMS is an open source auto-discovering network monitoring tool for servers and network hardware. It supports a wide range of network hardware like Cisco, Juniper, Brocade, Foundry, HP and operating systems including Linux and Windows. LibraNMS is a community-based fork of Network monitoring tool “Observium“, released under GPLv3.

Table of Contents

Step 1. First let’s start by ensuring your system is up-to-date.

Step 2. Install LAMP server.

Step 3. Installing LibreNMS.

Step 4. Configuring MariaDB for LibreNMS.

Step 5. Configure Apache web server for LibreNMS.

Step 6. Configure Firewall.

Step 7. Accessing LibreNMS.

Prerequisites

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 the LibreNMS network monitoring tool on a CentOS 7 server.
LibreNMS Features

Automatic discovery
Customisable alerting
API Access
Billing system
Automatic Updates
Distributed Polling
iOS and Android App
Unix Agent
And many more

Install LibreNMS on CentOS 7

Step 1. First let’s start by ensuring your system is up-to-date.

yum clean all
yum -y update

Step 2. Install LAMP server.

A CentOS 7 LAMP stack server is required. If you do not have LAMP installed, you can follow our guide here. Also install required PHP modules:

yum -y install php-gd php-imap php-ldap php-odbc php-pear php-xml php-xmlrpc php-mbstring php-mcrypt php-mssql php-snmp php-soap php-tidy curl curl-devel ImageMagick jwhois nmap mtr rrdtool net-snmp-utils vixie-cron php-mcrypt fping git
pear install Net_IPv4-1.3.4
pear install Net_IPv6-1.2.2b2

Step 3. Installing LibreNMS.

First, Add LibreNMS user:

useradd librenms -d /opt/librenms -M -r
usermod -a -G librenms apache

Next, clone LibreNMS repo on /opt directory:

cd /opt/
git clone https://github.com/librenms/librenms.git librenms

Set the correct permission to the librenms directory:

chown -R librenms:librenms /opt/librenms

Step 4. Configuring MariaDB for LibreNMS.

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 LibreNMS. 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 LibreNMS installation:

MariaDB [(none)]> CREATE DATABASE librenms CHARACTER SET utf8 COLLATE utf8_unicode_ci;
MariaDB [(none)]> CREATE USER 'librenms'@'localhost' IDENTIFIED BY 'PASSWORD';
MariaDB [(none)]> GRANT ALL PRIVILEGES ON librenms.* TO 'librenms'@'localhost';
MariaDB [(none)]> FLUSH PRIVILEGES;
MariaDB [(none)]> exit

Next, open the MariaDB configuration file and add the following lines under [mysqld] section:

### nano /etc/mysql/mariadb.conf.d/50-server.cnf

innodb_file_per_table=1
sql-mode=""
lower_case_table_names=0

Restart MariaDB for the changes to take effect:

systemctl restart mariadb

Step 5. Configure Apache web server for LibreNMS.

We will create Apache virtual host for your LibreNMS website. First create ‘/etc/httpd/conf.d/vhosts.conf’ file with using a text editor of your choice:

nano /etc/httpd/conf.d/vhosts.conf
IncludeOptional vhosts.d/*.conf

Next, create the virtual host:

mkdir /etc/httpd/vhosts.d/
nano /etc/httpd/vhosts.d/yourdomain.com.conf

Add the following lines:

ServerAdmin [email protected]
DocumentRoot /opt/librenms/html/
ServerName yourdomain.com
ServerAlias www.yourdomain.com
ErrorLog "/var/log/httpd/yourdomain.com-error_log"
CustomLog "/var/log/httpd/yourdomain.com-access_log" combined

<Directory "/opt/librenms/html/">
DirectoryIndex index.html index.php
Options FollowSymLinks
AllowOverride All
Require all granted


Save and close the file. Restart the apache service for the changes to take effects:

systemctl restart httpd.service

Step 6. Configure Firewall.

Allow apache through the firewall so that user can able to access LibreNMS portal from an external machine:

firewall-cmd --permanent --add-port=80/tcp
firewall-cmd --reload

Step 7. Accessing LibreNMS.

LibreNMS 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.

Congratulation’s! You have successfully installed LibreNMS. Thanks for using this tutorial for installing LibreNMS network monitoring tool on CentOS 7 systems. For additional help or useful information, we recommend you to check the official LibreNMS web site.

How To Install PowerShell on CentOS 7

PowerShell on CentOS 7

PowerShell Core is a cross-platform (Windows, Linux, and macOS) automation and configuration tool/framework that works well with your existing tools and is optimized for dealing with structured data (e.g. JSON, CSV, XML, etc.), REST APIs, and object models. It includes a command-line shell, an associated scripting language and a framework for processing cmdlets.

Table of Contents

Step 1. First let’s start by ensuring your system is up-to-date.

Step 2. Installing PowerShell on CentOS 7.

 

Prerequisites

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 install PowerShell Microsoft on CentOS 7 server.
Install PowerShell on CentOS 7

Step 1. First let’s start by ensuring your system is up-to-date.

yum clean all
yum -y install epel-release
yum -y update

Step 2. Installing PowerShell on CentOS 7.

Method 1.

PowerShell Core for Linux is published to official Microsoft repositories for easy installation:

curl https://packages.microsoft.com/config/rhel/7/prod.repo | sudo tee /etc/yum.repos.d/microsoft.repo

Install PowerShell using following command:

sudo yum install -y powershell

Start PowerShell:

pwsh

Method 2.

Install PowerShell using RPM package:

yum install https://github.com/PowerShell/PowerShell/releases/download/v6.0.0/powershell-6.0.0-1.rhel.7.x86_64.rpm

Then execute the following in the terminal:

sudo yum install powershell-6.0.0-1.rhel.7.x86_64.rpm

PowerShell is installed, launch it with the help of following command:

powershell

Congratulation’s! You have successfully installed PowerShell on CentOS 7. Thanks for using this tutorial for installing PowerShell Microsoft on CentOS 7 systems. For additional help or useful information, we recommend you to check the official PowerShell web site.

How To Install IOPing on CentOS 7

IOPing on CentOS 7

IOPing lets you to benchmark the storage performance is to measure the latency of individual requests. IOPing is a simple tool that does just that. It runs I/O requests to the storage device to benchmark the time to reply. The results display disk latency in the same way ping –test measures network latency.

Table of Contents

Step 1. First let’s start by ensuring your system is up-to-date.

Step 2. Installing IOPing.

Step 3. Usage IOPing.

Prerequisites

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 install IOPing on CentOS 7 server.
Install IOPing on CentOS 7

Step 1. First let’s start by ensuring your system is up-to-date.

yum clean all
yum -y install epel-release
yum -y update

Step 2. Installing IOPing.

First, create and navigate to the directory where ioping will be installed:

cd ~
mkdir ioping
cd ioping

Download the installation file using wget. We will be using version 0.8 from their Google Code repository:

wget https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/ioping/ioping-0.8.tar.gz
tar -xzvf ioping-0.8.tar.gz

Enter the directory and compile ioping:

cd ioping-0.8
make ioping

Step 3. Usage IOPing.

Ioping has a list of built-in commands. Run ioping without any arguments to show the list:

ioping

To show sequential latency, enter the following command:

ioping -R /dev/sda

To determine the latency of the entire drive, run this command:

ioping -c 10 /

Congratulation’s! You have successfully installed IOPing on CentOS 7. Thanks for using this tutorial for installing IOPing on CentOS 7 systems. For additional help or useful information, we recommend you to check the official IOPing web site.

How To Install Red5 Media Server on CentOS 7

Red5 Media Server on CentOS 7

Red5 is an open source media server for live streaming solutions of all kinds. It is designed to be flexible with a simple plugin architecture that allows for customization of virtually any VOD and live streaming scenario.

Table of Contents

Step 1. First let’s start by ensuring your system is up-to-date.

Step 2. Installing Java.

Step 3. Installing Red5 Media Server.

Step 4. Accessing Red 5 installation.

 

Prerequisites

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 install Red5 Media Server on CentOS 7 server.
Install Red5 Media Server on CentOS 7

Step 1. First let’s start by ensuring your system is up-to-date.

yum clean all
yum -y update

Step 2. Installing Java.

You may skip this steps if you have already installed java on your system else use below link to install latest java version:

Install Java JDK 8 on CentOS 7

Step 3. Installing Red5 Media Server.

Use following commands to install red5:

wget https://github.com/Red5/red5-server/releases/download/v1.0.10-M4/red5-server-1.0.10-M4.tar.gz
tar xvf red5-server-1.0.10-M4.tar.gz
cd red5-server

After extracting downloaded archive, lets start Red5 using shell script red5.sh:

cd /opt/red5-server/
./red5.sh

Step 4. Accessing Red 5 installation.

Red5 demo pages and application can be accessed on port 5080 like http://your-server-ip:5080/

Congratulation’s! You have successfully installed Red5 on CentOS 7. Thanks for using this tutorial for installing Red5 Media Server on CentOS 7 systems. For additional help or useful information, we recommend you to check the official Red5 Media Server web site.

How To Install PHP 5.6 on CentOS 7

PHP 5

PHP (recursive acronym for PHP: Hypertext Preprocessor) is an open source, popular general-purpose scripting language that is widely-used and best suited for developing websites and web-based applications. It is a server-side scripting language that can be embedded in HTML. By default Ubuntu 16.04 (Xenial) now comes with PHP 7.0. You can install PHP 5.6 in parallel and switch between them using the following instructions.

Table of Contents

Step 1. First let’s start by ensuring your system is up-to-date.

Step 2. Installing PHP 5.6 on CentOS 7.

Prerequisites

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 install PHP 5.6 on CentOS 7 server.
Install PHP 5.6 on CentOS 7

Step 1. First let’s start by ensuring your system is up-to-date.

yum clean all
yum -y update

Step 2. Installing PHP 5.6 on CentOS 7.

First, you must add the Webtatic EL yum repository information corresponding to your CentOS version to yum:

rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm

Now, install PHP 5.6using the apt command:

yum install php56w php56w-opcache

if you want to use php-fpm, then install:

yum install php56w-fpm php56w-opcache

Verify the PHP version using the following command:

php -V

Congratulation’s! You have successfully installed PHP on CentOS 7. Thanks for using this tutorial for installing PHP 5.6 on CentOS 7 systems. For additional help or useful information, we recommend you to check the official PHP web site.