How to install wordpress with hhvm and nginx on centos 7

Nginx or engine-x is a lightweight web server with high performance and low memory consumption. Database concepts On CentOS, we can use yum to install the Nginx packages. Database icon Make sure you are logged in as root user!

To ensure Nginx is running on our server, visit the server IP address with your browser, or use the curl command as shown below to get the results:

MariaDB is an open source database developed by the original MySQL developer Monty Widenius, it has been forked from the MySQL database but stays compatible with it in its major functions. Database versioning In this step, we will install MariaDB and configure the root password for the MariaDB database.

Database 2013 Then we will create a new database and new user that are required for our WordPress installation.

MariaDB has been started, and now we have to configure the root password for the mariadb/mysql database. Database cursor Type in the command below to setup the MariaDB root password.

Set root password? [Y/n] Y New password: Re-enter new password: Remove anonymous users? [Y/n] Y … Database list Success! Disallow root login remotely? [Y/n] Y … Database queries must be Success! Remove test database and access to it? [Y/n] Y Reload privilege tables now? [Y/n] Y … Database journal Success!

The MariaDB root password has been configured. Data recovery boston Now login to the MariaDB/MySQL shell and create a new database “wordpressdb” and a new user “wpuser” with password “wpuser@” for our WordPress installation. Database connection Choose a secure password for your installation!

create database wordpressdb; create user [email protected] identified by ‘wpuser@’; grant all privileges on wordpressdb.* to [email protected] identified by ‘wpuser@’; flush privileges; \q

For the HHVM installation, we need to install many dependencies. S memo data recovery We can install HHVM from source by downloading the source from github, or installing prebuilt packages that are available on the internet. Database structure In this tutorial, I will install HHVM from prebuilt packages.

yum -y install cpp gcc-c++ cmake 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 libc-client make

In order to use the php command, we can set the hhvm command as php. Data recovery iso So when you type ‘php’ on the shell, you will see the same result as from the hhvm command.

In this step, we will configure HHVM. Iphone 6 data recovery software We will run hhvm as a systemd service. Cpu z database Instead of running it on a system port, we will run hhvm on a unix socket file which is faster.

Paste the service configuration belowinto that file. Data recovery kickass [Unit] Description=HHVM HipHop Virtual Machine (FCGI) nginx.service mariadb.service [Service] ExecStart=/usr/local/bin/hhvm –config /etc/hhvm/server.ini –user nginx –mode daemon -vServer.Type=fastcgi -vServer.FileSocket=/var/run/hhvm/hhvm.sock [Install]

In the hhvm service file, we’ve defined that hhvm is running under the ‘nginx’ user, so we must change the owner of the socket file directory to the ‘nginx’ user. A database can best be described as Then we must change the SELinux context of the hhvm directoryto allow access to the socket file.

After rebooting the server, hhvm will not be running because there is no directory for the socket file, so we must create it automatically at the boot time.

Paste configuration below to the end of line. Os x database mkdir -p /var/run/hhvm/ chown -R nginx:nginx /var/run/hhvm/ semanage fcontext -a -t httpd_var_run_t “/var/run/hhvm(/.*)?” restorecon -Rv /var/run/hhvm

In this step, we will configure HHVM to run with the Nginx web server. Database field We need to create a new hhvm configuration file in the Nginx directory.

Paste the configuration below: location ~ \.(hh|php)$ { root /usr/share/nginx/html; fastcgi_keep_conn on; fastcgi_pass unix:/var/run/hhvm/hhvm.sock; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include fastcgi_params; }

In this step, we will create a new virtual host configuration with Nginx and hhvm. Data recovery diy I will use the domain name “” for this example. Database transaction Please use your own domain name and replace it in the configuration files and WordPress installation wherever it appears.