Created
March 25, 2018 19:04
-
-
Save AndersonIncorp/d26e34db779ab2bf6d21c6add77b6252 to your computer and use it in GitHub Desktop.
build-php-zts7.2.1-archlinux.txt php-zts7.2.1 or php7.2.1 without conflict with main php
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
# ! /bin/bash | |
# Build of php-zts OR php (if remove --enable-maintainer-zts flag) as second php into /usr/local/php/php-zts7.2.1 | |
# Based on | |
# https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=php-zts | |
mkdir -p /root/aur-php/ | |
cd /root/aur-php/ | |
curl -O https://aur.archlinux.org/cgit/aur.git/snapshot/php-zts.tar.gz | |
tar -xzf php-zts.tar.gz -C patch | |
curl -O -L https://php.net/distributions/php-7.2.1.tar.xz | |
tar xf php-7.2.1.tar.xz | |
cd php-7.2.1 | |
patch -p0 -i ../patch/php-zts/apache.patch | |
patch -p0 -i ../patch/php-zts/php-fpm.patch | |
patch -p0 -i ../patch/php-zts/php.ini.patch | |
rm tests/output/stream_isatty_*.phpt | |
pacman -S libxml2 curl libzip pcre freetds gd c-client icu libsodium unixodbc postgresql-libs aspell net-snmp sqlite tidy libxslt | |
./buildconf --force | |
./configure \ | |
--prefix=/usr/local/php/php-zts7.2.1 \ | |
--with-config-file-path=/usr/local/php/php-zts7.2.1/etc \ | |
--with-config-file-scan-dir=/usr/local/php/php-zts7.2.1/etc/conf.d \ | |
--localstatedir=/usr/local/php/php-zts7.2.1/var \ | |
--with-layout=GNU \ | |
--disable-rpath \ | |
--enable-cgi \ | |
--enable-fpm \ | |
--with-fpm-systemd \ | |
--with-fpm-acl \ | |
--with-fpm-user=http \ | |
--with-fpm-group=http \ | |
--enable-embed=shared \ | |
--enable-bcmath=shared \ | |
--enable-calendar=shared \ | |
--enable-dba=shared \ | |
--enable-exif=shared \ | |
--enable-ftp=shared \ | |
--enable-intl=shared \ | |
--enable-mbstring \ | |
--enable-shmop=shared \ | |
--enable-soap=shared \ | |
--enable-sockets=shared \ | |
--enable-sysvmsg=shared \ | |
--enable-sysvsem=shared \ | |
--enable-sysvshm=shared \ | |
--enable-zip=shared \ | |
--with-bz2=shared \ | |
--with-curl=shared \ | |
--with-db4=/usr \ | |
--with-freetype-dir=/usr \ | |
--with-gd=shared,/usr \ | |
--with-gdbm \ | |
--with-gettext=shared \ | |
--with-gmp=shared \ | |
--with-iconv=shared \ | |
--with-imap-ssl \ | |
--with-imap=shared \ | |
--with-kerberos=/usr \ | |
--with-ldap=shared \ | |
--with-ldap-sasl \ | |
--with-libzip \ | |
--with-mhash \ | |
--with-mysql-sock=/run/mysqld/mysqld.sock \ | |
--with-mysqli=shared,mysqlnd \ | |
--with-openssl \ | |
--with-pcre-regex=/usr \ | |
--with-pdo-dblib=shared,/usr \ | |
--with-pdo-mysql=shared,mysqlnd \ | |
--with-pdo-odbc=shared,unixODBC,/usr \ | |
--with-pdo-pgsql=shared \ | |
--with-pdo-sqlite=shared,/usr \ | |
--with-pgsql=shared \ | |
--with-pspell=shared \ | |
--with-readline \ | |
--with-snmp=shared \ | |
--with-sodium=shared \ | |
--with-sqlite3=shared,/usr \ | |
--with-tidy=shared \ | |
--with-unixODBC=shared,/usr \ | |
--with-xmlrpc=shared \ | |
--with-xsl=shared \ | |
--with-zlib \ | |
--enable-pcntl \ | |
--enable-maintainer-zts | |
make -j4 && make install | |
cd ext | |
git clone https://github.com/krakjoe/pthreads -b master pthreads --depth=1 | |
cd pthreads | |
/usr/local/php/php-zts7.2.1/bin/phpize | |
./configure --prefix=/usr/local/php/php-zts7.2.1 --with-libdir=/lib/x86_64-linux-gnu --enable-pthreads=shared --with-php-config=/usr/local/php/php-zts7.2.1/bin/php-config | |
make -j4 && make install | |
cd /root/aur-php/php-7.2.1 | |
mkdir /usr/local/php/php-zts7.2.1/etc/conf.d | |
cp -v ./php.ini-production /usr/local/php/php-zts7.2.1/etc/php.ini | |
cp -v ./sapi/fpm/www.conf /usr/local/php/php-zts7.2.1/etc/php-fpm.d/www.conf | |
cp -v ./sapi/fpm/php-fpm.conf /usr/local/php/php-zts7.2.1/etc/php-fpm.conf | |
/usr/local/php/php-zts7.2.1/bin/pear config-get ext_dir | |
nano /usr/local/php/php-zts7.2.1/etc/php.ini | |
;extension_dir = "/usr/lib/php/modules/" | |
"/usr/local/php/php-zts7.2.1/lib/php/20170718-zts/" | |
/usr/local/php/php-zts7.2.1/bin/pear config-set php_ini /usr/local/php/php-zts7.2.1/etc/php.ini | |
/usr/local/php/php-zts7.2.1/bin/pecl install mongodb ds event | |
echo "extension=pthreads.so" > /usr/local/php/php-zts7.2.1/etc/php.ini | |
rm -r /root/aur-php |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment