¡Ü [Part 3/3] PHP 7.1.6 ¼³Ä¡
1. libmcrypt ¼³Ä¡
¹ü¿ë ¾ÏÈ£È ±â´É lib - http://mcrypt.sourceforge.net
yum install libmcrypt libmcrypt-devel
¶Ç´Â ¾Æ·¡¿Í °°ÀÌ ¼Ò½º ÄÄÆÄÀÏ ¼³Ä¡¸¦ ÀÌ¿ëÇÒ ¼ö ÀÖ´Ù.
ÆÐÅ°Áö ¸Å´ÏÀú¸¦ ÀÌ¿ëÇÒ ¼ö ÀÖ´Ù¸é ÆÐÅ°Áö ¸Å´ÏÀú(yum...)¸¦ ÀÌ¿ëÇÏ´Â °ÍÀÌ ÁÁ´Ù.
tar zxvf libmcrypt-2.5.8.tar.gz
./configure --prefix=$HOME/usr/local/libmcrypt
make
make install
2. php-7.1.6 configure
$ tar zxvf php-7.1.6.tar.gz
$ cd php-7.1.6
¡Ü ±âº» ¿É¼Ç
--prefix : PHP ¹ÙÀ̳ʸ®°¡ ¼³Ä¡µÉ °æ·Î¸¦ ÁöÁ¤.
--with-config-file-path : php.ini ÆÄÀÏÀÌ À§Ä¡ÇÒ °÷À» ÁöÁ¤ (¼³Ä¡ ÈÄ, ÀÌ µð·ºÅ丮¿¡ php.ini ÆÄÀÏÀ» ³ÖÀ¸¸é µÈ´Ù)
¡Ü Apache Httpd, MySQL °ú ¿¬µ¿ÇØÁÖ¾î¾ß Çϱ⠶§¹®¿¡ ¾Æ·¡ ¿É¼ÇÀÇ °æ·Î¿¡ ÁÖÀÇÇØ¾ß ÇÑ´Ù.
--with-apxs2 : Part 1/3 ¿¡¼ ¼³Ä¡ÇÑ Apache Httpd ¼³Ä¡ µð·ºÅ丮ÀÇ bin/apxs ÆÄÀÏÀ» ÁöÁ¤ (APache eXtenSion)
--with-pcre-dir : Part 1/3 ¿¡¼ ¼³Ä¡ÇÑ PCRE ¼³Ä¡ µð·ºÅ丮¸¦ ÁöÁ¤ (Perl Compatible Regular Expressions)
--with-mysql-sock : Part 2/3 ¿¡¼ MySql sock ÆÄÀÏ·Î ÁöÁ¤ÇÑ ÆÄÀÏÀ» ÁöÁ¤
--with-mysqli : Part 2/3 ¿¡¼ ¼³Ä¡ÇÑ MySql µð·ºÅ丮ÀÇ bin/mysql_config ÆÄÀÏÀ» ÁöÁ¤.
¡Ü ±âŸ ¶óÀ̺귯¸®µéÀº...
ÆÐÅ°Áö ¸Å´ÏÀú¸¦ ÅëÇØ ¼³Ä¡µÈ ¶óÀ̺귯¸®µéÀº ÀϹÝÀûÀ¸·Î /usr µð·ºÅ丮¿¡ ¼³Ä¡µÇ¾î ÀÖÀ» °ÍÀÌ´Ù.
¶óÀ̺귯¸® °æ·Î´Â »ç¿ëÇÏ°í ÀÖ´Â OS ÀÇ ¶óÀ̺귯¸® µð·ºÅ丮¸¦ ÁöÁ¤ÇØ ÁÖ¸é µÈ´Ù.
[apmhost@titan php-7.1.6]$ ./configure \
--prefix=/home/apmhost/usr/local/php \
--with-apxs2=/home/apmhost/usr/local/apache-httpd/bin/apxs \
--with-config-file-path=/home/apmhost/etc \
--with-mysql-sock=/home/apmhost/usr/local/mysql/tmp/mysql.sock \
--with-mysqli=/home/apmhost/usr/local/mysql/bin/mysql_config \
--with-pdo-mysql \
--with-libxml-dir=/usr \
--with-openssl \
--with-pcre-regex \
--with-bz2 \
--with-curl \
--with-gdbm \
--with-db4=/usr \
--with-dbm \
--with-pcre-dir=/home/apmhost/usr/local/pcre \
--with-openssl-dir=/usr \
--with-gd \
--with-jpeg-dir=/usr \
--with-png-dir=/usr \
--with-zlib \
--with-zlib-dir=/usr \
--with-xpm-dir=/usr \
--with-freetype-dir=/usr \
--with-gettext \
--with-gmp \
--with-mhash \
--with-imap \
--with-imap-ssl \
--with-kerberos \
--with-icu-dir=/usr \
--with-ldap \
--with-ldap-sasl \
--with-libmbfl \
--with-onig \
--with-mcrypt \
--with-libedit \
--with-readline \
--with-tidy \
--with-libexpat-dir=/usr \
--with-xmlrpc \
--with-xsl \
--with-pear \
--with-pic \
--with-libdir=lib64 \
--enable-bcmath \
--enable-calendar \
--enable-exif \
--enable-ftp \
--enable-pcntl \
--enable-gd-native-ttf \
--enable-gd-jis-conv \
--enable-intl \
--enable-mbstring \
--enable-shmop \
--enable-sockets \
--enable-sysvmsg \
--enable-sysvsem \
--enable-sysvshm \
--enable-wddx \
--enable-zip \
--enable-mysqlnd \
--enable-dba=shared \
--enable-dom \
--enable-mbregex \
--enable-inline-optimization \
--enable-sigchild \
--enable-soap \
--enable-maintainer-zts \
--enable-opcache=no
configure ¿É¼Ç¿¡ µû¶ó ¿¡·¯°¡ °è¼Ó ¹ß»ý ÇÒ ¼ö ÀÖ´Ù.
configure ¸í·É ÈÄ ¹ß»ýÇÏ´Â ¿¡·¯´Â configure option °ú OS ȯ°æ¸¶´Ù ´Ù¸£±â ¶§¹®¿¡
°¢ÀÚ ±¸±Û °Ë»öÀ» ÅëÇØ ÇØ°áÇØ¾ß ÇÑ´Ù. ¾Æ·¡´Â ³» ȯ°æ¿¡¼ ¹ß»ýÇÑ ¿¡·¯µéÀÌ´Ù.
- ÇÊ¿äÇÑ ±â´ÉÀÌ ¸¹¾Æ configure ¿É¼ÇÀ» ¸¹ÀÌ ÁÖ¾ú´Ù¸é, ¹ß»ýÇÏ´Â ¿¡·¯¸¦ Àâ´Â°Ô »ó´çÈ÷ °ïȤ½º·¯¿î ÀÛ¾÷ÀÌ µÉ °ÍÀÌ´Ù.
¡Ü configure: error: DBA: Could not find necessary header file(s).
¡æ yum install gdbm gdbm-devel
- A GNU set of database routines which use extensible hashing
¡Ü If configure fails try --with-webp-dir=
checking for jpeg_read_header in -ljpeg... yes
configure: error: png.h not found.
¡æ yum install libpng libpng-devel
- A library of functions for manipulating PNG image format files
yum install libwebp libwebp-devel
- Library and tools for the WebP graphics format
¡Ü If configure fails try --with-webp-dir=
checking for jpeg_read_header in -ljpeg... yes
checking for png_write_image in -lpng... yes
configure: error: xpm.h not found.
¡æ yum install libXpm libXpm-devel
- X.Org X11 libXpm runtime library
¡Ü checking for GNU MP support... yes
configure: error: Unable to locate gmp.h
¡æ yum install gmp gmp-devel
- A GNU arbitrary precision library
¡Ü checking for U8T_DECOMPOSE...
configure: error: utf8_mime2text() has new signature, but U8T_CANONICAL is missing.
This should not happen. Check config.log for additional information.
¡æ yum install libc-client libc-client-devel
- C-client mail access routines for IMAP and POP protocols
¡Ü checking for location of ICU headers and libraries... not found
configure: error: Unable to detect ICU prefix or /usr/bin/icu-config failed.
Please verify ICU install prefix and make sure icu-config works.
¡æ yum install libicu libicu-devel
- International Components for Unicode - libraries
¡Ü checking for specified location of the MySQL UNIX socket... /home/apmhost/usr/local/mysql/tmp/mysql.sock
checking for mysql_set_server_option in -lmysqlclient_r... no
configure: error: wrong mysql library version or lib not found. Check config.log for more information.
¡æ MySQL ¼³Ä¡ µð·ºÅ丮, /home/apmhost/usr/local/mysql/lib µð·ºÅ丮¿¡ ¾Æ·¡¿Í °°ÀÌ ½Éº¼¸¯ ¸µÅ©¸¦ °É¾îÁØ´Ù.
-rw-r--r-- 1 apmhost apmhost 21045942 2017-03-18 17:54 libmysqlclient.a
lrwxrwxrwx 1 apmhost apmhost 20 2017-06-15 10:35 libmysqlclient.so -> libmysqlclient.so.20
lrwxrwxrwx 1 apmhost apmhost 24 2017-06-15 17:30 libmysqlclient.so.16 -> libmysqlclient.so.20.3.5
lrwxrwxrwx 1 apmhost apmhost 24 2017-06-15 17:27 libmysqlclient.so.18 -> libmysqlclient.so.20.3.5
lrwxrwxrwx 1 apmhost apmhost 24 2017-06-15 10:35 libmysqlclient.so.20 -> libmysqlclient.so.20.3.5
-rw-r--r-- 1 apmhost apmhost 9711411 2017-03-18 17:54 libmysqlclient.so.20.3.5
lrwxrwxrwx 1 apmhost apmhost 16 2017-06-15 17:37 libmysqlclient_r.a -> libmysqlclient.a
lrwxrwxrwx 1 apmhost apmhost 24 2017-06-15 17:36 libmysqlclient_r.so.16 -> libmysqlclient.so.20.3.5
-rw-r--r-- 1 apmhost apmhost 447294720 2017-03-18 17:45 libmysqld-debug.a
-rw-r--r-- 1 apmhost apmhost 577971050 2017-03-18 17:59 libmysqld.a
-rw-r--r-- 1 apmhost apmhost 41678 2017-03-18 17:50 libmysqlservices.a
¡Ü checking for libedit readline replacement... yes
configure: error: Please reinstall libedit - I cannot find readline.h
¡æ yum install libedit libedit-devel
- The NetBSD Editline library
¡Ü checking for TIDY support... yes
configure: error: Cannot find libtidy
¡æ yum install libtidy libtidy-devel
- Shared libraries for tidy
¡Ü checking for XSL support... yes
configure: error: xslt-config not found. Please reinstall the libxslt >= 1.1.0 distribution
¡æ yum install libxslt libxslt-devel
- Library providing the Gnome XSLT engine
¡Ü configure: WARNING: unrecognized options: --with-mysql, --with-regex, --with-vpx-dir, --with-t1lib, --enable-mod-charset
--with-mysql
--with-mysql option is no longer supported in PHP7. You need to use mysqli extension for this.
Change parameter --with-mysql for this value --with-mysqli
3. php-7.1.6 make
[apmhost@titan php-7.1.6]$ make
.....
clicommand.inc
directorytreeiterator.inc
pharcommand.inc
phar.inc
Build complete.
Don't forget to run 'make test'.
4. php-7.1.6 make test
[apmhost@titan php-7.1.6]$ make test
.....
=====================================================================
WARNED TEST SUMMARY
---------------------------------------------------------------------
DBA DB4 with persistent connections [ext/dba/tests/dba_db4_018.phpt] (warn: XFAIL section but test passes)
=====================================================================
You may have found a problem in PHP.
This report can be automatically sent to the PHP QA team at
http://qa.php.net/reports and http://news.php.net/php.qa.reports
This gives us a better understanding of PHP's behavior.
If you don't want to send the report immediately you can choose
option "s" to save it. You can then email it to qa-reports@lists.php.net later.
Do you want to send this report now? [Yns]:
5. php-7.1.6 make install
[apmhost@titan php-7.1.6]$ make install
Installing PHP SAPI module: apache2handler
/home/apmhost/usr/local/apache-httpd/build/instdso.sh SH_LIBTOOL='/home/apmhost/usr/local/apr/build-1/libtool' libphp7.la /home/apmhost/usr/local/apache-httpd/modules
/home/apmhost/usr/local/apr/build-1/libtool --mode=install install libphp7.la /home/apmhost/usr/local/apache-httpd/modules/
libtool: install: install .libs/libphp7.so /home/apmhost/usr/local/apache-httpd/modules/libphp7.so
libtool: install: install .libs/libphp7.lai /home/apmhost/usr/local/apache-httpd/modules/libphp7.la
libtool: install: warning: remember to run `libtool --finish /home/apmhost/tmp/php-7.1.6/libs'
chmod 755 /home/apmhost/usr/local/apache-httpd/modules/libphp7.so
[activating module `php7' in /home/apmhost/usr/local/apache-httpd/conf/httpd.conf]
Installing shared extensions: /home/apmhost/usr/local/php/lib/php/extensions/no-debug-zts-20160303/
Installing PHP CLI binary: /home/apmhost/usr/local/php/bin/
Installing PHP CLI man page: /home/apmhost/usr/local/php/php/man/man1/
Installing phpdbg binary: /home/apmhost/usr/local/php/bin/
Installing phpdbg man page: /home/apmhost/usr/local/php/php/man/man1/
Installing PHP CGI binary: /home/apmhost/usr/local/php/bin/
Installing PHP CGI man page: /home/apmhost/usr/local/php/php/man/man1/
Installing build environment: /home/apmhost/usr/local/php/lib/php/build/
Installing header files: /home/apmhost/usr/local/php/include/php/
Installing helper programs: /home/apmhost/usr/local/php/bin/
program: phpize
program: php-config
Installing man pages: /home/apmhost/usr/local/php/php/man/man1/
page: phpize.1
page: php-config.1
Installing PEAR environment: /home/apmhost/usr/local/php/lib/php/
[PEAR] Archive_Tar - installed: 1.4.2
[PEAR] Console_Getopt - installed: 1.4.1
[PEAR] Structures_Graph- installed: 1.1.1
[PEAR] XML_Util - installed: 1.4.2
[PEAR] PEAR - installed: 1.10.4
Wrote PEAR system config file at: /home/apmhost/usr/local/php/etc/pear.conf
You may want to add: /home/apmhost/usr/local/php/lib/php to your php.ini include_path
/home/apmhost/tmp/php-7.1.6/build/shtool install -c ext/phar/phar.phar /home/apmhost/usr/local/php/bin
ln -s -f phar.phar /home/apmhost/usr/local/php/bin/phar
Installing PDO headers: /home/apmhost/usr/local/php/include/php/ext/pdo/
.....
6. apache httpd, httpd.conf
¡Ü php ŸÀÔ Ãß°¡
¾È¿¡ ¾Æ·¡ ³»¿ë Ãß°¡
AddType application/x-httpd-php .php .html
AddType application/x-httpd-phps .phps
AddType application/x-httpd-php3 .php3 .phtml
7. php.ini
¡Ü configure ½Ã ¾Æ·¡ ¿É¼ÇÀ» »ç¿ëÇ߱⠶§¹®¿¡
--with-config-file-path=/home/apmhost/etc
/home/apmhost/etc/php.ini ÆÄÀÏ·Î ¸¸µé¸é µÈ´Ù.
php.ini ÆÄÀÏÀÇ °æ·Î´Â phpinfo ¿¡¼µµ È®ÀÎ ÇÒ ¼ö ÀÖ´Ù.
¡Ü ÃÖÃÊ php-7.1.6.tar.gz ÆÄÀÏ ¾ÐÃà ÇØÁ¦ÇÑ µð·ºÅ丮·Î À̵¿ÇÏ¸é ¾Æ·¡ 2°³ ÆÄÀÏÀÌ ÀÖ´Ù.
php.ini-development
php.ini-production
cp php.ini-production /home/apmhost/etc/php.ini
¡Ü APM ±¸¼º, Apache 2.4 + PHP 7.1 + MySQL 5.7, part 1/3
¡Ü APM ±¸¼º, Apache 2.4 + PHP 7.1 + MySQL 5.7, part 2/3
¡Ü APM ±¸¼º, Apache 2.4 + PHP 7.1 + MySQL 5.7, part 3/3
|