How To Install Grafana on Ubuntu CentOS 7

Grafana on Ubuntu CentOS 7

Grafana is an open source data visualization and tracking suite. It offers support for Graphite, Elasticsearch, Included, Prometheus, and a lot more databases. The application gives a beautiful dashboard and metric analytics, with capability to control and create your own dashboard to your own apps or infrastructure performance monitoring.

Table of Contents

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

Step 2. Installing Grafana.

Step 3. Configure Firewall for Grafana.

Step 4. Accessing Grafana.

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 Grafana open source data visualization on a CentOS 7 server.
Install Grafana on Ubuntu 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 Grafana.

First, Add new Grafana repository:

cat <<EOF | sudo tee /etc/yum.repos.d/grafana.repo
[grafana]
name=grafana
baseurl=https://packagecloud.io/grafana/stable/el/6/$basearch
repo_gpgcheck=1
enabled=1
gpgcheck=1
gpgkey=https://packagecloud.io/gpg.key https://grafanarel.s3.amazonaws.com/RPM-GPG-KEY-grafana
sslverify=1
sslcacert=/etc/pki/tls/certs/ca-bundle.crt
EOF

Now we can start Grafana installation with the following command:

yum install grafana

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

systemctl daemon-reload
systemctl start grafana-server
systemctl enable grafana-server

Step 3. Configure Firewall for Grafana.

By default, Grafana is running on port 3000. In case your server is using a firewall, open the port using command below:

firewall-cmd --permanent --zone=public --add-port=3000/tcp
firewall-cmd --reload

Step 4. Accessing Grafana.

Grafana will be available on HTTP port 3000 by default. Open your favorite browser and navigate to http://mydomain.com: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 Grafana. Thanks for using this tutorial for installing Grafana open source data visualization on CentOS 7 systems. For additional help or useful information, we recommend you to check the official Grafana web site.

How To Install Apache Maven on CentOS 7

Apache Maven on CentOS 7

Apache Maven is a free and open source project management tool used for Java projects. You can easily handle a project’s build, reporting, and Documentation from a central piece of advice using Apache Maven. Apache Maven provides a complete framework to automate the job’s Build infrastructure.

Table of Contents

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

Step 2. Installing Java.

Step 3. Installing Apache Maven.

Step 4. Setup Environment Variables.

Step 5. Verify Installation Apache Maven.

 

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

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.

Java development kit is the primary requirement of Apache Maven. So you need to install Java development kit (JDK) on your system.

Verify the Java version by running the following command:

### java -version

java version "1.8.0_144"
Java(TM) SE Runtime Environment (build 1.8.0_144-b01)
Java HotSpot(TM) 64-Bit Server VM (build 25.144-b01, mixed mode)

Step 3. Installing Apache Maven.

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

wget http://www-eu.apache.org/dist/maven/maven-3/3.5.2/binaries/apache-maven-3.5.2-bin.tar.gz

Now extract downloaded archive using following command:

tar xzf apache-maven-3.5.2-bin.tar.gz
ln -s apache-maven-3.5.2 maven

Step 4. Setup Environment Variables.

Now set the environments variables by creating new file /etc/profile.d/maven.sh:

nano /etc/profile.d/apache-maven.sh

Add following content:

export M2_HOME=/usr/local/maven
export PATH=${M2_HOME}/bin:${PATH}

Now load the environment variables in current shell using following command:

source /etc/profile.d/apache-maven.sh

Step 5. Verify Installation Apache Maven.

Once everything has been successfully configured, check the version of the Apache Maven:

### mvn -version

Apache Maven 3.5.2 (138edd61fd100ec658bfa2d307c4e466940a5d7d; 2017-12-18T13:28:13+05:30)
Maven home: /usr/local/maven
Java version: 1.8.0_144, vendor: Oracle Corporation
Java home: /opt/jdk1.8.0_144/jre
Default locale: en_IN, platform encoding: UTF-8
OS name: "linux", version: "4.4.0-93-generic", arch: "amd64", family: "unix"

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

How To Install Phoenix Framework on CentOS 7

Phoenix Framework on CentOS 7

Phoenix is an emerging Elixir-based web development framework. It is intended to supply high development productivity, rich features, and strong runtime functionality.

Table of Contents

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

Step 2. Installing Required Packages.

Step 3. Installing Erlang.

Step 3. Installing Elixir.

Step 4. Installing Phoenix Framework.

Step 5. Installing PostgreSQL.

Step 6. Installing inotify-tools.

Step 7. Create a Phoenix application.

Step 8. Accessing Phoenix Framework.

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 the Phoenix Framework on a CentOS 7 server.
Install Phoenix Framework 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 Required Packages.

Install necessary packages:

yum install gcc gcc-c++ glibc-devel make ncurses-devel openssl-devel autoconf java-1.8.0-openjdk-devel wxBase.x86_64

Step 3. Installing Erlang.

First, Add Erlang official repository to install the latest Erlang:

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

Install Erlang using command:

yum update
yum install erlang

Verify whether Erlangis installed or not by using the following command:

erl

Step 3. Installing Elixir.

First, Git clone to the Elixir repository:

git clone https://github.com/elixir-lang/elixir.git

Next, Go to the elixir directory:

cd elixir/
make clean test

Now, It is highly recommended to add Elixir’s bin path to your PATH environment variable:

export PATH="$PATH:/root/elixir/bin"

Verify whether Elixiris installed or not by using the following command:

iex

Step 4. Installing Phoenix Framework.

Use the following command to install Phoenix:

mix archive.install https://github.com/phoenixframework/archives/raw/master/phoenix_new.ez

Step 5. Installing PostgreSQL.

You can install PostgreSQL using YUM:

yum install -y postgresql-server
postgresql-setup initdb

Start the postgresql service:

systemctl start postgresql.service
systemctl enable postgresql.service

Set a password for the default PostgreSQL user “postgres”:

sudo -u postgres psql

Setup the database user authentication method:

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

Find the following section:

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

Modify the authentication method of IPv4 local connections to md5:

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

Restart the postgresql service to take effect:

systemctl restart postgresql.service

Step 6. Installing inotify-tools.

Use the following command to install a required component “inotify-tools”:

yum install inotify-tools

Step 7. Create a Phoenix application.

Assume that you want to create a Phoenix application in the directory ~/idroot_project_1:

mix phoenix.new ~/wpcademy_project_1

This command will create the application directory ~/idroot_project_1 for you. Get into the directory and create a database:

cd ~/wpcademy_project_1
mix ecto.create

Fire up your application with the following command:

mix phoenix.server

Step 8. Accessing Phoenix Framework.

Phoenix Framework will be available on HTTP port 4000 by default. Open your favorite browser and navigate to http://yourdomain.com:4000/ or http://server-ip:4000 and complete the required the steps to finish the installation.

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

How To Install JuliaLang on CentOS 7

JuliaLang on CentOS 7

Julia, commonly called JuliaLang, is a programming language for numerical computing. Julia is as fast as C but it doesn’t forfeit the readability. Therefore, we can decrease the running time of our programs in addition to the evolution time.

Table of Contents

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

Step 2. Installing Required Packages.

Step 3. Installing JuliaLang.

 

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 the JuliaLang on a CentOS 7 server.
Install JuliaLang 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 Required Packages.

Install necessary packages:

yum-config-manager --add-repo https://copr.fedorainfracloud.org/coprs/nalimilan/julia/repo/epel-7/nalimilan-julia-epel-7.repo

Step 3. Installing JuliaLang.

Install Julia using following command:

yum install julia

New versions are built every night. If you have already installed julia and you want to upgrade to the latest version, do:

yum upgrade julia

Verify JuliaLang:

Type ./julia –version in the command prompt and the output should look like this:

julia version 0.6.0

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

How To Install HipHop Virtual Machine on CentOS 7

HipHop Virtual Machine on CentOS 7

HipHop Virtual Machine (HHVM) is a virtual machine developed and open sourced by Facebook to process and execute programs and scripts written in PHP. Facebook developed HHVM because the regular Zend+Apache combination isn’t as efficient to serve large applications built in PHP.

Table of Contents

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

Step 2. Installing Required Dependency.

Step 3. Installing HipHop Virtual Machine (HHVM) on CentOS 7.

Step 4. Config Setup HHVM.

 

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 the HipHop Virtual Machine (HHVM) on a CentOS 7 server.
Install HipHop Virtual Machine 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 Required Dependency.

Install the dependencies for the HHVM installation:

yum localinstall http://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-5.noarch.rpm
yum localinstall http://rpms.famillecollet.com/enterprise/remi-release-7.rpm
yum install cpp gcc-c++ cmake3 git psmisc {binutils,boost,jemalloc,numactl}-devel \
{ImageMagick,sqlite,tbb,bzip2,openldap,readline,elfutils-libelf,gmp,lz4,pcre}-devel \
lib{xslt,event,yaml,vpx,png,zip,icu,mcrypt,memcached,cap,dwarf}-devel \
{unixODBC,expat,mariadb}-devel lib{edit,curl,xml2,xslt}-devel \
glog-devel oniguruma-devel ocaml gperf enca libjpeg-turbo-devel openssl-devel \
mariadb mariadb-server {fastlz,double-conversion,re2}-devel make -y

Step 3. Installing HipHop Virtual Machine (HHVM) on CentOS 7.

Ok now we have the server ready lets get and build hhvm:

cd /tmp
git clone https://github.com/facebook/hhvm -b master hhvm --recursive
cd hhvm

Time to build:

cmake \
-DLIBMAGICKWAND_INCLUDE_DIRS="/usr/include/ImageMagick-6" \
-DLIBMAGICKCORE_LIBRARIES="/usr/lib64/libMagickCore-6.Q16.so" \
-DLIBMAGICKWAND_LIBRARIES="/usr/lib64/libMagickWand-6.Q16.so" .
make -j$(($(nproc)+1))
./hphp/hhvm/hhvm --version
sudo make install

