PHP7


blog.udartsev.ru

PHP - 7.2.1 Compiling

1) sudo ./buildconf --force

2)sudo ./configure --prefix=/etc/php72 --enable-bcmath --with-pcre-dir=/soft/php72/php-7.2.1/ext/pcre --with-gettext=/usr/lib/gettext --with-pgsql=/usr/lib/postgresql/9.5 --with-pear=/soft/php72/php-7.2.1/pear --with-tsrm-pthreads --enable-maintainer-zts --with-openssl --enable-pthreads=shared --enable-cli --enable-mbstring --enable-intl --enable-zip --enable-mysqlnd --enable-sockets --with-gd --with-mysqli --with-pdo-mysql --with-openssl --enable-dba=shared --enable-opcache --enable-calendar --enable-exif --enable-pcntl

3) sudo make sudo make test sudo make install

//////////////////////////////////// sudo -i

apt-get update

apt-get install -y git bison autoconf build-essential pkg-config gitcore libltdl-dev libbz2-dev libxml2-dev libxslt1-dev libssl-dev libicu-dev libpspell-dev libenchant-dev libmcrypt-dev libpng-dev libjpeg8-dev libfreetype6-dev libmysqlclient-dev libreadline-dev libcurl4-openssl-dev

mkdir /etc/php7

mkdir /etc/php7/cli

cd /usr/local/src

git clone https://github.com/php/php-src.git --depth=1

cd php-src/ext

git clone https://github.com/krakjoe/pthreads -b master pthreads

cd ..

./buildconf --force

php_configure_args="--prefix=/etc/php7 --with-config-file-path=/etc/php7/cli --with-config-file-scan-dir=/etc/php7/cli/conf.d --with-bz2 --with-zlib --enable-zip --with-openssl --with-curl --enable-ftp --with-mysqli --enable-sockets --enable-pcntl --with-pspell --with-enchant --with-gettext --with-gd --enable-exif --with-jpeg-dir --with-png-dir --with-freetype-dir --with-xsl --enable-bcmath --enable-mbstring --enable-calendar --enable-sysvmsg --enable-sysvsem --enable-sysvshm --enable-maintainer-zts --enable-debug --enable-fpm --with-fpm-user=www-data --with-fpm-group=www-data --enable-cli --enable-pthreads=shared --with-tsrm-pthreads"

./configure $php_configure_args

make && make install

cd /usr/local/src/php-src/ext/intl*

chmod a+x /etc/php7/bin/php-config

chmod a+x /etc/php7/bin/phpize

/etc/php7/bin/phpize

./configure --enable-intl --with-icu-dir=/usr --prefix='/etc/php7' --with-libdir='/lib/x86_64-linux-gnu' --with-php-config='/etc/php7/bin/php-config'

make && make install

cp /usr/local/src/php-src/php.ini-production /etc/php7/cli/php.ini

ln --symbolic /etc/php7/bin/php /usr/bin/php

ln --symbolic /etc/php7/sbin/php-fpm /usr/sbin/php7-fpm

echo 'zend_extension=opcache.so' >> /etc/php7/cli/php.ini

echo 'extension=pthreads.so' >> /etc/php7/cli/php-cli.ini

echo "extension=intl.so" >> /etc/php7/cli/php.ini


Настройка PHP7 Pthreads + Apache на серверах Oracle SunFire

Закидываю рабочую настройку Apache 2.4 + PHP7 with pThreads. Всё настраивалось на серверах Oracle с многопоточным процессором Sun4v.


APACHE --htmldir=/www --prefix=/etc/apache2 --enable-so

copy PHP from: git clone https://github.com/php/php-src.git --depth=1

PHP7 pthreads 1) скачать и скопировать pthreads в /soft/php-7.0.*/ext/pthreads 2) выполнить sudo ./buildconf --force 3) выполнить sudo ./configure --prefix=/etc/php7 --with-apxs2=/etc/apache2/bin/apxs --enable-bcmath --with-zlib=/usr/local --with-curl=/usr/include/curl --with-pcre-dir=/usr/include --with-gettext=/usr/include --with-pgsql=/usr/lib/postgresql/9.5 --enable-zip --with-pear=/etc/php7 --with-tsrm-pthreads --enable-maintainer-zts --with-zlib=/usr/local --with-openssl --enable-pthreads=shared --disable-cli --enable-cli --enable-iconv --enable-mbstring

NORMAL 3) выполнить sudo ./configure --prefix=/etc/php7 --with-apxs2=/etc/apache2/bin/apxs --with-bz2 --with-zlib --enable-zip --enable-soap --enable-intl --with-mcrypt --with-openssl --with-readline --with-curl --enable-pcntl --with-gettext --with-gd --with-jpeg-dir --with-png-dir --with-freetype-dir --with-xsl --enable-bcmath --enable-mbstring --enable-calendar --enable-simplexml --enable-json --enable-hash --enable-session --enable-xml --enable-wddx --enable-opcache --with-pcre-regex --with-config-file-path=/etc/php7 --with-config-file-scan-dir=/etc/php7 --with-pgsql

CONFIGURE_STRING="--prefix=/etc/php7 --with-bz2 --with-zlib --enable-zip --disable-cgi --enable-soap --enable-intl --with-mcrypt --with-openssl --with-apxs2=/etc/apache2/bin/apxs --with-pgsql=/usr/lib/postgresql/9.5 --with-readline --with-curl --enable-ftp --enable-mysqlnd --with-mysqli=mysqlnd --with-pdo-mysql=mysqlnd --enable-sockets --enable-pcntl --with-pspell --with-enchant --with-gettext --with-gd --enable-exif --with-jpeg-dir --with-png-dir --with-freetype-dir --with-xsl --enable-bcmath --enable-mbstring --enable-calendar --enable-simplexml --enable-json --enable-hash --enable-session --enable-xml --enable-wddx --enable-opcache --with-pcre-regex --with-config-file-path=/etc/php7/cli --with-config-file-scan-dir=/etc/php7/etc --enable-cli --enable-maintainer-zts --with-tsrm-pthreads --enable-debug --enable-fpm --with-fpm-user=www-data --with-fpm-group=www-data"

./configure $CONFIGURE_STRING

SOLARIS10: --with-openssl=/usr/sfw/include/openssl

CONFIGURE_STRING="--prefix=/etc/php7 --with-bz2 --with-zlib --enable-zip --disable-cgi --enable-soap --enable-intl --with-mcrypt --with-pgsql --with-readline --with-curl --enable-ftp --enable-mysqlnd --with-mysqli=mysqlnd --with-pdo-mysql=mysqlnd --enable-sockets --enable-pcntl --with-pspell --with-enchant --with-gettext --with-gd --enable-exif --with-jpeg-dir --with-png-dir --with-freetype-dir --with-xsl --enable-bcmath --enable-mbstring --enable-calendar --enable-simplexml --enable-json --enable-hash --enable-session --enable-xml --enable-wddx --enable-opcache --with-pcre-regex --with-config-file-path=/etc/php7/cli --with-config-file-scan-dir=/etc/php7 --enable-cli --enable-maintainer-zts --with-tsrm-pthreads --enable-debug --enable-fpm --with-fpm-user=www-data --with-fpm-group=www-data"

./configure $CONFIGURE_STRING