[FreeBSD10]php 5.4–> 5.6 へバージョンアップ

Pocket

pkg で roundcube を入れようとしたら php56 を連れてこようとするので、squirrelmail に逃げようかと思ったら、やっぱり php56 を連れてこようとする。しゃあないので、この際入れ替えてしまうかと。

○roundcube を入れようとしてみた

# pkg install roundcube
Updating FreeBSD repository catalogue...
Fetching meta.txz: 100%    944 B   0.9kB/s    00:01
Fetching packagesite.txz: 100%    5 MiB   1.9MB/s    00:03
Processing entries: 100%
FreeBSD repository update completed. 25308 packages processed.
The following 15 package(s) will be affected (of 0 checked):

New packages to be INSTALLED:
        roundcube: 1.1.5,1
        php56-zip: 5.6.22
        libzip: 1.1.2
        php56: 5.6.22
        php56-session: 5.6.22
        php56-xml: 5.6.22
        php56-iconv: 5.6.22
        php56-pdo_mysql: 5.6.22
        php56-mysql: 5.6.22
        php56-pdo: 5.6.22
        php56-mbstring: 5.6.22
        php56-filter: 5.6.22
        php56-json: 5.6.22
        php56-dom: 5.6.22
        pecl-intl: 3.0.0_2

The process will require 39 MiB more space.
6 MiB to be downloaded.

Proceed with this action? [y/N]: n

なんか、色々と当たりそうで怖いのでやめた(笑)。

○phpのリスト取得

# pkg info | grep php
mod_php5-5.4.45,1              PHP Scripting Language
php5-5.4.45                    PHP Scripting Language
php5-ctype-5.4.45              The ctype shared extension for php
php5-dom-5.4.45                The dom shared extension for php
php5-exif-5.4.45               The exif shared extension for php
php5-extensions-1.7            "meta-port" to install PHP extensions
php5-fileinfo-5.4.45           The fileinfo shared extension for php
php5-filter-5.4.45             The filter shared extension for php
php5-gd-5.4.45_1               The gd shared extension for php
php5-hash-5.4.45               The hash shared extension for php
php5-iconv-5.4.45              The iconv shared extension for php
php5-json-5.4.45               The json shared extension for php
php5-mbstring-5.4.45_1         The mbstring shared extension for php
php5-mcrypt-5.4.45             The mcrypt shared extension for php
php5-mysql-5.4.45              The mysql shared extension for php
php5-openssl-5.4.45            The openssl shared extension for php
php5-pdo-5.4.45                The pdo shared extension for php
php5-pdo_mysql-5.4.45          The pdo_mysql shared extension for php
php5-pdo_sqlite-5.4.45         The pdo_sqlite shared extension for php
php5-phar-5.4.45               The phar shared extension for php
php5-posix-5.4.45              The posix shared extension for php
php5-session-5.4.45            The session shared extension for php
php5-simplexml-5.4.45          The simplexml shared extension for php
php5-sqlite3-5.4.45            The sqlite3 shared extension for php
php5-tokenizer-5.4.45          The tokenizer shared extension for php
php5-xml-5.4.45                The xml shared extension for php
php5-xmlreader-5.4.45          The xmlreader shared extension for php
php5-xmlwriter-5.4.45          The xmlwriter shared extension for php
php5-zip-5.4.45                The zip shared extension for php
php5-zlib-5.4.45               The zlib shared extension for php

結構ぞろぞろ入ってるのね。とりあえずテキストに落としとく。

# pkg info | grep php | sed -e 's/-5.4.*//' -e 's/-1.7.*//' >php54.txt

php-extensions だけバージョン表記が違うので注意。
ついでに、インストール候補リストも作っとく。

# sed -e 's/php5/php56/' php54.txt > php56.txt

んでもって、一気に削除&インストール

# cat php54.txt | xargs pkg delete -y
# cat php56.txt | xargs pkg install -y

確認

# php -v
PHP 5.6.22 (cli) (built: Jun  2 2016 01:21:04)
Copyright (c) 1997-2016 The PHP Group
Zend Engine v2.6.0, Copyright (c) 1998-2016 Zend Technologies
    with Zend OPcache v7.0.6-dev, Copyright (c) 1999-2016, by Zend Technologies

# pkg info | grep php
mod_php56-5.6.22               PHP Scripting Language
php56-5.6.22                   PHP Scripting Language
php56-ctype-5.6.22             The ctype shared extension for php
php56-dom-5.6.22               The dom shared extension for php
php56-exif-5.6.22              The exif shared extension for php
php56-extensions-1.0           "meta-port" to install PHP extensions
php56-fileinfo-5.6.22          The fileinfo shared extension for php
php56-filter-5.6.22            The filter shared extension for php
php56-gd-5.6.22                The gd shared extension for php
php56-hash-5.6.22              The hash shared extension for php
php56-iconv-5.6.22             The iconv shared extension for php
php56-json-5.6.22              The json shared extension for php
php56-mbstring-5.6.22          The mbstring shared extension for php
php56-mcrypt-5.6.22            The mcrypt shared extension for php
php56-mysql-5.6.22             The mysql shared extension for php
php56-opcache-5.6.22           The opcache shared extension for php
php56-openssl-5.6.22           The openssl shared extension for php
php56-pdo-5.6.22               The pdo shared extension for php
php56-pdo_mysql-5.6.22         The pdo_mysql shared extension for php
php56-pdo_sqlite-5.6.22        The pdo_sqlite shared extension for php
php56-phar-5.6.22              The phar shared extension for php
php56-posix-5.6.22             The posix shared extension for php
php56-session-5.6.22           The session shared extension for php
php56-simplexml-5.6.22         The simplexml shared extension for php
php56-sqlite3-5.6.22           The sqlite3 shared extension for php
php56-tokenizer-5.6.22         The tokenizer shared extension for php
php56-xml-5.6.22               The xml shared extension for php
php56-xmlreader-5.6.22         The xmlreader shared extension for php
php56-xmlwriter-5.6.22         The xmlwriter shared extension for php
php56-zip-5.6.22               The zip shared extension for php
php56-zlib-5.6.22              The zlib shared extension for php

大丈夫そうなので、apache再起動。

# apachectl restart

ブラウザで見たら問題なさげだけど、なんか表示が遅くなった気がしないでもない。
まあいいか。どうせ、誰も見ない(をい)。

この記事にコメントする

Powered by WordPress, WP Theme designed by WSC Project. ログイン