UPDATED: 10/July/2013 - Fixed the errors which are causing repo not available. Sorry for the trouble.
UPDATEd: 19/Oct/2013 - HHVM 2.2.0 Release is available now
UPDATED: 18/Dec/2013 - HHVM 2.3.0 Release is available now
UPDATED: 14/Apr/2014 - HHVM 3.0.1 Release is available now
I have created a repository and compiled HHVM (v2 of HPHP) rpm packages. Follow these steps to get started.
1. Install Centos 6.x (minimal is preferred)
2. Install epel repository
(or get the latest version from http://ftp.riken.jp/Linux/fedora/epel/6/i386/repoview/epel-release.html)
3. download the hop5 repository configuration file
If you are here after Mar-2014, use hhvm as package name instead of hiphop-phpUPDATEd: 19/Oct/2013 - HHVM 2.2.0 Release is available now
UPDATED: 18/Dec/2013 - HHVM 2.3.0 Release is available now
UPDATED: 14/Apr/2014 - HHVM 3.0.1 Release is available now
I have created a repository and compiled HHVM (v2 of HPHP) rpm packages. Follow these steps to get started.
1. Install Centos 6.x (minimal is preferred)
2. Install epel repository
sudo yum install http://ftp.riken.jp/Linux/fedora/epel/6/i386/epel-release-6-8.noarch.rpm
(or get the latest version from http://ftp.riken.jp/Linux/fedora/epel/6/i386/repoview/epel-release.html)
3. download the hop5 repository configuration file
cd /etc/yum.repos.d sudo wget http://www.hop5.in/yum/el6/hop5.repo
4. Install hiphop-php
sudo yum install hiphop-php
5. Follow the instructions at https://github.com/facebook/hiphop-php to get started
Please note that, i have compiled the required rpms from fedora distribution. DO NOT FILE ANY BUGS WITH CENTOS/FEDORA regarding the rpms that you are about to install from this repoisitory.
http://www.hop5.in/yum/el6/hop5.repo
ReplyDeleteNo Route to host ....
This comment has been removed by the author.
ReplyDeletefixed. please try now.
DeleteThis comment has been removed by the author.
ReplyDeletedue to iptables. fixed them. please try and let me know.
ReplyDeleteI have installed with succes:
DeletePackage hiphop-php-2.1.210-1.el6.x86_64 installed
Now, how can i access the hhvm?
Thanks
its in /usr/bin/hhvm
Delete/usr/bin/hhvm --help will throw the options. read more docs on facebook wiki to get started
Yes it is :)
DeleteThanks for your GREAT WORK, you saved me hours of work.
you are welcome :-)
DeleteCould your provide the srpm for hiphop and gcc i need to rebuild for centos 5, i can manage other dependencies. Thank you.
ReplyDeletewww.hop5.in/yum/el6/hphp.spec get the spec file here, it has instructions on the top.
ReplyDeleteIn case you want srpms get them from here http://www.hop5.in/yum/el6/srpms/files.txt
Thank you Naresh.
ReplyDeleteyou are welcome Sunny.
ReplyDeleteAny reason why this uses libmemcached 0.49 and not a more recent version?
ReplyDeleteOriginally, i've compiled against 1.x. But, things didn't seem stable. so switched to the recommended version.
ReplyDeleteThanks a lot for your .spec file.
ReplyDeletei've added a BuildRequires cmake >= 2.8.5
Also, even if glog and glog-devel are installed, I have this error on compil (on Centos 6.4) :
undefined reference to `google::LogMessage::stream()'
Any idea ?
can you post the list of hhvm dependencies against which you are compiling ? that might help.
Delete502 Bad Gateway whenever i try to wget http://www.hop5.in/yum/el6/hop5.repo - any mirror available?
ReplyDelete502 Bad Gateway when I try to wget http://www.hop5.in/yum/el6/hop5.repo - tried multiple internet connections. Any mirrors available?
ReplyDeletefixed. please try now.
DeleteI'm stuck at trying to access:
ReplyDeletehttp://www.hop5.in/yum/el6/hop5.repo
502 Bad Gateway
Is there an alternative link? Thanks!
fixed server. please try now.
ReplyDeleteI still get the bad gaeway error.
ReplyDeleteplease try now.
Delete
ReplyDelete[root@root]# sudo hhvm -m server
mapping self...
mapping self took 0'00" (41620 us) wall time
loading static content...
searching all files under source root...
analyzing 7 files under source root...
loaded 0 bytes of static content in total
loading static content took 0'00" (8959 us) wall time
could not allocate 1210056703 bytes for translation cache
Can you help me with this., thanks where is the config file so i can change the default cache value, i am doing this on my test vps first so i can use it on prod server later on .
anyways thanks for your blog, its really very helpful to get going.
Create a configuration file and specify lower translation cache and pass it on to your hhvm with --config option. for example
Deletehhvm -m server --config /tmp/config.hdf
or
add more swap to your linux server (for the time being, if you are on amazon free instance). which will fix that translation cache error.
i found solution here
Deletehttps://www.facebook.com/hphp/posts/10151262575779326
i created issue at their github here
https://github.com/facebook/hiphop-php/issues/1037
Thanks
Specifically, default values are
DeleteEval {
JitASize = 536870912 #512MB
JitAStubsSize = 536870912 #512MB
JitGlobalDataSize = 134217728 #128MB
}
So, change them and put it in a config file and pass it to hhvm.
This comment has been removed by the author.
ReplyDeletehttp://www.hop5.in/yum/el6Server/repodata/repomd.xml: [Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 404 Not Found"
ReplyDeleteTrying other mirror.
Error: Cannot retrieve repository metadata (repomd.xml) for repository: hop5. Please verify its path and try again
Could you change the contents of hop5.repo to point to this as i currently have rpms only for centos 6
Delete[hop5]
name=Hiphop For PHP 6 - Base
baseurl=http://www.hop5.in/yum/el6/
gpgcheck=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-HOP5
sudo yum install ./epel-release-6-8.noarch.rpm
ReplyDeleteends up in the following error:
Examining ./epel-release-6-8.noarch.rpm: epel-release-6-8.noarch
Marking ./epel-release-6-8.noarch.rpm to be installed
Resolving Dependencies
--> Running transaction check
---> Package epel-release.noarch 0:6-8 will be installed
--> Processing Conflict: epel-release-6-8.noarch conflicts fedora-release
No package matched to upgrade: epel-release
--> Finished Dependency Resolution
Error: epel-release conflicts with fedora-release-19-4.noarch
How can I work around that?
epel is required only if you are centos/redhat distributions. Looks like you are using Fedora (due to the presence of fedora-release package).
DeleteCurrently, i have not tested the packages on Fedora (as all the package versions will be different). I'd suggest create a centos6 VM (use virtualbox) and inside the VM, try the steps. It should work.
Naresh, I installed on Ubuntu no worries. Am changing my server to centOS 6.4 and will be using this for the HHVM install. In the hope that you are quite the expert on HHVM I'm just pointing you to 2 questions I put forward on github. If you know anything about them please help, if not no worries :-)
ReplyDeletehttps://github.com/facebook/hhvm/issues/1202
https://github.com/facebook/hhvm/issues/1206
For https://github.com/facebook/hhvm/issues/1206 . Compile your project into single hhbc file and run your project in repo-authoritative mode. Every new build can create a new hhbc file. This is like pre-compiled version of your code and prevents any source code modifications in production.
Deletehttps://github.com/facebook/hhvm/issues/1202 hhvm has really basic web-server and supports basic rewrite. Put nginx in front of hhvm to make it really configurable.
Tried to install, I am seeing the following on CentOS 6.4:
ReplyDeleteError: Package: snapper-0.1.6-2.1.x86_64 (@filesystems_snapper)
Requires: libboost_system-mt.so.5()(64bit)
Removing: boost-system-1.41.0-17.el6_4.x86_64 (@updates)
libboost_system-mt.so.5()(64bit)
Updated By: boost-system-1.50.0-1.el6.x86_64 (hop5)
Not found
Available: boost-system-1.41.0-11.el6_1.2.x86_64 (base)
libboost_system-mt.so.5()(64bit)
Available: boost-system-1.41.0-15.el6_4.x86_64 (updates)
libboost_system-mt.so.5()(64bit)
Any thoughts?
Hello,
DeleteCould you remove snapper package and try installing the hiphop-php package. Looks like the snapper package was built with lower version of boost (the one that comes with centos). But, hhvm requires higher version of boost package.
Best.
When are you going to compile the latest version that facebook released today?
ReplyDeleteI am working on it. hhvm 2.3.0 needs gcc 4.7 or higher. Just now i have compiled gcc 4.8.2 for centos 6.4. HHVM should be available sometime this week.
DeleteHello,
ReplyDeletefail to `sudo wget http://www.hop5.in/yum/el6/hop5.repo`
http://www.hop5.in/ is now 404 not found.
Could you update to the domain?
switched providers. dns got messed up. please try now.
DeleteThanks so much!
DeleteNot able to access the repo, no route to host. :(
ReplyDeleteswitched providers. dns got messed up. please try now.
Delete"Nice blog.. Thanks for sharing this blog information with us…
ReplyDeletephp
Naresh, could you help me out setting HHVM up with Apache? Supporting multiple domains etc.
ReplyDeleteI couldn't get it working...
Hello Tamer,
DeleteHHVM currently has fastcgi implementation. Have you looked at the instructions available at http://www.hhvm.com/blog/1817/fastercgi-with-hhvm ?
AFAIK, Multi-domain support in HHVM are a WIP (though there are virtualhosts support) . Try to see if you can use http://httpd.apache.org/docs/2.2/vhosts/mass.html and fastcgi to get things working..
Let me know if you need anything else, i'll try to answer those.
Naresh, I have tried everything on the internet so far. All I get are Internal Server Errors.
DeleteI installed hhvm through yum install hhvm and your repo.
Then I installed apache with mod_fcg through: yum install httpd mod_fcgid.
I was not able to find on how to install mod_fastcgi on Apache, there is simply no documentation about installing this module on CentOS apache.
My hhvm.hdf config file is as follow:
http://paste.ee/p/xBKmR
Then I run the HHVM server by executing this command:
/usr/bin/hhvm --mode daemon --user web --config /etc/hhvm.hdf -vServer.Port=9000 -vServer.Type=fastcgi
My Apache config for an example host is as follow:
http://paste.ee/p/fVBOW
All I get are Internal Server Errors. HHVM is running correctly I assume.
Note that I am on CentOS 6.5.
Thanks again.
Please follow http://nareshv.blogspot.com/2014/02/configure-hhvm-with-apache-fastcgi-on.html
DeleteSince to the update to version HHVM-2.4.0-0-gc82fcd8e6199c500454b1a8b930a876ef2c1522b my wordpress blog will not show it's index anymore...
ReplyDeleteIf I visit the page with my browser I simply get a blank page but if I manually compile the page from command line I get the following error "HipHop Fatal error: Unexpected object type stdClass. in .../wp-includes/functions.php on line 130". I can browse as always the Admin Panel and I already tried changing the theme and disabling all the plugins...
I'm using Wordpress 3.8.1...
Do you have any idea on what's going on?
Looks like there is a bug in hhvm.
DeleteIn the wp-includes/functions.php change line 127 (wordpress 3.8.1 fresh download)
Change
$date_object = date_create( null, $timezone_object );
to
$date_object = date_create( "now", $timezone_object );
I have tested this locally and seem to work fine.
Thank you very much, now it's working...
DeleteVery strange bug, from what I understood HHVM throws an error when trying to manipulate an object that hasn't been initialized... Am I right?
Technically yes, But the bug is due to Zend Vs HHVm Implementation difference. I've filed a bug on your behalf https://github.com/facebook/hhvm/issues/1796 see that for some more details and actual fix if you are interested in.
Deletecheers!
Hey naresh,
ReplyDeleteTrying to install hhvm cause a multilib protection error
Protected multilib versions: libstdc++-4.8.2-8.el6.x86_64 != libstdc++-4.4.7-4.el6.i686
Protected multilib versions: libgcc-4.8.2-8.el6.x86_64 != libgcc-4.4.7-4.el6.i686
Is there by chance you will i the future provide i686 build of stdc and libgcc, so as e wont need to do a "-setopt=protected_multilib=false" ? :)
Thanks!
Hi Anthony,
DeleteI have very limited resources to maintain hhvm. If i include i686 also, then its going to be bit more problematic for me to manage. I'll try to see, but cannot promise anything. Hope you understand.
Thanks.
--> Finished Dependency Resolution
ReplyDeleteError: Package: gnote-0.6.3-3.el6.x86_64 (@base/$releasever)
Requires: libboost_filesystem-mt.so.5()(64bit)
Removing: boost-filesystem-1.41.0-17.el6_4.x86_64 (@updates)
libboost_filesystem-mt.so.5()(64bit)
Updated By: boost-filesystem-1.54.0-7.el6.x86_64 (hop5)
Not found
Available: boost-filesystem-1.41.0-18.el6.x86_64 (base)
libboost_filesystem-mt.so.5()(64bit)
Available: boost-filesystem-1.50.0-1.el6.x86_64 (hop5)
Not found
Error: Package: gnote-0.6.3-3.el6.x86_64 (@base/$releasever)
Requires: libboost_system-mt.so.5()(64bit)
Removing: boost-system-1.41.0-17.el6_4.x86_64 (@updates)
libboost_system-mt.so.5()(64bit)
Updated By: boost-system-1.54.0-7.el6.x86_64 (hop5)
Not found
Available: boost-system-1.41.0-18.el6.x86_64 (base)
libboost_system-mt.so.5()(64bit)
Available: boost-system-1.50.0-1.el6.x86_64 (hop5)
Not found
Error: Package: akonadi-1.2.1-2.el6.x86_64 (@base/$releasever)
Requires: libboost_program_options-mt.so.5()(64bit)
Removing: boost-program-options-1.41.0-17.el6_4.x86_64 (@updates)
libboost_program_options-mt.so.5()(64bit)
Updated By: boost-program-options-1.54.0-7.el6.x86_64 (hop5)
Not found
Available: boost-program-options-1.41.0-18.el6.x86_64 (base)
libboost_program_options-mt.so.5()(64bit)
Available: boost-program-options-1.50.0-1.el6.x86_64 (hop5)
Not found
You could try using --skip-broken to work around the problem
You could try running: rpm -Va --nofiles --nodigest
This is the rror i am getting can you please help me with this?
Matthew, I'd suggest installing hhvm on a vm first. It uses higher versions of boost/gcc packages which will conflict with other packages in the system.
DeleteIn order to continue on your current system, you need to remove "gnote" package 'yum remove gnote' and then install the hhvm packages. But, i'd not recommend this if the gnote app is heavily used by you.
Cheers !
Hi Naresh,
ReplyDeleteis it possible you could have a look on this issue thanks
https://github.com/facebook/hhvm/issues/2129
Hi Naresh,
ReplyDeleteThanks for the CentOS repo, installation of HHVM was a breeze! Not meaning to rush you, do you have plans to bump HHVM to the 3.0.0 release and if so, do you have somewhat of an ETA?
Hello Bas,
DeleteThanks for that.
Yea, i am closely watching 3.x release, Looks its only FastCGI based. I'll try to spin something, may be in the next couple of days.
Cheers!
Hi Naresh, any update on the 3.0.0 release for CentOS?
DeleteBest,
Tommy.
Error: Package: hhvm-3.0.1-3.el6.x86_64 (hop5)
ReplyDeleteRequires: libdwarf >= 20130729-1.el6
Installed: libdwarf-20120410-2.el6.x86_64 (@hop5)
libdwarf = 20120410-2.el6
Hi, not sure where you're getting your libdwarf from, but hop5 doesn't have a high enough version with -3
Hey, my bad, I didn't have EPEL on, found it in there
ReplyDeleteI have a lot of dependencies problems:
ReplyDeleteError: Package: hiphop-php-2.2.0-1.el6.x86_64 (hop5)
Requires: libboost_system.so.1.50.0()(64bit)
Available: boost-system-1.50.0-1.el6.x86_64 (hop5)
libboost_system.so.1.50.0()(64bit)
Available: boost-system-1.41.0-18.el6.i686 (base)
Not found
Installing: boost-system-1.54.0-7.el6.x86_64 (hop5)
Not found
Error: Package: hiphop-php-2.2.0-1.el6.x86_64 (hop5)
Requires: libboost_regex.so.1.50.0()(64bit)
Available: boost-regex-1.50.0-1.el6.x86_64 (hop5)
libboost_regex.so.1.50.0()(64bit)
Available: boost-regex-1.41.0-18.el6.i686 (base)
Not found
Installing: boost-regex-1.54.0-7.el6.x86_64 (hop5)
Not found
Error: Package: hiphop-php-2.2.0-1.el6.x86_64 (hop5)
Requires: libboost_filesystem.so.1.50.0()(64bit)
Available: boost-filesystem-1.50.0-1.el6.x86_64 (hop5)
libboost_filesystem.so.1.50.0()(64bit)
Available: boost-filesystem-1.41.0-18.el6.i686 (base)
Not found
Installing: boost-filesystem-1.54.0-7.el6.x86_64 (hop5)
Not found
Error: Package: hiphop-php-2.2.0-1.el6.x86_64 (hop5)
Requires: libboost_program_options.so.1.50.0()(64bit)
Available: boost-program-options-1.50.0-1.el6.x86_64 (hop5)
libboost_program_options.so.1.50.0()(64bit)
Available: boost-program-options-1.41.0-18.el6.i686 (base)
Not found
Installing: boost-program-options-1.54.0-7.el6.x86_64 (hop5)
Not found
You could try using --skip-broken to work around the problem
You could try running: rpm -Va --nofiles --nodigest
I'm running CentOS release 6.5 (Final) with PHP5.5, any advice
Hello ReynerPM,
DeleteOlder package was called hiphop-php. Later it was renamed to hhvm to be inline with the facebook's project name change.
I have updated the post to use "hhvm" as the package for the current release.
For now, in order to get out of the dependency hell, please do "sudo yum install hhvm" and you should be good. Let me know if things still doesn't work.
Cheers !
Naresh
When I install hhvm-pgsql i get the following error
ReplyDelete---> Package hhvm-pgsql.x86_64 0:3.0.1-3.el6 will be installed
--> Processing Dependency: hhvm = 3.0.1-3.el6 for package: hhvm-pgsql-3.0.1-3.el6.x86_64
--> Processing Dependency: postgresql92-libs >= 9.2.8-1PGDG.rhel6 for package: hhvm-pgsql-3.0.1-3.el6.x86_64
It appears that the hhvm-pgsql is not compatilbe with the hhvm version in your repo. Can you fix please?
Thanks!
Shawn
Nice article thanks for given this information. i hope it useful to many pepole.more php jobs in hyderabad.
ReplyDelete