How VPS - How to use/setup VPS
  • Home
  • Management guides
    • Web servers software
      • Directadmin
      • Hocvps Script
      • Centmin Mod
      • CWP
      • Kloxo-MR
      • Plesk
    • Control Panels
    • Securing VPS/Servers
      • SSL Certificates
      • Upgrading
      • Authentication
  • Operating System
    • CentOS
    • Fedora
    • Debian
    • Linux
    • Arch
    • BSD
    • CoreOS
  • Reviews
  • Coupon
    • Domain Coupon
    • Hosting Coupon
No Result
View All Result
  • Home
  • Management guides
    • Web servers software
      • Directadmin
      • Hocvps Script
      • Centmin Mod
      • CWP
      • Kloxo-MR
      • Plesk
    • Control Panels
    • Securing VPS/Servers
      • SSL Certificates
      • Upgrading
      • Authentication
  • Operating System
    • CentOS
    • Fedora
    • Debian
    • Linux
    • Arch
    • BSD
    • CoreOS
  • Reviews
  • Coupon
    • Domain Coupon
    • Hosting Coupon
No Result
View All Result
How VPS - How to use/setup VPS
No Result
View All Result
Home Operating System Debian

Installing HHVM and Nginx/Apache on Ubuntu/Debian/Mint

How VPS by How VPS
November 1, 2019
in Debian
0
0
SHARES
28
VIEWS
Share on FacebookShare on Twitter

Contents

  1. A Word of Warning
  2. Supported Distributions
  3. Requirements
  4. Installing HHVM
    1. Ubuntu
    2. Debian
    3. Mint
  5. Configuring with Apache/Nginx
  6. Testing HHVM
  7. Want to contribute?


HHVM, or the HipHop Virtual Machine, is a virtual machine for PHP developed by Facebook to improve the performance of PHP applications. Unlike the regular PHP runtime, HHVM uses a just-in-time compiler to convert scripts into native machine code. As a result, third-party benchmarks have shown as much as a 3x load time reduction over PHP-FPM 5.4 for tasks like loading a regular Drupal website.

A Word of Warning

While very fast, HHVM is also still under development and may not run some software properly, or may not support some necessary extensions. Proceed with caution. For a list of supported, integrated PHP extensions, follow this link.

Supported Distributions

  • Ubuntu
    • 10.04 (lucid)
    • 12.04 (precise)
    • 14.04 (trusty)
  • Debian
    • 8 (jessie)
    • 7 (wheezy)
  • Mint
    • 16 (petra)

These are the distributions that Facebook and the HHVM maintainers will support, and the distributions that are still actively maintained for servers. While it is possible to install HHVM on an Ubuntu 14.10 server, doing so is not supported (at the time of writing) by HHVM and may result in bad things happening.

Requirements

  1. One of the distributions above.
  2. Root access for configuration installing packages.

Installing HHVM

Installing HHVM itself is quick and painless, involving not much more than configuring repositories and installing.

Ubuntu

For lucid (10.04) and precise (12.04) users only: Both versions of Ubuntu require the addition of repositories. To streamline the process, we need to make sure that the add-apt-repository command is ready. If you are not using lucid or precise, skip over this set of commands. Otherwise:

sudo apt-get update
sudo apt-get install python-software-properties

For lucid (10.04) users only: HHVM has a few more dependencies that are not included in the base system or repositories.

sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt-get update
sudo apt-get install gcc-4.8 g++-4.8 gcc-4.8-base

For precise (12.04) users only: You’ll also need to add a repository to obtain libraries needed to run HHVM.

sudo add-apt-repository ppa:mapnik/boost

HHVM also requires installing a GPG key for its repository.

wget -O - http://dl.hhvm.com/conf/hhvm.gpg.key | sudo apt-key add -

Once that’s done, we can add HHVM’s repository to a sources.list file.

echo deb http://dl.hhvm.com/ubuntu DISTRIBUTION_VERSION main | sudo tee /etc/apt/sources.list.d/hhvm.list

Make sure to replace DISTRIBUTION_VERSION with your Ubuntu version’s codename: lucid, precise, or trusty.

Now we can install.

sudo apt-get update
sudo apt-get install hhvm

And we’re done!

Debian

HHVM installation on Debian is similar to Ubuntu, but less fragmented across distributions. You’ll only need one set of commands for jessie or wheezy.

wget -O - http://dl.hhvm.com/conf/hhvm.gpg.key | sudo apt-key add -
echo deb http://dl.hhvm.com/debian DISTRIBUTION_VERSION main | sudo tee /etc/apt/sources.list.d/hhvm.list
sudo apt-get update
sudo apt-get install hhvm

Make sure to replace DISTRIBUTION_VERSION on the second line with your Debian version’s codename, jessie or wheezy. HHVM should now be installed.

Mint

Mint installation is also very similar to Debian in that it’s simplified.

wget -O - http://dl.hhvm.com/conf/hhvm.gpg.key | sudo apt-key add -
echo deb http://dl.hhvm.com/mint petra main | sudo tee /etc/apt/sources.list.d/hhvm.list
sudo apt-get update
sudo apt-get install hhvm

Since petra is the only supported Mint distribution at the moment, that’s it!

Configuring with Apache/Nginx

With HHVM comes a nifty configuration script that automatically sets up a CGI handler for either server.

