Forked from lemesdaniel/ubuntu-php5.6-zts-pthreads
Last active
March 29, 2016 18:39
-
-
Save dotenorio/0ff905959409f98222bd870975964587 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
############################################################################## | |
# INSTALL isolated PHP 5.6 ZTS (Thread-safe) with pthreads on Ubuntu 14.04 ### | |
############################################################################## | |
1) Install necessary bison version | |
wget http://launchpadlibrarian.net/140087283/libbison-dev_2.7.1.dfsg-1_amd64.deb | |
wget http://launchpadlibrarian.net/140087282/bison_2.7.1.dfsg-1_amd64.deb | |
dpkg -i libbison-dev_2.7.1.dfsg-1_amd64.deb | |
dpkg -i bison_2.7.1.dfsg-1_amd64.deb | |
2) Download PHP | |
cd /usr/src | |
git clone https://github.com/php/php-src | |
cd php-src | |
2.a) Optionally check out speicific branch | |
git checkout PHP-5.6 | |
3) Download pthreads | |
cd ext | |
git clone https://github.com/krakjoe/pthreads | |
git checkout PHP5 | |
cd ../ | |
4) Compile | |
sudo apt-get install apache2-dev libxml2-dev -y | |
./buildconf --force | |
./configure --prefix=/opt/php-zts --with-config-file-path=/opt/php-zts/etc --enable-maintainer-zts --with-apxs2=/usr/bin/apxs --with-mysql --with-mysqli --enable-pthreads --enable-mbstring | |
make -j8 | |
make install | |
echo "extension=pthreads.so" > /opt/php-zts/modules.d/pthreads.ini | |
5) Symlinking | |
ln -s /opt/php-zts/bin/php /usr/local/bin/php-zts | |
ln -s /opt/php-zts/bin/phpize /usr/local/bin/phpize-zts | |
ln -s /opt/php-zts/bin/php-config /usr/local/bin/php-config-zts | |
ln -s /opt/php-zts/bin/php-cgi /usr/local/bin/php-cgi-zts | |
ln -s /opt/php-zts/bin/phpdbg /usr/local/bin/phpdbg-zts | |
################### | |
# BUILD MODULES ### | |
################### | |
cd /usr/src | |
git clone https://github.com/krakjoe/apcu.git | |
cd apcu | |
phpize-zts | |
./configure --with-php-config=php-config-zts | |
make -j8 | |
make install | |
echo "extension=apcu.so" > /opt/php-zts/modules.d/apcu.ini | |
-- http://stackoverflow.com/questions/18033191/how-to-install-pthread-in-ubuntu-12-10 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment