Monday, April 14, 2014

Installing HHVM 3.0.1 on Centos 6.5 (64-bit)

3.0.0 is the latest series in the HHVM world. In order to upgrade/install the 3.0.1 package. Follow these instructions

Compared to 2.4 HHVM release, the following packages were upgraded from the stock centos repository. Please be aware of these.

  1. ocaml (from 3.11 to 3.12)
  2. ImageMagick (from 6.5 to 6.8)

If you are here for the first time, configure hop5.in repo like this

 
cd /etc/yum.repos.d
sudo wget http://www.hop5.in/yum/el6/hop5.repo 
After that do a simple

[root@node1 ~]# yum clean all
Loaded plugins: fastestmirror
Cleaning repos: base elrepo epel extras hop5 mod-pagespeed nginx nikoforge pgdg92 rpmforge rpmforge-extras
              : rpmfusion-free-updates rpmfusion-nonfree-updates updates
Cleaning up Everything
Cleaning up list of fastest mirrors
 
[root@node1 ~]# yum install hhvm
Loaded plugins: fastestmirror
Determining fastest mirrors
epel/metalink                                                                                           |  14 kB     00:00
 * base: mirrors.advancedhosters.com
 * elrepo: ftp.nluug.nl
 * epel: epel.mirror.constant.com
 * extras: mirrors.lga7.us.voxel.net
 * rpmforge: mirror.nl.leaseweb.net
 * rpmforge-extras: mirror.nl.leaseweb.net
 * rpmfusion-free-updates: mirror.us.leaseweb.net
 * rpmfusion-nonfree-updates: mirror.us.leaseweb.net
 * updates: mirror.lug.udel.edu
base                                                                           | 3.7 kB     00:00
base/primary_db                                                                | 4.4 MB     00:01
elrepo                                                                         | 2.9 kB     00:00
elrepo/primary_db                                                              | 625 kB     00:00
epel                                                                           | 4.4 kB     00:00
epel/primary_db                                                                | 6.0 MB     00:01
extras                                                                         | 3.4 kB     00:00
extras/primary_db                                                              |  19 kB     00:00
hop5                                                                           | 2.9 kB     00:00
hop5/primary_db                                                                | 153 kB     00:00
mod-pagespeed                                                                  |  951 B     00:00
mod-pagespeed/primary                                                          | 5.1 kB     00:00
mod-pagespeed                                                                  32/32
nginx                                                                          | 2.9 kB     00:00
nginx/primary_db                                                               |  28 kB     00:00
nikoforge                                                                      | 1.3 kB     00:00
nikoforge/primary                                                              | 3.8 kB     00:00
nikoforge                                                                      8/8
pgdg92                                                                         | 3.7 kB     00:00
pgdg92/primary_db                                                              | 102 kB     00:00
rpmforge                                                                       | 1.9 kB     00:00
rpmforge/primary_db                                                            | 2.7 MB     00:00
rpmforge-extras                                                                | 1.9 kB     00:00
rpmforge-extras/primary_db                                                     | 471 kB     00:00
rpmfusion-free-updates                                                         | 2.7 kB     00:00
rpmfusion-free-updates/primary_db                                              | 267 kB     00:00
rpmfusion-nonfree-updates                                                      | 2.2 kB     00:00
rpmfusion-nonfree-updates/primary_db                                           |  65 kB     00:00
updates                                                                        | 3.4 kB     00:00
updates/primary_db                                                             | 2.6 MB     00:01
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package hhvm.x86_64 0:2.4.0-1.el6 will be updated
---> Package hhvm.x86_64 0:3.0.1-1.el6 will be an update
--> Finished Dependency Resolution

Dependencies Resolved

===============================================================================================================================
 Package                    Arch                         Version                              Repository                  Size
===============================================================================================================================
Updating:
 hhvm                       x86_64                       3.0.1-1.el6                          hop5                       9.4 M

Transaction Summary
===============================================================================================================================
Upgrade       1 Package(s)

Total download size: 9.4 M
Is this ok [y/N]: y
Downloading Packages:
hhvm-3.0.1-1.el6.x86_64.rpm                                                                             | 9.4 MB     00:00
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Updating   : hhvm-3.0.1-1.el6.x86_64                                                                                     1/2
  Cleanup    : hhvm-2.4.0-1.el6.x86_64                                                                                     2/2
  Verifying  : hhvm-3.0.1-1.el6.x86_64                                                                                     1/2
  Verifying  : hhvm-2.4.0-1.el6.x86_64                                                                                     2/2

Updated:
  hhvm.x86_64 0:3.0.1-1.el6

Complete!
[root@node1 ~]#  
If you are upgrading from previous hiphop-php Package, Just do a
[root@node1 ~]# yum update hiphop-php

After this, check that hhvm is installed correctly

[root@node1 ~]# hhvm --version
HipHop VM 3.0.1 (rel)
Compiler: 
Repo schema: e69de29bb2d1d6434b8b29ae775ad8c2e48c5391

Have fun with this new and improved release.


19 comments:

  1. Hello :-)
    Thanks for greatest posting.

    I successfully installed hhvm.
    but It seems didn't work, Could u help me?

    Like this.
    [root@localhost ~]# hhvm --version
    hhvm: symbol lookup error: hhvm: undefined symbol: _ZN61FLAG__namespace_do_not_use_directly_use_DECLARE_int32_instead7FLAGS_vE


    somebody saids this is belong to glog version issue
    https://github.com/facebook/hhvm/issues/1298#issuecomment-32965323
    (need glog 0.3.2, not 0.3.3)

    but i already got glog 0.3.2.1-1
    :-O


    thank you

    ReplyDelete
    Replies
    1. Hello,

      Could you try using the glog-0.3.2-1.el6.x86_64 version from hop5 repository and see if it works. ?

      Thanks.

      Delete
    2. Yeah. sure.

      [root@localhost ~]# yum list glog glog-devel
      Loaded plugins: fastestmirror, security
      Loading mirror speeds from cached hostfile
      * base: mirror.fairway.ne.jp
      * epel: ftp.riken.jp
      * extras: www.ftp.ne.jp
      * updates: www.ftp.ne.jp
      Installed Packages
      glog.x86_64 0.3.2-1.el6 @hop5
      glog-devel.x86_64 0.3.2-1.el6 @hop5

      I already installed that version (dependency installed by hhvm 3.0.1-1.el6)

      Thanks to reply my question!
      have a good day :-)

      Delete
  2. Thank you. successfully installed hhvm

    I remove old glog and reinstall that version.

    thank you.

    ReplyDelete
  3. Hello Naresh,

    I've tried your package of HHVM 3 and I found that you have pretty simple and non-chkconfig init.d file.
    I would like to assist you in creating proper init.d, sample config, etc., but I need an src.rpm, unfortunately could not find it in hop5 repo.
    It would be great if you could contact me via Skype or Hangouts in order to discuss my proposal.
    Skype: maxim.ivaschenko (Kiev, Ukraine).
    Hangouts: maxim.ivaschenko

    ReplyDelete
  4. works great, you are the best!

    ReplyDelete
  5. Great work! :) Got it working with Apache 2.4 mod_proxy_fcgi and running in fcgi socket mode

    ReplyDelete
  6. Hi i am getting error while installing on centos 6.5
    boost-system-1.50.0-1.el6.x86_64 (hop5) Not Found
    please help me in this

    ReplyDelete
    Replies
    1. 3.x series needs 1.54 version of boost. Could you do a yum clean all and see if the error goes away ?

      If you already have other packages which have hard dependency on lower version of boost. its difficult to install hhvm.

      Delete
  7. Is anybody having any success in getting HHVM to recognize their php.ini file? Here's the command line I'm using to start HHVM --

    hhvm --mode daemon -vServer.Type=fastcgi -vServer.Port=9000 --user HHVMUser -c /etc/hhvm/server.hdf -c /etc/hhvm/php.ini &

    ReplyDelete
  8. Hi Naresh,

    Could you please publish your src.rpm's? It would be great to be able to build this ourselves.

    Thanks!

    ReplyDelete
    Replies
    1. Hi Patrick,

      Please download it from http://www.hop5.in/yum/el6/hhvm-3.0.1-3.el6.src.rpm

      Cheers!

      Delete
  9. Hi Naresh, I was testing this lib and realized newrelic extension doesnt work with it. I tried compiling one but realized your packages dont come with hphpize, are you planning on releasing a -devel package?

    ReplyDelete
    Replies
    1. Yea, i will try to package the hphpize sometime ...

      Delete
    2. Hi
      Can you suggest an alternative to hphpize?
      I am trying to build mongoldb driver for hhvm on amazon linux, but unable to find hhvm-dev rpm.

      Thanks
      Nidhi

      Delete
  10. Hello Naresh,

    I am getting the following error when installing hhvm:

    --> Finished Dependency Resolution
    Error: Package: hhvm-3.0.1-3.el6.x86_64 (hop5)
    Requires: libdwarf >= 20130729-1.el6
    Available: libdwarf-20120410-2.el6.x86_64 (hop5)
    libdwarf = 20120410-2.el6
    Error: Package: hhvm-3.0.1-3.el6.x86_64 (hop5)
    Requires: libmcrypt >= 2.5.8-9
    Error: Package: hhvm-3.0.1-3.el6.x86_64 (hop5)
    Requires: libmcrypt.so.4()(64bit)
    Error: Package: hhvm-3.0.1-3.el6.x86_64 (hop5)
    Requires: libdwarf >= 20130729-1.el6
    Installing: libdwarf-20120410-2.el6.x86_64 (hop5)
    libdwarf = 20120410-2.el6
    You could try using --skip-broken to work around the problem
    You could try running: rpm -Va --nofiles --nodigest


    Please suggest.

    Thanks,
    Gurdeep.

    ReplyDelete
  11. Thanks got it working. Resolved the dependencies.

    ReplyDelete
  12. Hello,

    I get the following error when trying to start hhvm.
    Uncaught exception: no factory for server type "Fastcgi"\n

    any help would be appreciated!

    Thanks,
    Shawn

    ReplyDelete
  13. Hhvm is now 3.12 please update

    ReplyDelete