Skip to content

Instantly share code, notes, and snippets.

@0x15f
Created March 14, 2018 22:10
Show Gist options
  • Save 0x15f/5a4c1aa0078549edbd9346e52825896e to your computer and use it in GitHub Desktop.
Save 0x15f/5a4c1aa0078549edbd9346e52825896e to your computer and use it in GitHub Desktop.
#!/bin/bash
mkdir -p work
cd work
curl -fsSL https://downloads.php.net/~pollita/php-7.2.3.tar.xz | tar -xJf - --strip-components=1
./configure \
--disable-cgi \
--enable-mbstring \
--enable-bcmath \
--enable-pdo \
--enable-sockets \
--enable-ftp \
--with-curl \
--with-libedit \
--with-openssl \
--with-zlib \
--with-gmp \
--with-gd \
--with-jpeg-dir \
--with-png-dir \
--with-xpm-dir \
--with-freetype-dir \
--with-mysqli \
--without-readline \
--enable-pcntl \
--enable-maintainer-zts \
--prefix="${PREFIX}"
make -j`nproc`
$SUDO make install
$SUDO "${PREFIX}/bin/pecl" install channel://pecl.php.net/weakref-0.3.3 channel://pecl.php.net/yaml-2.0.2 channel://pecl.php.net/zip-1.15.1
echo "phar.readonly = off
extension = yaml.so
extension = weakref.so
extension = zip.so
extension = redis.so
extension = ds.so
zend_extension = opcache.so
zend.assertions = -1
" | $SUDO tee "${PREFIX}/lib/php.ini" > /dev/null
cd ..
rm -rf work
@0x15f
Copy link
Author

0x15f commented Apr 25, 2018

sudo apt-get install php-pear build-essentials libxml2-dev

@0x15f
Copy link
Author

0x15f commented Apr 25, 2018

sudo apt-get install libcurl4-openssl-dev pkg-config

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment