How To Install KernelCare on Your Linux Server

KernelCare on Your Linux Server

KernelCare is fabulous kernel update tool by CloudLinux. We started testing this kernel patch in a few servers and the result has been truly amazing, allowing us to avoid server downtime after kernel updates because of each server reboot we had to apply after the kernel was updated.

Table of Contents

Step 1. Installing Kernelcare.

 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 KernelCare on your Linux server.
Install KernelCare on Your Linux Server

Step 1. Installing Kernelcare.

In order to install KernelCare on a RPM system like CentOS or RHEL, use the following commands:

rpm -i https://downloads.kernelcare.com/kernelcare-latest.x86_64.rpm

To install KernelCare on Debian based system like Debian or Ubuntu run:

wget https://downloads.kernelcare.com/kernelcare-latest.deb
dpkg -i kernelcare-latest.deb

Check the status of the live patching by running:

/usr/bin/kcarectl --info

The software will automatically check for new patches every 24 hours. To update manually, run:

/usr/bin/kcarectl --update

Note: If you haven’t previously licensed KernelCare, this will install a 30 day trial key for you.

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

How To Install Graylog on CentOS 7

Graylog on CentOS 7

Graylog is a free and open source powerful centralized log management tool based on Elasticsearch and MongoDB. Graylog helps you to collect, index and analyze any machine logs centrally.

Table of Contents

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

Step 2. Installing Java.

Step 3. Installing MongoDB.

Step 4. Installing Elasticsearch.

Step 5. Configuring Elasticsearch.

Step 6. Installing Graylog.

Step 7. Accessing Graylog.

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

Now you will need to install JAVA, run the following command to download the RPM package using the following command:

wget --no-cookies --no-check-certificate --header "Cookie:oraclelicense=accept-securebackup-cookie" "http://download.oracle.com/otn-pub/java/jdk/8u91-b14/jdk-8u91-linux-x64.rpm"

Once you have downloaded the RPM file, you can install the package using following command:

yum localinstall jdk-8u91-linux-x64.rpm

Check if it is successfully installed with the following command:

java -version

Step 3. Installing MongoDB.

MongoDB is not available in the default CentOS repository. You will need to add the MongoDB repo first:

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

Add the following contents:

[mongodb]
name=MongoDB Repository
baseurl=https://repo.mongodb.org/yum/redhat/$releasever/mongodb-org/3.2/x86_64/
gpgcheck=1
enabled=1
gpgkey=https://www.mongodb.org/static/pgp/server-3.2.asc

Install MongoDB by running the following command:

yum install mongodb-org -y

Start the MongoDB service and enable it to start on boot with the following command:

systemctl enable mongod.service
systemctl start mongod.service

Step 4. Installing Elasticsearch.

In order to install Elasticsearch using the official repository, we have to download and install the public signing key:

rpm --import https://packages.elastic.co/GPG-KEY-elasticsearch

Create and add the following in your /etc/yum.repos.d/ director:

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

Add the following contents:

[elasticsearch-2.x]
name=Elasticsearch repository for 2.x packages
baseurl=https://packages.elastic.co/elasticsearch/2.x/centos
gpgcheck=1
gpgkey=https://packages.elastic.co/GPG-KEY-elasticsearch
enabled=1

Now, install Elasticsearch using the follwing command:

yum install elasticsearch -y

Start the elasticsearch service and enable it to start on boot time with the following command:

systemctl enable elasticsearch.service
systemctl start elasticsearch.service

Step 5. Configuring Elasticsearch.

First, open up the Elasticsearch configuration file:

nano /etc/elasticsearch/elasticsearch.yml

Change the file as shown below:

cluster.name: graylog

Let’s prevent possible remote code executions. Add the following lines:

script.inline: false
script.indexed: false
script.file: false

Restart the elasticsearch service:

systemctl restart elasticsearch.service

Check the health of the Elasticsearch with the following command:

curl -XGET 'http://localhost:9200/_cluster/health?pretty=true'

Step 6. Installing Graylog.

We need to download and install the Graylog repository using the following command:

rpm -Uvh https://packages.graylog2.org/repo/packages/graylog-2.2-repository_latest.rpm

Install Graylog server using yum:

yum install graylog-server -y

After you have installed the Graylog Server, you have to generate secret key for Graylog using the following command:

### pwgen -N 1 -s 96 
MTtPFSMZxAvoLsUiXXauggyJ761hwkGn1ZTN2ovb8wN2tO1LzyeNbaatOrpLukp96p0MxwHQosmMGPbmw46ojnnSORVvr2

Now create a hash password for the root user that can be used to log in to the Graylog web server using the following command:

### echo -n Password | sha256sum
e7cf3ef4f17c3999a94f2c6f612e8bmwe46b1026878e4e19398b23bd38ec221a
1
2
	
### echo -n Password | sha256sum
e7cf3ef4f17c3999a94f2c6f612e8bmwe46b1026878e4e19398b23bd38ec221a

Edit the server.conf file:

nano /etc/graylog/server/server.conf

Make changes to the file as shown below:

password_secret= MTtPFSMZxAvoLsUiXXauggyJ761hwkGn1ZTN2ovb8wN2tO1LzyeNbaatOrpLukp96p0MxwHQosmMGPborm1YRojnnSORVvr2
root_password_sha2= e7cf3ef4f17c3999a94f2c6f612e8a888e5b10268bmwe4619398b23bd38ec221a
[email protected]
root_timezone=UTC
elasticsearch_discovery_zen_ping_unicast_hosts = ipaddress:9300
elasticsearch_shards=1
script.inline: false
script.indexed: false
script.file: false

To enable the Graylog web interface, make changes to the file as shown below:

rest_listen_uri = http://your-server-ip:12900/
web_listen_uri = http://your-server-ip:9000/

After you have modified the configuration file, you can start Graylog Service using the following commands:

systemctl enable graylog-server.service
systemctl start graylog-server.service

Step 7. Accessing Graylog.

Graylog will be available on HTTP port 8080 by default. Open your favorite browser and navigate to http://yourdomain.com:9000 or http://server-ip:9000 and complete the required the steps to finish the installation.
Installing-Graylog-LoginScreen
Congratulation’s! You have successfully installed Graylog. Thanks for using this tutorial for installing Graylog in CentOS 7 system. For additional help or useful information, we recommend you to check the official Graylog web site.

How To Install Foxit Reader on CentOS 7

Foxit Reader on CentOS 7

Foxit PDF Reader can be used to view, create, edit, organize, sign, scan, and OCR. It can easily export PDF files to office, PDF/A/E/X, and more. Users can collaborate, share, sign, protect, and secure documents using Foxit Reader.

Table of Contents

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

Step 2. Installing Foxit PDF Reader.

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 Foxit Reader on a CentOS 7 server.
Install Foxit Reader 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 Foxit PDF Reader.

First download the installer file according to your system requirement. Use below link to download Foxit installer:

wget http://cdn01.foxitsoftware.com/pub/foxit/reader/desktop/linux/1.x/1.1/en_us/FoxitReader1.10.0225_Server_x64_enu_Setup.run.tar.gz

Unpack the Foxit PDF Reader archive to the document root directory on your server:

tar -xvf FoxitReader1.10.0225_Server_x64_enu_Setup.run.tar.gz

Next run the following command to start the setup process of Foxit Reader:

./FoxitReader.enu.setup.1.1.0.0225(r205262).x64.run

The installation wizard is completed and to start running the application, type the FoxitReader command in the terminal and hit enter:

FoxitReader

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

How To Install OpenCart on CentOS 7

OpenCart on CentOS 7

OpenCart is a free open source ecommerce platform for online merchants. OpenCart provides a professional and reliable foundation from which to build a successful online store.

Table of Contents

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

Step 2. Install LAMP server.

Step 3. Disable Selinux on CentOS 7.

Step 4. Installing OpenCart.

Step 5. Configuring MariaDB for OpenCart.

Step 6. Accessing OpenCart.

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 OpenCart on a CentOS 7 server.
Install OpenCart 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. Disable Selinux on CentOS 7.

Run the below command to update selinux:

setenforce 0
sed -i 's/enforcing/disabled/' /etc/sysconfig/selinux
sed -i 's/enforcing/disabled/' /etc/selinux/config

Step 4. Installing OpenCart.

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

wget https://github.com/opencart/opencart/archive/3.0.2.0.zip
unzip 3.0.2.0.zip
mv opencart-3.0.2.0/upload/* /var/www/html/

Rename the file ‘config-dist.php’ to ‘config.php’:

mv config-dist.php config.php

We will need to change some folders permissions:

chown -R www-data.www-data /var/www/html
chmod -R 755 /var/www/html

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

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

Step 6. Accessing OpenCart.

OpenCart 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 OpenCart. Thanks for using this tutorial for installing OpenCart e-commerce on CentOS 7 systems. For additional help or useful information, we recommend you to check the official OpenCart web site.

How To Install OrientDB on CentOS 7

OrientDB on CentOS 7

OrientDB has a multi-model NoSQL database which supports document database with a graph which is a java based application and can be run on any operating system which supports multi-master replication and easy horizontal scaling.

Table of Contents

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

Step 2. Installing OrientDB.

Step 3. Starting the OrientDB Server.

Step 4. Configure OrientDB Daemon.

 

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 OrientDB open source NoSQL database management system on a CentOS 7 server.
Install OrientDB 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 OrientDB.

First of all, create a new user to run OrientDB:

adduser orientdb -d /opt/orientdb

Now you can download the OrientDB binary archive by running the following command:

cd /opt/orientdb/
wget https://orientdb.com/download.php?file=orientdb-community-importers-2.2.29.tar.gz -O /opt/orientdb/orientdb.tar.gz

Once the package is downloaded we will untar and move the extracted folder to the /opt/orientdb:

tar -xf orientdb.tar.gz
mv orientdb-community*/* .

Make the orientdb user the owner of the extracted files:

chown -R orientdb:orientdb /opt/orientdb

Step 3. Starting the OrientDB Server.

OrientDB provides an installer script for you to start the server. Switch to the OrientDB user:

su - orientdb
sudo bin/server.sh

OrientDB should now prompt for the root password with a message like the one below:

+---------------------------------------------------------------+
|                WARNING: FIRST RUN CONFIGURATION               |
+---------------------------------------------------------------+
| This is the first time the server is running. Please type a   |
| password of your choice for the 'root' user or leave it blank |
| to auto-generate it.                                          |
|                                                               |
| To avoid this message set the environment variable or JVM     |
| setting ORIENTDB_ROOT_PASSWORD to the root password to use.   |
+---------------------------------------------------------------+

Step 4. Configure OrientDB Daemon.

Create a new ststemd service to easily manage OrientDB start and stop:

nano /etc/systemd/system/orientdb.service

Paste the following content:

[Unit]
Description=OrientDB service
After=network.target

[Service]
Type=simple
ExecStart=/opt/orientdb/bin/server.sh
User=orientdb
Group=orientdb
Restart=always
RestartSec=9
StandardOutput=syslog
StandardError=syslog
SyslogIdentifier=orientdb

[Install]
WantedBy=multi-user.target

Reload systemd daemon service:

systemctl daemon-reload

Start OrientDB and enable for starting at boot time:

systemctl start orientdb
systemctl enable orientdb

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

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.