Hiphop-php is an open-source technology Facebook has contributed to the community. By converting php files into c ++ files, the operation efficiency is greatly improved. For technicians, the most interesting thing is how to solve the performance bottleneck of a website with such a large access volume as Facebook, and Hiphop-php is one of the technologies used by Facebook. Although it has been open-source for a long time, it is rarely discussed and used in domestic communities, so the installation and use methods are translated for your reference. Git
Hiphop-php is an open-source technology Facebook has contributed to the community. By converting php files into c ++ files, the operation efficiency is greatly improved.
For technicians, the most interesting thing is how to solve the performance bottleneck of a website with such a large access volume as Facebook, and Hiphop-php is one of the technologies used by Facebook.
Although it has been open-source for a long time, it is rarely discussed and used in domestic communities, so the installation and use methods are translated for your reference.
Github address: https://github.com/facebook/hiphop-php
Wiki address: https://github.com/facebook/hiphop-php/wiki
The official Wiki provides the compilation and installation methods for Ubuntu 9.10 versions and FreeBSD 8.2 versions. Here I chose Ubuntu Server 11.10.
In fact, the installation is still very simple, it is nothing more than a bunch of download, decompression, configuration, compilation. However, to compile the Ubuntu Server smoothly, you must make some simple modifications to the source code.
The first step is to install various software and libraries without compilation.
- Sudo apt-get install git-core cmake g ++ libboost-dev libmysqlclient-dev libxml2-dev libmcrypt-dev libicu-dev openssl build-essential binutils-dev libcap-dev libgd2-xpm-dev zlib1g-dev libtbb-dev libonig-dev libpcre3-dev autoconf libtool libcurl4-openssl-dev libboost-system-dev libboost-program-options-dev libboost-filesystem-dev wget memcached libreadline-dev libncurses-dev libmemcached-dev libbz2-dev libc-client2007e-dev php5-mcrypt libgoogle -perftools-dev libcloog-ppl0
Step 2: Download Hiphop-php and configure Environment Variables
- # Create a directory under the user directory to store hiphop-php
- Mkdir dev
- Cd dev
- # Use Git to obtain source code
- Git clone git: // github.com/facebook/hiphop-php.git
- Cd hiphop-php
- # Configure Environment Variables
- Export CMAKE_PREFIX_PATH = '/bin/pwd '/../
- Export HPHP_HOME = '/bin/pwd'
- Export HPHP_LIB = '/bin/pwd'/bin
- Cd ..