ラベル

Server (108) work (77) Idea (68) Car (31) PC (29) DAW (28) other (19) MakingWEBsite (18) 趣味 (18) health (13) CentOS (11) drupal (11) (9) android (4) スマホ (4) communication (3) drupal7 (3) hint (3) meno (3) モバイル (3) 歯医者 (3) 第二種電気工事士 (3) 英語 (3) PC Server (2) drupal8 (2) ms access (2) uwp C# (2) めし (2) 整備 (2) 音楽 (2) MIDI (1) diy (1) 会計 (1) 動画再生 (1) 生活 (1) 郵便 (1) 食べ物 (1)

2017年7月25日火曜日

PHP OPCODE CACHING opcache CentOS php7.1

CentOS 6.9 php7.1(remiリポジトリ)

drupalインストール後の設定。

phpにopcacheモジュールが組み込まれているかを確認する。
php -m | grep -i opcache

opcacheがインストールされているかどうかの確認。

インストールといっても、設定用のテキストファイルを設置するだけだと思う。
yum list installed | grep opcache

見当たらなかったので、opcacheを探した。

# yum --enablerepo=epel,remi,remi-php71 search opcache
Loaded plugins: fastestmirror, priorities, refresh-packagekit, security
Loading mirror speeds from cached hostfile
 * base: ftp.riken.jp
 * epel: ftp.riken.jp
 * extras: ftp.riken.jp
 * remi: rpms.remirepo.net
 * remi-php71: rpms.remirepo.net
 * remi-safe: rpms.remirepo.net
 * updates: ftp.riken.jp
==================================================== N/S Matched: opcache ====================================================
php-opcache.x86_64 : The Zend OPcache
php-pecl-zendopcache.x86_64 : The Zend OPcache
php54-php-pecl-zendopcache.x86_64 : The Zend OPcache
php55-php-opcache.x86_64 : The Zend OPcache
php56-php-opcache.x86_64 : The Zend OPcache
php70-php-opcache.x86_64 : The Zend OPcache
php71-php-opcache.x86_64 : The Zend OPcache

  Name and summary matches only, use "search all" for everything.

opcacheのインストール

yum --enablerepo=epel,remi,remi-php71 install php71-php-opcache
ここで上のように
php71-php-opcache.x86_64
をインストールしてしまったのが間違い。
yum --enablerepo=epel,remi,remi-php71 install php-opcache.x86_64
とすれば普通に今までの
/etc/php.ini
/etc/php.d

/etc/php.d/10-opcache.ini
が入ったのに、上のphp71-php-opcache.x86_64をインストールしてしまったために、
今までの場所にプラスして
/etc/opt/remi/php71/php.ini
/etc/opt/remi/php71/php.d/10-opcache.ini
へphp7.1が2重にインストールされてしまった。(今はアンインストールした。)
その時にインストールされたもの

  Dep-Install audit-libs-python-2.4.5-6.el6.x86_64            @base
    Dep-Install environment-modules-3.2.10-3.el6.x86_64         @base
    Dep-Install libsemanage-python-2.0.43-5.1.el6.x86_64        @base
    Dep-Install php71-php-common-7.1.7-1.el6.remi.x86_64        @remi
    Dep-Install php71-php-json-7.1.7-1.el6.remi.x86_64          @remi
    Install     php71-php-opcache-7.1.7-1.el6.remi.x86_64       @remi
    Dep-Install php71-runtime-1.0-1.el6.remi.x86_64             @remi
    Dep-Install policycoreutils-python-2.0.83-30.1.el6_8.x86_64 @base
    Dep-Install setools-libs-3.3.7-4.el6.x86_64                 @base
    Dep-Install setools-libs-python-3.3.7-4.el6.x86_64          @base
    Dep-Install tcl-1:8.5.7-6.el6.x86_64                        @base

上の赤線のphp71-だけをアンインストールしておいた。
php71-が
/etc/opt/remi/php71/php.d/
ディレクトリを作ってしまう。

で、
最後に
/etc/rc.d/init.d/httpd restart
を忘れずに。
drupalのopcacheエラーを消すにはdrupal側のキャッシュクリアが必要かもしれない。


PECL uploadprogress libraryをインストールする。

画像をアップロードするときに進度具合を表示するライブラリーかな?

PECL uploadprogress libraryを探す。
yum --enablerepo=epel,remi,remi-php71 search PECL-uploadprogress

PECL uploadprogress libraryをインストールする。yum --enablerepo=epel,remi,remi-php71 install php71-php-pecl-uploadprogress.x86_64
上もphp71-だったので、
/etc/opt/remi/php71/php.d/
にもインストールされてしまったので、アンインストールして入れなおした。

yum --enablerepo=epel,remi,remi-php71 install php-pecl-uploadprogress.x86_64


0 件のコメント:

コメントを投稿