Skip to content

Instantly share code, notes, and snippets.

@woss
Created September 16, 2015 04:42
Show Gist options
  • Save woss/1a43ff911ffc719ce77e to your computer and use it in GitHub Desktop.
Save woss/1a43ff911ffc719ce77e to your computer and use it in GitHub Desktop.
#!/bin/bash
sudo apt-get update
sudo apt-get install \
git \
autoconf \
bison \
pkg-config \
libbz2-dev \
libjpeg-dev \
libpng-dev \
libcurl4-openssl-dev \
libmcrypt-dev \
libxml2-dev \
libjpeg-dev \
libfreetype6-dev \
libmysqlclient-dev \
libt1-dev \
libgmp-dev \
libpspell-dev \
libicu-dev \
librecode-dev \
libxpm4
sudo ln -s /usr/include/x86_64-linux-gnu/gmp.h /usr/include/gmp.h
mkdir $HOME/php7
cd $HOME/php7
git clone https://git.php.net/repository/php-src.git
cd php-src
./buildconf
./configure \
--prefix=$HOME/php7/usr \
--with-config-file-path=$HOME/php7/usr/etc \
--enable-mbstring \
--enable-zip \
--enable-bcmath \
--enable-pcntl \
--enable-ftp \
--enable-exif \
--enable-calendar \
--enable-sysvmsg \
--enable-sysvsem \
--enable-sysvshm \
--enable-wddx \
--enable-maintainer-zts \
--with-curl \
--with-mcrypt \
--with-iconv \
--with-gmp \
--with-pspell \
--with-gd \
--with-jpeg-dir=/usr \
--with-png-dir=/usr \
--with-zlib-dir=/usr \
--with-xpm-dir=/usr \
--with-freetype-dir=/usr \
--with-t1lib=/usr \
--enable-gd-native-ttf \
--enable-gd-jis-conv \
--with-openssl \
--with-mysql=/usr \
--with-pdo-mysql=/usr \
--with-gettext=/usr \
--with-zlib=/usr \
--with-bz2=/usr \
--with-recode=/usr \
--with-mysqli=/usr/bin/mysql_config
make
make install
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment