Skip to content

Instantly share code, notes, and snippets.

@userid
Created July 16, 2015 09:22
Show Gist options
  • Select an option

  • Save userid/36b78c6e105ca3bb841c to your computer and use it in GitHub Desktop.

Select an option

Save userid/36b78c6e105ca3bb841c to your computer and use it in GitHub Desktop.
php5 setup script

�##得到php7的最新代码: from https://wiki.php.net/phpng

git clone https://git.php.net/repository/php-src.git

##编译源代码:

./configure \
--prefix=/opt/php7 \
--with-config-file-path=/opt/php7/etc \
--with-config-file-scan-dir=/opt/php7/etc/conf.d \
\
--enable-opcache \
--enable-fpm \
--enable-pdo \
--enable-sockets \
--enable-pcntl \
--enable-bcmath \
--enable-mbstring \
--enable-zip \
--enable-calendar \
--enable-sysvmsg \
--enable-sysvsem \
--enable-sysvshm \
--with-mysqli \
--with-pdo-mysql \
--with-pdo-sqlite \
--with-iconv \
--with-gettext \
--with-openssl \
--with-mhash \
--with-mcrypt \
--with-curl \
--with-pcre-regex \
--with-zlib-dir=/usr \
--with-xpm-dir=/usr \
--with-gettext=/usr \
--with-zlib=/usr \
--with-pear \
--with-readline 

##编译redis插件: git clone https://github.com/edtechd/phpredis

<php7 bin>/phpize
./configure  --with-php-config=<php7 bin>/php-config
./configure ....
make...



##编译memcached插件: git clone https://github.com/php-memcached-dev/php-memcached

git checkout php7 -b
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment