How To Install Sensu on CentOS 7

Sensu on CentOS 7

Sensu is a free and open source tool for composing the monitoring system you need. It is written in Ruby that uses RabbitMQ to handle messages and Redis to store data. Sensu provides a framework for monitoring infrastructure and application health. Sensu supports a number of platforms such as, IBM AIX, Ubuntu, Debian, RedHat, CentOS, FreeBSD, Mac OS, Solaris, Windows and much more.

Table of Contents

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

Step 2. Installing Erlang.

Step 3. Installing RabbitMQ.

 

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 Sensu monitoring on a CentOS 7 server.
Install Sensu 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 Erlang.

Install Erlang using command:

wget http://packages.erlang-solutions.com/erlang-solutions-1.0-1.noarch.rpm
rpm -Uvh erlang-solutions-1.0-1.noarch.rpm
yum install erlang

Step 3. Installing RabbitMQ.

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

wget https://www.rabbitmq.com/releases/rabbitmq-server/v3.6.1/rabbitmq-server-3.6.1-1.noarch.rpm
rpm --import https://www.rabbitmq.com/rabbitmq-signing-key-public.asc

Installing RabbitMQ and related packages is now as simple as running just one command:

yum install rabbitmq-server-3.6.1-1.noarch.rpm

To start, stop, restart and check the RabbitMQ status, use the following:
# To start enable boot service:

systemctl enable rabbitmq-server

# To start the service:
systemctl start rabbitmq-server

# To stop the service:
systemctl stop rabbitmq-server

# To restart the service:
systemctl restart rabbitmq-server

# To check the status:
systemctl status rabbitmq-server

Step 4. Installing Redis.

Next, we will be installing Redis:

yum install redis

Finally, we will start the Redis services and enable them to auto-start:

systemctl start redis-server.service
systemctl enable redis-server.service

Step 5. Installing Sensu.

First, create a yum repository for in /etc/yum.repos.d:

### nano /etc/yum.repos.d/sensu.repo

[sensu]
name=sensu-main
baseurl=http://repositories.sensuapp.org/yum/el/7/x86_64/
gpgcheck=0
enabled=1

Then save and close the file.

Install and start the Sensu services:

yum install sensu uchiwa -y

Create a sample Sensu configuration file:

cp /etc/sensu/config.json.example /etc/sensu/config.json

Start Sensu and Uchiwa and enable auto-start:

systemctl start sensu-server
systemctl start sensu-client
systemctl start sensu-api
systemctl start uchiwa
systemctl enable sensu-server
systemctl enable sensu-client
systemctl enable sensu-api
systemctl enable uchiwa

Step 6. Accessing Sensu.

Sensu will be available on HTTP port 3000 by default. Open your favorite browser and navigate to http://yourdomain.com:3000 or http://server-ip:3000 and complete the required the steps to finish the installation. If you are using a firewall, please open port 3000 to enable access to the control panel.

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

How To Install Minecraft Server on CentOS 7

Minecraft Server on CentOS

Minecraft is a game about breaking and placing blocks. The creative and building aspects of Minecraft allow players to build constructions out of textured cubes in a 3D procedurally generated world. Minecraft servers allow players to play online or via a local area network with other people. They may either be run on a hosted server, on local dedicated server hardware, a Virtual Private server on a home machine, or on your local gaming computer.

Table of Contents

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

Step 2. Installing Java-JDK.

Step 3. Installing Minecraft.

 

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 Sensu monitoring on a CentOS 7 server.
Install Minecraft 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-JDK.

Minecraft is a Java-based game and so we will need to install Java:

yum install java screen -y

Step 3. Installing Minecraft.

First, create a Minecraft directory:

mkdir minecraft
cd minecraft

Now download and install your own Minecraft server:

wget -O minecraft_server.jar https://s3.amazonaws.com/Minecraft.Download/versions/1.12.2/minecraft_server.1.12.2.jar

Start the Screen with adequate name:

screen -S "Minecraft server"

Accept Minecraft’s end-user license agreement by changing the value from false to true in eula.txt file:

nano eula.txt

Now you only need to run the installed server (you can edit the 1024M value to match your server’s RAM):

java -Xmx1024M -Xms1024M -jar minecraft_server.jar nogui

To get back to the normal screen, press these keys: Control+A+D, To get back to the screen where Minecraft is running:

screen -r

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

How To Install Firefox Quantum on CentOS 7

Foxit Reader on CentOS 7

Mozilla today released Firefox 57 a.k.a Firefox Quantum. According to a Completely overhauled heart along with a revamped layout, Firefox Quantum has been built from the ground up to deliver a quick browsing experience while swallowing a limited amount of resources. Mozilla is calling Quantum the biggest update to the browser since its original release in 2004.

The browser now also comes with a new CSS engine Named Stylo which Takes better advantage of today’s devices featuring multi-core Processors to deliver a faster and simpler browsing experience. Firefox Will automatically prioritize busy tabs over inactive ones for better resource management. Mozilla claims that its approach to multiple Processes is exceptional and different from that of Chrome.

Table of Contents

Step 1. Installing Firefox Quantum on CentOS.

 

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 Firefox Quantum web browser on a CentOS 7 server.
Install Firefox Quantum on CentOS 7

Step 1. Installing Firefox Quantum on CentOS.

First, download latest Firefox, use the following command:

### 32-Bit ###
wget https://download-installer.cdn.mozilla.net/pub/firefox/releases/57.0/linux-i686/en-US/firefox-57.0.tar.bz2
### 64-Bit ###
wget https://download-installer.cdn.mozilla.net/pub/firefox/releases/57.0/linux-x86_64/en-US/firefox-57.0.tar.bz2

Extract the tar package to a desired directory.

tar xfj firefox-57.0.tar.bz2

Create symlink the downloaded executable to /usr/bin/firefox:

ln -s /usr/local/firefox/firefox /usr/bin/firefox

Now, check the version of already installed Firefox and get the extract location of binary command:

# firefox -V
Mozilla Firefox 57.0

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

How To Install Anchor CMS on CentOS 7

Anchor CMS on CentOS 7

Anchor CMS is an open-source, light-weight and ultra-simple blogging system. It’s written in PHP and Includes markdown Service, custom fields, themes, i18n compatibility and many more.

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 Anchor CMS.

Step 5. Configuring MariaDB for OpenCart.

Step 6. Configuring Apache web server for Anchor CMS.

Step 7. Accessing Anchor CMS.

 

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 accge of Linount, 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 Anchor CMS on a CentOS 7 server.
Install Anchor CMS 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

Step 3. Installing Anchor CMS.

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

wget https://github.com/anchorcms/anchor-cms/archive/0.12.3a.zip
unzip 0.12.3a.zip -d /var/www/html/
mv /var/www/html/anchor-cms-0.12.3a /var/www/html/anchor

We will need to change some folders permissions:

chown -R apache:apache /var/www/html/anchor/

Step 5. Configuring MariaDB for OpenCart.

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 Anchor CMS. 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 Anchor CMS installation:

MariaDB [(none)]> CREATE DATABASE anchor;
MariaDB [(none)]> NT ALL PRIVILEGES ON anchor.* TO 'anchoruser'@'localhost' IDENTIFIED BY 'YOURPASSWORD';
MariaDB [(none)]> FLUSH PRIVILEGES;
MariaDB [(none)]> \q

Step 6. Configuring Apache web server for Anchor CMS.

We will create Apache virtual host for your Anchor CMS 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 "/var/www/html/anchor/"
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 "/var/www/html/anchor/">
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

Next step, we should allow HTTP traffic on port 80 through firewalld. You can do this by running the following command:

firewall-cmd --zone=public --add-service=http --permanent
firewall-cmd --reload

Step 7. Accessing Anchor CMS.

Anchor CMS 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.

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

How To Install GoAccess on CentOS 7

GoAccess on CentOS 7

GoAccess is a real time web log analyzer and a visualizer for Both Linux and Unix operating systems. It functions as an interactive app from the Terminal, and after models also supplies an HTML report, which can be Conveniently viewed in the browser.

Table of Contents

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

Step 2. Installing GoAccess.

Step 3. Using GoAccess.

 

 

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 GoAccess open source real-time web log analyzer on a CentOS 7 server.
Install GoAccess 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 GoAccess.

Method 1.

Execute the following command to install GoAccess:

yum -y install goaccess

Method 2.

If using another operating system, you can search for pre-compiled binaries at the official website:

wget http://tar.goaccess.io/goaccess-1.2.tar.gz
tar xvzf goaccess-1.2.tar.gz
cd goaccess-1.2
./configure --enable-utf8 --enable-geoip=legacy
make && make install

Step 3. Using GoAccess.

GoAccess has many options to analys your log files, the most simple way you can use to see your log file with GoAccess is below:

goaccess /var/log/boot.log

You can see the whole flags and capabilities of GoAccess with the command below:

goaccess --help

GoAccess live reporting in HTML format:

First, install Apache as our web server:

yum install httpd

After the installation process is finished, execute the following commands to start your Apache service:

systemctl start httpd
systemctl enable httpd

For example, using the following command will create an analyzed HTML file from the Apache access log and place it in Apache’s default document root:

goaccess /var/log/httpd/access_log --log-format=COMBINED -a -o /var/www/html/report.html

Now you can open your browser, Enter your IP address or your Domain name and add “/report.html” in the end to see your HTML output:
goaccess-dashboard
Congratulation’s! You have successfully installed GoAccess. Thanks for using this tutorial for installing GoAccess open source real-time web log analyzer on CentOS 7 systems. For additional help or useful information, we recommend you to check the official GoAccess web site.

How To Install Bolt CMS on Centos 7

Bolt CMS on Centos 7

Bolt CMS is a lightweight open source Content Management Tool, written in PHP and it’s built upon the Silex frame.

Table of Contents

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

Step 2. Install LEMP server.

Step 3. Installing Composer.

Step 4. Installing Bolt CMS.

Step 5. Configure Nginx Web Server for Bolt CMS.

Step 6. Accessing Bolt CMS.

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 accge of Linount, 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 Bolt CMS on a CentOS 7 server.
Install Bolt CMS 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 LEMP server.

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

yum 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

Step 3. Installing Composer.

Download and install Composer by executing the following command:

curl -sS https://getcomposer.org/installer | php
mv composer.phar /usr/local/bin/composer

Step 4. Installing Bolt CMS.

Install Bolt CMS using the “composer create-project” command:

composer create-project bolt/composer-install:^3.3 /var/www/boltchedelics --prefer-dist

The installer will ask you if you want to use Bolt’s standard folder structure. Choose “yes” and proceed with the installation.

By default, Bolt is configured to use an SQLite database, since we will be using a MySQL database we need to change the settings in app/config/config.yml file and enter the details of the database we created previously:

nano /var/www/boltchedelics/app/config/config.yml
# database:
# driver: sqlite
# databasename: bolt

database:
 driver: mysql
 username: bolt
 password: your_bolt_passwd
 databasename: bolt

We will need to change some folders permissions:

chown -R nginx: /var/www/boltchedelics
find /var/www/boltchedelics -type d -exec chmod 755 {} \;
find /var/www/boltchedelics -type f -exec chmod 644 {} \;

Step 5. Configure Nginx Web Server for Bolt CMS.

Create a new Nginx virtual host:

nano /etc/nginx/conf.d/boltchedelics.conf

Add the following lines:

server {
 listen 80;
 server_name boltchedelics;

root /var/www/boltchedelics/public;
 index index.php;

access_log /var/log/nginx/boltchedelics.access.log;
 error_log /var/log/nginx/boltchedelics.error.log;

location / {
 try_files $uri $uri/ /index.php?$query_string;
 }

location = /bolt {
 try_files $uri /index.php?$query_string;
 }

location ^~ /bolt/ {
 try_files $uri /index.php?$query_string;
 }
 
 location ^~ /thumbs {
 try_files $uri /index.php; #?$query_string;
 
 access_log off;
 log_not_found off;
 expires max;
 add_header Pragma public;
 add_header Cache-Control "public, mustrevalidate, proxy-revalidate";
 add_header X-Koala-Status sleeping;
 }
 
 location ~* ^.+\.(?:atom|bmp|bz2|css|doc|eot|exe|gif|gz|ico|jpe?g|jpeg|jpg|js|map|mid|midi|mp4|ogg|ogv|otf|png|ppt|rar|rtf|svg|svgz|tar|tgz|ttf|wav|woff|xls|zip)$ {
 access_log off;
 log_not_found off;
 expires max;
 add_header Pragma public;
 add_header Cache-Control "public, mustrevalidate, proxy-revalidate";
 add_header X-Koala-Status eating;
 }
 
 location = /(?:favicon.ico|robots.txt) {
 log_not_found off;
 access_log off;
 }

 location ~ /index.php/(.*) {
 rewrite ^/index.php/(.*) /$1 permanent;
 }

location ~ /\. {
 deny all;
 }
 
 location ~ /\.(htaccess|htpasswd)$ {
 deny all;
 }
 
 location ~ /\.(?:db)$ {
 deny all;
 }
 
 location ~* /(.*)\.(?:markdown|md|twig|yaml|yml)$ {
 deny all;
 }

location ~ [^/]\.php(/|$) {
 try_files /index.php =404;
 
 fastcgi_split_path_info ^(.+?\.php)(/.*)$;
 fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
 fastcgi_param HTTP_PROXY "";
 fastcgi_param HTTPS $https if_not_empty;
 fastcgi_pass 127.0.0.1:9000;
 include fastcgi_params;
 }

}

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