If you are using Nginx, make sure to edit your server’s configuration file (by default /etc/nginx/sites-available/default) to disable FastCGI processing. Look for a section like the following and make sure it either does not exist or is entirely commented out (by adding # to the beginning of each line in the section):

# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
#
#location ~ /.php$ {
#       fastcgi_split_path_info ^(.+/.php)(/.+)$;
#       # NOTE: You should have "cgi.fix_pathinfo = 0;" in php.ini
#
#       # With php5-cgi alone:
#       fastcgi_pass 127.0.0.1:9000;
#       # With php5-fpm:
#       fastcgi_pass unix:/var/run/php5-fpm.sock;
#       fastcgi_index index.php;
#       include fastcgi_params;
#}

If you are using Apache, there’s nothing specific for you to do.

After that, simply run the following script.

sudo /usr/share/hhvm/install_fastcgi.sh

Testing HHVM

Apache or Nginx should automatically be configured and restarted, and HHVM should now be running on your server. To test it, you can either make a file like this:

<?php phpinfo();

And look for “HipHop” or “HHVM,” or you can run a script like this:

<?php if(defined('HHVM_VERSION')) { echo 'HHVM works!'; }

If “HHVM works!” appears, then you’re all set!

Want to contribute?

You could earn up to $300 by adding new articles

Submit your article
Suggest an update
Request an article
How VPS

How VPS

Related Posts

Debian

How to Install WonderCMS on Debian 9

November 1, 2019
Debian

Using MySQL Views on Debian 7

November 1, 2019
Debian

How to Install and Configure TaskBoard on Debian 9

November 1, 2019
Next Post

Installing Fork CMS on Debian 9

Install PBX in a Flash 5 on Debian 8

Install Openfire XMPP Server on a Debian VPS

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Follow Us

  • 121 Followers
  • 87.2k Followers

Recommended

How to Install ProcessWire CMS 3.0 on a CentOS 7 LAMP VPS

3 years ago

Apache 2 Redirects For “non-www” Sub-domains To “www”

3 years ago

Understanding Shell Commands Easily Using “Explain Shell” Script in Linux

4 years ago

Newsboat – An RSS/Atom Feed Reader for Linux Terminals

4 years ago

Instagram

    Please install/update and activate JNews Instagram plugin.

Categories

  • Arch
  • Authentication
  • Backups
  • BSD
  • Centmin Mod
  • CentOS
  • Control Panels
  • CoreOS
  • CWP
  • Debian
  • Directadmin
  • Encryption
  • Fedora
  • Firewalls
  • Hocvps Script
  • Hosting providers
  • Kloxo-MR
  • Linux
  • Mitigations
  • Operating System
  • Plesk
  • Reviews
  • Securing VPS/Servers
  • Security Patches
  • SSL Certificates
  • Uncategorized
  • Upgrading
  • VPS/Servers management guides
  • Vulnerability Detection
  • Web servers software
  • Webhosting Control Panel

Topics

Apache Web Server Bluehost Review 2019 Bluehost Review 2020 Bluehost Review 2021 Centmin Mod CentminMod centos install htop fsck htop install HTTP DoS attack Install Snort on an Ubuntu install Zabbix on CentOS install Zabbix on CentOS 7 Linux Commands linux guide linux install htop linux vps setup guide MariaDB MariaDB Error Mysql mysqld error optimize MariaDB optimize Mysql snort Ubuntu
No Result
View All Result

Highlights

Top Free Web Hosting Control Panels To Manage VPS/Dedicated Servers

Webmin Reviews

Virtualmin Reviews

CentOS Web Panel Reviews

Ajenti Reviews

ISPConfig Reviews

Trending

Failed to download metadata for repo 'appstream' on Centos 8
CentOS

How to fix error: Failed to download metadata for repo ‘appstream’ on Centos 8

by How VPS
February 25, 2022
0

I tried to update some extensions by use yum on centOs which I specified in Dockerfile. After...

How to Fix MySQL Error "Plugin 'InnoDB' registration as a STORAGE ENGINE failed"?

How to Fix MySQL Error “Plugin ‘InnoDB’ registration as a STORAGE ENGINE failed”?

November 17, 2020
How to optimize Mysql or MariaDB

How to optimize Mysql or MariaDB

November 3, 2020
Top Free Web Hosting Control Panels To Manage VPS/Dedicated Servers

Top Free Web Hosting Control Panels To Manage VPS/Dedicated Servers

February 17, 2020
Webmin Reviews

Webmin Reviews

February 17, 2020
How VPS – How to use/setup VPS

We bring you the best Premium WordPress Themes that perfect for news, magazine, personal blog, etc. Visit our landing page to see all features & demos.
LEARN MORE »

Recent News

  • How to fix error: Failed to download metadata for repo ‘appstream’ on Centos 8 February 25, 2022
  • How to Fix MySQL Error “Plugin ‘InnoDB’ registration as a STORAGE ENGINE failed”? November 17, 2020
  • How to optimize Mysql or MariaDB November 3, 2020

Categories

  • Arch
  • Authentication
  • Backups
  • BSD
  • Centmin Mod
  • CentOS
  • Control Panels
  • CoreOS
  • CWP
  • Debian
  • Directadmin
  • Encryption
  • Fedora
  • Firewalls
  • Hocvps Script
  • Hosting providers
  • Kloxo-MR
  • Linux
  • Mitigations
  • Operating System
  • Plesk
  • Reviews
  • Securing VPS/Servers
  • Security Patches
  • SSL Certificates
  • Uncategorized
  • Upgrading
  • VPS/Servers management guides
  • Vulnerability Detection
  • Web servers software
  • Webhosting Control Panel

[mc4wp_form]

© 2018 JNews - City News Magazine WordPress theme. All rights belong to their respective owners.
JNews is a top selling 2018 WordPress News, Blog, Newspaper & Magazine Theme.

No Result
View All Result
  • Home

© 2023 JNews - Premium WordPress news & magazine theme by Jegtheme.