Step 4. Config Setup HHVM.

First create some folders:

mkdir /etc/hhvm
mkdir /var/run/hhvm
mkdir /var/log/hhvm
mkdir /var/tmp/hhvm
mkdir -p /usr/share/hhvm/hdf/
chmod 775 /var/run/hhvm
chmod 777 /var/tmp/hhvm

Next add some config files:

nano /etc/hhvm/server.hdf

Add following files:

PidFile = /var/run/hhvm/pid
Server {
Port = 9000
SourceRoot = /var/www/
DefaultDocument = index.php
}
Log {
Level = Warning
AlwaysLogUnhandledExceptions = true
RuntimeErrorReportingLevel = 8191
UseLogFile = true
UseSyslog = false
File = /var/log/hhvm/error.log
Access {
* {
File = /var/log/hhvm/access.log
Format = %h %l %u % t \"%r\" %>s %b
}
}
}
Repo {
Central {
Path = /var/tmp/hhvm/.hhvm.hhbc
}
}
#include "/usr/share/hhvm/hdf/static.mime-types.hdf"
StaticFile {
FilesMatch {
* {
pattern = .*\.(dll|exe)
headers { 
* = Content-Disposition: attachment 
}
}
}
Extensions : StaticMimeTypes
}
MySQL {
TypedResults = false
}

Next, Adding the service:

nano /usr/lib/systemd/system/hhvm.service

Add following files:

[Unit]
Description=HHVM HipHop Virtual Machine (FCGI)
[Service]
ExecStart=/usr/local/bin/hhvm --config /etc/hhvm/server.hdf --user nobody --mode daemon -vServer.Type=fastcgi -vServer.Port=9000
[Install]
WantedBy=multi-user.target

Reload the systemd service, start hhvm and add it to be started at boot time:

systemctl enable hhvm
systemctl start hhvm
systemctl status hhvm

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

How To Install Rancher on CentOS 7

Rancher on CentOS 7

The rancher is an open source program which helps you to run the containers in production. The rancher is based on Docker, which means it’s possible to run it on a dedicated box, KVM machine or perhaps on a LXC container. Rancher provides a huge library of applications which are installed in a few clicks and also supports docker pictures from Dockerhub.

Table of Contents

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

Step 2. Installing Docker.

Step 3. Installing Rancher.

Step 4. Configure Firewall for Rancher.

Step 5. Accessing Rancher.

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 Rancher private container service on a CentOS 7 server.
Install Rancher 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 Docker.

Before we install the Rancher server, we have to install the docker machine. If you do not have docker installed, you can follow our guide here.

Step 3. Installing Rancher.

On the Linux machine with Docker installed, the command to start a single instance of Rancher is simple:

docker run -d --restart=unless-stopped -p 8080:8080 rancher/server:stable

Step 4. Configure Firewall for Rancher.

Rancher server uses port 8080 for the web interface. Configure the firewall to allow port 8080 and reload it:

firewall-cmd --zone=public --add-port=8080/tcp --permanent
firewall-cmd --reload

Step 5. Accessing Rancher.

Rancher will be available on HTTP port 8080 by default. Open your favorite browser and navigate to http://yourdomain.com:8080 or http://server-ip:8080 and complete the required the steps to finish the installation.

*Rancher doesn’t configure access control by default, so it is important to set this up immediately, otherwise the UI and API can be accessed by anyone who has your IP.

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

How To Install LiteCart on CentOS 7

LiteCart on CentOS 7

LiteCart is a free e-commerce, feature rich e-commerce solution. The framework is constructed to be lightweight and easy for developers to modify and build upon. LiteCart relies on the latest HyperText standard HTML 5, the latest CSS 3 for styling, the amazing jQuery framework for client-side dynamics, and the popular web scripting language PHP for server-side dynamics.

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

Step 4. Configuring MariaDB for LiteCart.

Step 5. Configure Apache web server for LiteCart.

Step 6. Accessing LiteCart e-commerce.

 

 

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 LiteCart e-commerce on a CentOS 7 server.
Install LiteCart 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 LiteCart.

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

unzip litecart-2.0.2.zip -d litecart

We will need to change some folders permissions:

chown -R chown apache:apache -R litecart/

Step 4. Configuring MariaDB for LiteCart.

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

MariaDB [(none)]> CREATE DATABASE lite DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_general_ci;
MariaDB [(none)]> GRANT ALL PRIVILEGES ON lite.* TO 'liteuser'@'localhost' IDENTIFIED BY 'strong_password';
MariaDB [(none)]> FLUSH PRIVILEGES;
MariaDB [(none)]> \q

Step 5. Configure Apache web server for LiteCart.

We will create Apache virtual host for your LiteCart 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/litecart/"
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/litecart/">
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. Accessing LiteCart e-commerce.

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