nginx -t
systemctl restart nginx

Step 6. Accessing Bolt CMS.

Bolt CMS will be available on HTTP port 80 by default. Open your favorite browser and navigate to http://yourdomain.com/ or http://server-ip and register your first user. Administrative access is automatically granted to the first registered user.

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

How To Install Askbot on CentOS 7

Askbot on CentOS 7

Askbot is a question and answer web forum and it looks like StackOverflow Q&A web forums. It is based on Django web framework and written in Python programming language. It is an open source Q&A web forum project maintained and developed by Evgeny Fadeev.Some most popular open source projects like Ask-Fedora and Ask-LibreOffice uses the AskBot to provide support for their users and clients.

Table of Contents

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

Step 2. Installing Dependencies Askbot.

Step 3. Installing PostgreSQL.

Step 4. Create Database For Askbot.

Step 5. Installing Askbot.

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 Askbot on a CentOS 7 server.
Install Askbot 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 Dependencies Askbot.

Install required packages:

yum group install 'Development Tools'
yum install epel-release
yum install python-pip python-devel python-six

Step 3. Installing PostgreSQL.

Askbot uses PostgreSQL as database system to store its data, so install it executing the following command:

yum install postgresql-server postgresql-devel postgresql-contrib

Start postgres and enable it to launch automatically at the boot time:

postgresql-setup initdb
systemctl start postgresql
systemctl start postgresql

Step 4. Create Database For Askbot.

First of all we will create a database techbrown for AskBot project:

postgres=# create database askbotdb;
postgres=# create user askbotusr with password 'usr_strong_passwd';
postgres=# grant all privileges on database askbotdb to askbotusr;

The next step is to edit the postgres configuration for authentication setup, which you can do by heading to the ‘pgsql/data’ directory and editing the ‘pg_hba.conf’ file with nano:

nano /var/lib/pgsql/data/pg_hba.conf

Once inside the file, change all authentication to md5, as shown below:

local all all md5
 # IPv4 local connections:
 host all all 127.0.0.1/32 md5
 # IPv6 local connections:
 host all all ::1/128 md5

Save, close the file and restart PostgreSQL:

systemctl restart postgresql

Step 5. Installing Askbot.

We will install Askbot under a user named ‘askbot’, and using the virtualenv python. So let’s begin:

useradd -m -s /bin/bash askbot
passwd askbot

Next, add this new user to the wheel group:

usermod -a -G wheel askbot

Upgrade pip to the latest version:

pip install --upgrade pip

Next, install the virtualenv package:

pip install virtualenv six

Log in as the askbot user previously created, and create a new virtual environment with virtualenv:

su - askbot
virtualenv wpcademy/

Activate this new virtual environment, by executing the following command:

source wpcademy/bin/activate

Next, install Askbot and other required packages with pip:

pip install six askbot psycopg2

Next, create a new directory for the ‘Askbot’ project. Please make sure you don’t use ‘askbot’ as the directory name:

mkdir testing

Initialize a new Askbot project by executing the following commands:

cd testing
askbot-setup

So Askbot is now installed on the ‘testing directory. Now we need to generate Askbot Django static files and the database. Run the command below to generate Askbot Django static files:

python manage.py collectstatic

Generate the database:

python manage.py syncdb

So, Askbot has been installed and the testing project configured. Test it with runserver:

python manage.py runserver 0.0.0.0:8080

With a web browser, go to the server IP address, and you should see a forum page.

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