LoginSignup
0
0

More than 1 year has passed since last update.

AWS EC2にてPHPのRedis拡張機能を有効化する。

Posted at

PHPのREDIS拡張機能を追加する。

手順はシンプル
・インストール
・有効化

※以下、インストール
インストールにはpeclを利用する。

peclインストール

wget http://pear.php.net/go-pear.phar
php go-pear.phar

インストール時にオプション指定をいくつか設定できるが、
筆者はデフォルト設定にしたためEnterを押した。

PATHの追加

export PATH=$PATH:/home/ec2-user/pear/bin

redisのインストール

sudo pecl install redis

※以下、有効化

php.iniに以下を追加

extension=redis.so

Apache再起動

sudo service httpd restart

参考

https://pear.php.net/manual/en/installation.getting.php
https://self-development.info/%E3%80%90%E3%82%AD%E3%83%A3%E3%83%83%E3%82%B7%E3%83%A5%E5%88%A9%E7%94%A8%E3%80%91phpredis%E3%82%92%E4%BD%BF%E3%81%A3%E3%81%A6php%E3%81%8B%E3%82%89redis%E3%81%AB%E3%82%A2%E3%82%AF%E3%82%BB%E3%82%B9/

0
0
0

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
0