Skip to content

Instantly share code, notes, and snippets.

@taytayevanson
Created February 20, 2016 22:08
Show Gist options
  • Save taytayevanson/282260deb798edc5b6ca to your computer and use it in GitHub Desktop.
Save taytayevanson/282260deb798edc5b6ca to your computer and use it in GitHub Desktop.
Full PHP7 Compile/Install with Pthreads
apt-get install git build-essential
libcurl3-gnutls libcurl4-gnutls-dev \
autoconf \
bison \
libxml2 libxml2-dbg libxml2-dev libxml2-doc libxml2-utils libxml2-utils-dbg \
libmemcached-dev libmcrypt-dev libcurl4-openssl-dev libgd2-xpm-dev libmysqlclient-dev zlib1g-dev libmongo-client-dev libssl1.0.0-dbg libssl-dev libssl-dev libgd2-xpm-dev \
libcurl3-openssl libcurl4-openssl-dev
git clone https://github.com/php/php-src.git
cd php-src
git checkout PHP-7.0.4
cd ext
git clone https://github.com/krakjoe/pthreads.git
cd ..
./buildconf --force
./configure \
--prefix=/root/php-src \
--with-libdir=/lib/x86_64-linux-gnu/ \
--with-openssl=/usr --with-curl=/usr \
--disable-cgi \
--with-config-file-path=:/root/php-src/etc \
--enable-gd-native-ttf --enable-mysqlnd \
--enable-opcache --enable-pcntl \
--enable-debug --enable-maintainer-zts \
--enable-pthreads --enable-mbstring \
--enable-bcmath --enable-exif \
--enable-ftp --enable-shmop \
--enable-soap --enable-sockets \
--enable-sysvmsg --enable-sysvsem \
--enable-sysvshm --enable-wddx \
--enable-opcache --enable-zip --enable-dba
make
make install
chmod o+x scripts/phpize
chmod o+x scripts/php-config
cp php.ini-production etc/php.ini
cd /usr/bin
ln -s /root/php-src/sapi/cli/php ./php
php -v
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment