CentOS 7.x 編譯安裝 Redis

Redis

https://redis.io/


Download Redis

https://redis.io/download


下載 redis
cd /usr/local/src
lynx http://download.redis.io/releases/redis-4.0.14.tar.gz
lynx http://download.redis.io/releases/redis-5.0.6.tar.gz

安裝 redis
tar zxf redis-4.0.14.tar.gz
cd redis-4.0.14
make
make test
make install
cd utils
./install_server.sh

啟動 redis
/usr/local/bin/redis-server /etc/redis/6379.conf
命令列
/usr/local/bin/redis-cli
性能測試
/usr/local/bin/redis-benchmark -n 10000

phpredis/phpredis: A PHP extension for Redis

https://github.com/phpredis/phpredis


Releases · phpredis/phpredis

https://github.com/phpredis/phpredis/releases


下載 phpredis
cd /usr/local/src
lynx https://github.com/phpredis/phpredis/archive/4.3.0.tar.gz
lynx https://github.com/phpredis/phpredis/archive/5.1.1.tar.gz

安裝 phpredis
tar zxf phpredis-4.3.0.tar.gz
cd phpredis-4.3.0
/usr/local/php7/bin/phpize
./configure --with-php-config=/usr/local/php7/bin/php-config
make
make test
make install
make clean

設定 php.ini
vi /usr/local/php7/etc/php.ini
extension=redis.so
新增時間 2020-01-22
最後更新 2022-02-09