How To Install OpenVPN on CentOS 7

OpenVPN on CentOS 7

OpenVPN is an open source application which is widely used to create secure virtual private networks over the unsecured public Internet. OpenVPN is an SSL VPN solution which drains your system connection securely through the Internet. OpenVPN functions in the client server structure. All the devices connected to a virtual private network act as if they’re linked to your local area network. The packets sent through the VPN tunnel are encrypted with 256 bit AES encryption making data theft impossible.

Table of Contents

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

Step 2. Installing OpenVPN on CentOS 7.

Step 3. Configuring Easy-rsa.

Step 4. Generating a server key and certificate.

Step 5. OpenVPN server configuration.

Step 6. Configure Iptables for OpenVPN.

Step 7. Create client certificate and key.

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 OpenVPN open source virtual private network on a CentOS 7 server.
Install OpenVPN 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 OpenVPN on CentOS 7.

We will now install OpenVPN and Easy-RSA package. The Easy-RSA package is provided so we can have an easier way of generating certificates:

yum install openvpn easy-rsa

Step 3. Configuring Easy-rsa.

Now that you have installed OpenVPN successfully, you have to create keys and certificates, follow this section step by step:

mkdir -p /etc/openvpn/easy-rsa/keys

Next, we will copy the certificate generation scripts from their default location to our OpenVPN folder:

cp -rf /usr/share/easy-rsa/2.0/* /etc/openvpn/easy-rsa

We will go to the easy-rsa directory and source the variables:

cd /etc/openvpn/easy-rsa
source ./vars

Then run “./clean-all” right away to ensure that we have a clean certificate setup:

./clean-all

Now you have to generate a “Certificate Authority (ca)” file. you will be asked for country name etc. that you edited in the “vars” file. you can hit “Enter” to accept your default values.

Now move to the following directory:

cd /etc/openvpn/easy-rsa/2.0/
./build-ca

Step 4. Generating a server key and certificate.

Run the command below in the current directory:

./build-key-server server

We will also need to create a Diffie-Hellman file. Creation of this file will depends on the length of the key. For this default we will use 2048 bit key but you can always change it by editing the vars file in the easy-rsa folder:

./build-dh

Step 5. OpenVPN server configuration.

We will now configure the OpenVPN server. First, create a configuration file named server.conf:

nano /etc/openvpn/server.conf

Paste the configurations below (you may change the values of port etc.):

local 192.168.77.20
port 443
proto tcp
dev tun
tun-mtu 1500
tun-mtu-extra 32
mssfix 1450
ca /etc/openvpn/easy-rsa/2.0/keys/ca.crt
cert /etc/openvpn/easy-rsa/2.0/keys/server.crt
key /etc/openvpn/easy-rsa/2.0/keys/server.key
dh /etc/openvpn/easy-rsa/2.0/keys/dh1024.pem
server 10.8.0.0 255.255.255.0
#-ifconfig-pool-persist ipp.txt
push "redirect-gateway def1"
push "dhcp-option DNS 8.8.8.8"
push "dhcp-option DNS 4.2.2.1"
keepalive 2 30
comp-lzo
persist-key
persist-tun
status 443status.log
log-append 443log.log
verb 3

Save the file and enable and start the OpenVPN service:

systemctl enable openvpn@server
systemctl start openvpn@server

Step 6. Configure Iptables for OpenVPN.

We will need to enter some iptable rules to enable internet on the client machine:

### KVM ###
iptables -t nat -A POSTROUTING -s 10.8.0.0/24 -o eth0 -j MASQUERADE

### OpenVZ ###
iptables -t nat -A POSTROUTING -s 10.8.0.0/24 -j SNAT --to 192.168.77.20
iptables-save

Next, edit systctl.conf to enable packet forwarding:

nano /etc/sysctl.conf

Add the line:

net.ipv4.ip_forward=1

Step 7. Create client certificate and key.

The following commands will generate a client certificate and key:

nano client

Add following line:

cd /etc/openvpn/easy-rsa/2.0/
echo -en "Nama Client: "
read client
echo -en "Server IP: "
read servip
echo -en "TCP or UDP?: "
read proto
echo -en "Server port: "
read servport
. ../vars
source ./vars
echo "####################################"
echo "Feel free to accept default values"
echo "####################################"
./build-key $client
cd /etc/openvpn/easy-rsa/2.0/keys
rm -rf $client
echo "client
dev tun
proto $proto
remote $servip $servport
resolv-retry infinite
nobind
tun-mtu 1500
tun-mtu-extra 32
mssfix 1450
persist-key
persist-tun
ca ca.crt
cert $client.crt
key $client.key
;auth-user-pass
comp-lzo
verb 3" > $client.ovpn
mkdir d${client}
cp ${client}* d${client}
cp ca.crt d${client}
mv d${client} $client
zip -r $client.zip $client
cp $client.zip /var/www/html
echo "Now grab the $client.zip file and extract it under your Openvpn\config dir!"

Set file permissions and make executable:

chmod 755 client
./client

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

How To Install Wagtail on CentOS 7

Wagtail on CentOS 7

Wagtail is a free and open source Content Management System written in Python and constructed on Django. It is easy, fast, beautiful and provides a fast, appealing interface for both editors. Wagtail is a flexible Django content management program focused on flexibility and consumer expertise.

Table of Contents

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

Step 2. Installing Required Packages.

Step 3. Create a new system user.

Step 4. Installing Wagtail.

Step 5. Create a python virtual environment and your Wagtail project.

Step 6. Installing and configure Nginx and uWSGI.

Step 6. Wagtail 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 Wagtail CMS on a CentOS 7 server.
Install Wagtail 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 python-pip python-virtualenv pcre-devel python-imaging python-devel libjpeg-turbo-devel make gcc -y

Step 3. Create a new system user.

Before installing Wagtail, you will need to create a new system user for Wagtail:

adduser --comment 'Wagtail User' --home-dir /home/wagtail wagtail
chmod 755 /home/wagtail

Step 4. Installing Wagtail.

Next, install Wagtail with the pip command as below:

pip install wagtail

Step 5. Create a python virtual environment and your Wagtail project.

Once Wagtail is installed, you will need to create a python virtual environment and your Wagtail project:

su - wagtail

Create a new Wagtail project:

wagtail start mysite

Create a new virtualenv using the following command:

virtualenv wagtail-env

Switch to the new virtualenv:

source ~/wagtail-env/bin/activate

Next, install all the required dependencies by running the pip command:

cd mysite
pip install -r requirements.txt

Next, create a new SQLite database:

python manage.py migrate
python manage.py createsuperuser

Step 6. Installing and configure Nginx and uWSGI.

Add the official Nging repository first:

rpm -Uvh http://nginx.org/packages/centos/7/noarch/RPMS/nginx-release-centos-7-0.el7.ngx.noarch.rpm

Once Nginx repository is installed, install Nginx with the following command:

yum install nginx -y

Next, create a new Nginx vhost:

nano /etc/nginx/conf.d/YOUR_WAGTAIL_DOMAIN.conf

Add the following lines:

server {
 server_name your-domain;
 
 client_body_in_file_only clean;
 client_body_buffer_size 64K;
 client_max_body_size 40M;
 sendfile on;
 send_timeout 300s;

error_log /var/log/nginx/mywagtailsite_error.log;
 access_log /var/log/nginx/mywagtailsite_access.log;

location / {
 uwsgi_pass unix:/home/wagtail/mysite/mysite/wagtail.socket;
 include /etc/nginx/uwsgi_params;
 uwsgi_param UWSGI_SCHEME $scheme;
 uwsgi_param SERVER_SOFTWARE nginx/$nginx_version;
 }
}

Next, you will need to install uWSGI to your server:

pip install --upgrade uwsgi

Create uwsgi configuration file for Wagtail:

mkdir /etc/uwsgi.d/
nano /etc/uwsgi.d/wagtail.ini

Add the following lines:

[uwsgi]
chmod-socket = 666
virtualenv = /home/wagtail/wagtail-env
mount = /=wsgi:application
chdir = /home/wagtail/mysite/
wsgi-file = mysite/wsgi.py
socket = /home/wagtail/mysite/mysite/%n.socket
stats = /home/wagtail/mysite/mysite/%n.stats.socket
logto = /home/wagtail/mysite/mysite/%n.log
workers = 4
uid = wagtail
gid = wagtail
limit-as = 512

Next, create a new service file for Wagtail:

nano /etc/systemd/system/uwsgi.service

Add the following code lines:

[Unit]
Description=uWSGI Emperor Service
After=syslog.target

[Service]
ExecStart=/usr/bin/uwsgi --master --die-on-term --emperor /etc/uwsgi.d
ExecReload=/bin/kill -HUP $MAINPID
KillSignal=SIGINT
Restart=always
Type=notify
StandardError=syslog
NotifyAccess=all

[Install]
WantedBy=multi-user.target

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

systemctl enable uwsgi
systemctl start uwsgi

Finally, start Nginx service and enable it to start on boot time with the following command:

systemctl enable nginx
systemctl start nginx

Step 6. Wagtail CMS.

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

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.