LoginSignup
0

More than 5 years have passed since last update.

Yet another 「php 5.6 で memcache をインストールする手順」

Last updated at Posted at 2016-06-11

前置き

php での memcache のインストールは以下のコマンドだけで終わります。普通は。

$ yum install php-pecl-memcache

が、環境によってはうまく行かない場合もあるようです。(php5.6環境なのに、古いバージョンのphpを求められたとか。)その時のための覚書です。

手順

  1. $ yum install php56-php-pecl-memcache を実行。
  2. /opt/remi/php56/root/usr/lib64/php/modules/memcache.so を、/usr/lib64/php/modules/ へ、コピーする。
  3. /etc/php.iniを修正し、extension=memcache.soを最終行などに追加する。
  4. apache を再起動する。/etc/init.d/httpd restart

何の事はない。yum で入れた memcache.so を、 php.ini に登録するだけです。

確認

[root@dev2-mng ~]# php -m | grep memcache
memcache

確証ないですが、多分これでOKではないかと。お試しあれ。

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0