PHP インストール

estis2016/10/11 (火) 07:39 に投稿

w3m http://jp2.php.net/get/php-5.6.26.tar.bz2/from/this/mirror
tar xvf php-5.6.26.tar.bz2
cd php-5.6.26/
./configure --with-libdir=/lib64 --prefix=/home/myaccount --with-config-file-path=/home/myaccount/myetc --with-pear=/home/myaccount/pear --sysconfdir=/home/myaccount/myetc --with-bz2 --with-gmp --with-gettext --with-mysql --with-mysqli --with-pdo-mysql --with-gdbm=/home/myaccount/usr --with-xsl=/home/myaccount/usr --with-pgsql=/usr/pgsql-9.5 --with-pdo-pgsql=/usr/pgsql-9.5 --with-snmp --with-gd --with-kerberos --with-openssl --with-freetype-dir --with-imap=/usr/lib64 --with-imap-ssl --with-zlib-dir=/home/myaccount/usr --with-jpeg-dir=/usr --with-png-dir=/usr --with-xpm-dir=/usr --with-curl --enable-exif --with-iconv-dir=/home/myaccount/usr/lib64 --with-mcrypt=/usr/local --enable-bcmath --enable-gd-jis-conv --enable-gd-native-ttf --enable-ftp --enable-ctype --enable-sockets --enable-calendar --enable-mbregex --enable-mbstring --enable-zip --enable-soap --enable-opcache
make
make test
make install

/home/myaccount/src/php-5.6.26/build/shtool install -c ext/phar/phar.phar /home/myaccount/bin
ln -s -f phar.phar /home/myaccount/bin/phar

$php -v
PHP 5.6.26 (cli) (built: Oct 10 2016 22:21:43)
Copyright (c) 1997-2016 The PHP Group
Zend Engine v2.6.0, Copyright (c) 1998-2016 Zend Technologies

cp php.ini-development /home/myaccount/myetc/php.ini

php.ini を編集。

 cgi.force_redirect = 0
 date.timezone = Asia/Tokyo
へ変更。

pecl install imagick
 php.ini に、
 extension=imagick.so
 を追記。

インストール直後のPear パッケージ
$pear list
Installed packages, channel pear.php.net:
=========================================
Package Version State
Archive_Tar 1.4.0 stable
Console_Getopt 1.4.1 stable
PEAR 1.10.1 stable
Structures_Graph 1.1.1 stable
XML_Util 1.3.0 stable