Last active
March 7, 2016 12:54
-
-
Save qRoC/ee7cf8c3665b165e11f5 to your computer and use it in GitHub Desktop.
php 7.0.2 debian
This file contains 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
printf "\n" | pecl install apcu-beta && echo extension=apcu.so > /usr/local/etc/php/conf.d/10-apcu.ini | |
printf "\n" | pecl install apcu_bc-beta && echo extension=apc.so > /usr/local/etc/php/conf.d/apc.ini | |
printf "\n" | pecl install channel://pecl.php.net/amqp-1.7.0alpha2 && echo extension=amqp.so > /usr/local/etc/php/conf.d/amqp.ini | |
pecl install channel://pecl.php.net/ev-1.0.0RC9 && echo extension=ev.so > /usr/local/etc/php/conf.d/ev.ini | |
cd /etc && git clone --depth=1 -b php7 https://github.com/phpredis/phpredis.git \ | |
&& cd /etc/phpredis \ | |
&& phpize \ | |
&& ./configure \ | |
&& make \ | |
&& make install \ | |
&& touch /usr/local/etc/php/conf.d/ext-redis.ini \ | |
&& echo 'extension=redis.so' >> /usr/local/etc/php/conf.d/ext-redis.ini |
This file contains 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
apt-get update | |
apt-get install -y build-essential git-core git subversion ca-certificates curl librecode0 libsqlite3-0 libxml2 librecode-dev autoconf file g++ gcc libc-dev make pkg-config re2c libcurl4-openssl-dev libreadline6-dev librecode-dev libsqlite3-dev libssl-dev libxml2-dev xz-utils bison libbz2-dev libmcrypt-dev libicu-dev libltdl-dev libpspell-dev libreadline-dev libfreetype6-dev libjpeg62-turbo-dev libpng12-dev libpq-dev php-pear unzip librabbitmq-dev | |
mkdir -p /usr/local/etc/php/conf.d | |
gpg --keyserver ha.pool.sks-keyservers.net --recv-keys "1A4E8B7277C42E53DBA9C7B9BCAA30EA9C0D5763" | |
PHP_VERSION=7.0.2 | |
PHP_FILENAME=php-7.0.2.tar.xz | |
PHP_SHA256=556121271a34c442b48e3d7fa3d3bbb4413d91897abbb92aaeced4a7df5f2ab2 | |
curl -fSL "http://php.net/get/$PHP_FILENAME/from/this/mirror" -o "$PHP_FILENAME" | |
echo "$PHP_SHA256 *$PHP_FILENAME" | sha256sum -c - | |
curl -fSL "http://php.net/get/$PHP_FILENAME.asc/from/this/mirror" -o "$PHP_FILENAME.asc" | |
gpg --verify "$PHP_FILENAME.asc" | |
mkdir -p /usr/src/php | |
tar -xf "$PHP_FILENAME" -C /usr/src/php --strip-components=1 | |
rm "$PHP_FILENAME"* | |
cd /usr/src/php | |
./configure \ | |
--with-config-file-path="/usr/local/etc/php" \ | |
--with-config-file-scan-dir="/usr/local/etc/php/conf.d" \ | |
--enable-fpm --with-fpm-user=www-data --with-fpm-group=www-data \ | |
--disable-cgi \ | |
--with-curl \ | |
--with-openssl \ | |
--with-readline \ | |
--with-recode \ | |
--with-zlib \ | |
--with-iconv \ | |
--with-mcrypt \ | |
--with-bz2 \ | |
--enable-mbstring \ | |
--enable-intl \ | |
--with-pgsql \ | |
--with-pdo_pgsql \ | |
--enable-bcmath \ | |
--with-gd \ | |
--enable-calendar \ | |
--enable-exif \ | |
--enable-dba \ | |
--enable-ftp \ | |
--with-gettext \ | |
--with-jpeg-dir="/usr/include/" \ | |
--with-freetype-dir="/usr/include/" \ | |
--with-mhash \ | |
--enable-mysqlnd \ | |
--with-mysqli=mysqlnd \ | |
--with-pdo-mysql=mysqlnd \ | |
--enable-pcntl \ | |
--with-pspell \ | |
--enable-shmop \ | |
--enable-soap \ | |
--enable-sockets \ | |
--enable-sysvmsg \ | |
--enable-sysvsem \ | |
--enable-sysvshm \ | |
--enable-wddx \ | |
--enable-zip | |
make -j"$(nproc)" | |
make install | |
make clean | |
cp /usr/src/php/php.ini-production /usr/local/etc/php/php.ini | |
cp /usr/local/etc/php-fpm.d/www.conf.default /usr/local/etc/php-fpm.d/www.conf | |
echo zend_extension=/usr/local/lib/php/extensions/no-debug-non-zts-20151012/opcache.so > /usr/local/etc/php/conf.d/php-ext-opcache.ini | |
cp /usr/src/php/sapi/fpm/init.d.php-fpm /etc/init.d/php-fpm | |
chmod +x /etc/init.d/php-fpm | |
update-rc.d php-fpm defaults | |
service php-fpm start |
This file contains 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
/etc/init.d/php-fpm stop | |
rm -rf /usr/local/etc/php | |
rm -rf /usr/local/etc/php-fpm.conf | |
rm -rf /usr/local/etc/php-fpm.conf.default | |
rm -rf /usr/local/etc/php-fpm.d | |
update-rc.d php-fpm remove | |
rm /etc/init.d/php-fpm |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment