CentOS 6.5 㧠HHVM ãã½ã¼ã¹ã³ã¼ããããã«ãããã®ã§ããã«ãæé ãç´¹ä»ãã¾ãã
CentOS ç¨ã®ãã¤ããªããã±ã¼ã¸ã¯ hop5 ã¨ããéå
¬å¼ã®ãªãã¸ããªã§å
¬éããã¦ãã¾ããããã¯ã以ä¸ã®ã¦ã§ããã¼ã¸ã®æé ã§å°å
¥ã§ãã¾ãã
Naresh: Installing HHVM 3.0.1 on Centos 6.5 (64-bit)
ã§ããããã®ããã±ã¼ã¸ã§ã¤ã³ã¹ãã¼ã«ãããã®ã¯ HHVM æ¬ä½ã ãã§ãHack ã®åãã§ãã« (hh_client, hh_server) ãªã©ã¯ä»å±ãã¾ãããããããå«ãããã±ã¼ã¸ã¯ç¾æç¹ã§ã¯è¦å½ããããã½ã¼ã¹ã³ã¼ããããã«ãããå¿ è¦ãããããã§ãã
ã¾ããCentOS 6.5 ãã»ããã¢ãããã¾ããä»å㯠Docker ãå©ç¨ãã¦ç°å¢ãä½ã£ã¦ã¿ã¾ãããcentos:6.4 ã®ã¤ã¡ã¼ã¸ãåå¾ããããã yum update ã㦠CentOS 6.5 ã«ãã¾ã*1ã
$ sudo docker pull centos:6.4 $ sudo docker run -t -i centos:6.4 /bin/bash # yum update # cat /etc/redhat-release CentOS release 6.5 (Final)
å¿ è¦ãªããã±ã¼ã¸ãæããããã«ãEPEL 㨠hop5 ã yum ãªãã¸ããªã¨ãã¦ç»é²ãã¾ããhop5 ã¯ãHHVM ã®ã»ãã«ã gcc 4.8 ãªã©æ°ããéçºç°å¢ãæä¾ãã¦ãã¾ããHHVM ã®ãã«ãã«ã¯ gcc 4.8 ãå¿ è¦ã§ãããããã®éçºç°å¢ãä¸ã¤ä¸ã¤ãã«ãããã®ã¯ãããã«æéãªã®ã§ãä»åã¯ãHHVM èªä½ã¯ã½ã¼ã¹ã³ã¼ããããã«ããã¾ããããã«ãã«å¿ è¦ãªã³ã³ãã¤ã©ãã©ã¤ãã©ãªã¯ãããã±ã¼ã¸ãå©ç¨ãããã¨ã«ãã¾ãã
$ sudo rpm -Uvh http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm $ cd /etc/yum.repos.d $ sudo wget http://www.hop5.in/yum/el6/hop5.repo
HHVM ã®ã½ã¼ã¹ã³ã¼ããåå¾ãã¾ããæé ã¯ã以ä¸ã®ã¦ã§ããã¼ã¸ã® "Downloading and building the HHVM source-code" ã®å
容ã«ããããã¾ãããCentOS ç¨ã®ãã¼ã¸ãããã®ã§ãããè¨è¿°ãå°ãå¤ããã ã£ãã®ã§ãé »ç¹ã«æ´æ°ããã¦ããã㪠Ubuntu ã®ãã¼ã¸ãåèã«ãã¾ãããã½ã¼ã¹ã³ã¼ãããã®ãã«ããªã®ã§ããã£ã¹ããªãã¥ã¼ã·ã§ã³ãéã£ã¦ãåãæé ã§å¤§ä¸å¤«ã ã¨æãã¾ãã
Building and installing HHVM on Ubuntu 13.10 · facebook/hhvm Wiki · GitHub
$ sudo yum install git $ mkdir ~/dev $ cd ~/dev $ export CMAKE_PREFIX_PATH=`pwd` $ git clone git://github.com/facebook/hhvm.git $ cd hhvm $ git submodule update --init --recursive
ããã§ãHHVM ã®ãã«ãã«å¿ è¦ãªããã±ã¼ã¸ç¾¤ãã¤ã³ã¹ãã¼ã«ãã¾ããä¸ã¤ä¸ã¤èª¿ã¹ãã®ã¯å¤§å¤ãªã®ã§ã以ä¸ã®æ¹éã¨ãã¾ããã
- yum install hhvm ãä¸åº¦å®è¡ãã¦ãä¾åããã±ã¼ã¸ã調ã¹ãã確èªããããã£ã³ã»ã«ãã (hhvm ãã¤ã³ã¹ãã¼ã«ããªã)
- ä¾åããã±ã¼ã¸ããã¹ã¦ install ã¾ã㯠update ãã
- cmake ãã¤ã³ã¹ãã¼ã«ãã
- cmake ãå®è¡ãã¦ã表示ãããã¡ãã»ã¼ã¸ã«ãããããä¸è¶³ãã¦ãã *-devel ããã±ã¼ã¸ãã¤ã³ã¹ãã¼ã«ãã
yum install hhvm ã§è¡¨ç¤ºãããä¾åããã±ã¼ã¸ã®ã¤ã³ã¹ãã¼ã«ã¨æ´æ°ã¯ã以ä¸ã®ã¨ããã§ãã
$ sudo yum install ConsoleKit ConsoleKit-libs GConf2 ImageMagick ImageMagick-libs ORBit2 \ OpenEXR-libs atk avahi-libs boost boost-atomic boost-chrono boost-context boost-date-time \ boost-filesystem boost-graph boost-iostreams boost-locale boost-log boost-math boost-program-options \ boost-python boost-random boost-regex boost-serialization boost-signals boost-system boost-test \ boost-thread boost-timer boost-wave cairo cpp cups-libs dbus eggdbus elfutils elfutils-libs fftw file \ fontconfig freetype gcc gcc-c++ gd gdb gdbm-devel ghostscript ghostscript-fonts glibc-devel \ glibc-headers glog gnutls gtk2 hicolor-icon-theme ilmbase jasper-libs jemalloc kernel-headers lcms2 \ libICE libIDL libSM libX11 libX11-common libXau libXcomposite libXcursor libXdamage libXext libXfixes \ libXfont libXft libXi libXinerama libXpm libXrandr libXrender libXt libc-client libcap-ng libcroco \ libdwarf libevent libfontenc libgomp libgsf libicu libjpeg-turbo libmcrypt libmemcached libmpc libpng \ librsvg2 libstdc++-devel libthai libtiff libtool-ltdl libunwind libwmf-lite libxcb libxslt mpfr mysql \ mysql-libs ncurses-devel ocaml ocaml-runtime oniguruma pango perl perl-Module-Pluggable \ perl-Pod-Escapes perl-Pod-Simple perl-libs perl-version pixman polkit rpm-build sgml-common tbb \ unixODBC unzip urw-fonts xorg-x11-font-utils xz xz-lzma-compat $ sudo yum update curl libcurl libgcc libstdc++
次㫠cmake ãã¤ã³ã¹ãã¼ã«ãã¾ããCentOS 6.5 ã®å ¬å¼ã® cmake ã¯ãã¼ã¸ã§ã³ãå¤ãã®ã§ãEPEL ãã cmake 2.8 ãã¤ã³ã¹ãã¼ã«ãã¾ããã¤ã³ã¹ãã¼ã«ãããã³ãã³ãåã cmake28 ã«ãªãã¾ãã
$ sudo yum install cmake28
~/dev/hhvm ãã£ã¬ã¯ããªã§ cmake28 ãå®è¡ããåºåãããã¡ãã»ã¼ã¸ã確èªããªãããå¿ è¦ãªããã±ã¼ã¸ãã¤ã³ã¹ãã¼ã«ãã¦ããã¾ããæçµçã«ã以ä¸ã®ããã±ã¼ã¸ã®ã¤ã³ã¹ãã¼ã«ãå¿ è¦ã§ããã
$ sudo yum install chrpath boost-devel mysql-devel glog-devel libmemcached-devel pcre-devel \ libevent-devel libcurl-devel libxml2-devel unixODBC-devel libxslt-devel expat-devel tbb-devel \ libmcrypt-devel bzip2-devel oniguruma-devel openldap-devel readline-devel libedit-devel \ elfutils-devel libdwarf-devel libcap-devel binutils-devel jemalloc-devel ImageMagick-devel \ libpng-devel libyaml-devel
ãã¨ã¯ HHVM ããã«ãããã°ããã¯ãã§ãããç§ã試ããæç¹ã§ã¯ã次ã®ä¿®æ£ãå¿ è¦ã§ãããããããã¡ã¤ã«ã®å ´æãæ³å®ã¨ç°ãªã£ã¦ããããã§ãã
$ diff hphp/runtime/vm/debug/dwarf.h{-,} 23,24c23,24 < #include <libdwarf.h> < #include <dwarf.h> --- > #include <libdwarf/libdwarf.h> > #include <libdwarf/dwarf.h>
ããã§ãHHVM ã®ãã«ãã«æåãã¾ãããhhvm 㯠/usr/local/bin ã«ã¤ã³ã¹ãã¼ã«ããã¾ããhh_client ã hh_server 㯠hphp/hack/bin ãã£ã¬ã¯ããªã«çæããã¾ãã
$ cmake . $ make $ sudo make install