這篇文章主要介紹了關於CentOS7安裝redis ,有著一定的參考價值,現在分享給大家,有需要的朋友可以參考一下
sudo yum install gcc gcc-c++
tar zxvf redis-4.0.9.tar.gzcd redis-4.0.9 make mkdir /application/redis mkdir /application/redis/bin mkdir /application/redis/etc cp src/redis-server src/redis-cli src/redis-benchmark src/redis-check-aof src/redis-sentinel /application/redis/bin/ cp redis.conf /application/redis/etc/
vi /etc/profileexport PATH="$PATH:/application/redis/bin"source /etc/profile
cd /application/redis bin/redis-server etc/redis.conf
kill `cat /var/run/redis_6379.pid`
vi /application/redis/etc/redis.conf 136行 daemonize yes
vi /etc/rc.local /application/redis/bin/redis-server /application/redis/etc/redis.conf &
sudo yum install autoconf
cd /root/package/ wget https://pecl.php.net/get/redis-4.0.2.tgztar zxvf redis-4.0.2.tgz cd redis-4.0.2/application/php/bin/phpize ./configure --with-php-config=/application/php/bin/php-config && make && make install
vi /application/php/lib/php.ini extension=redis.so(大约920行)
chmod +x /etc/rc.d/rc.local#
以上是CentOS7安裝redis的詳細內容。更多資訊請關注PHP中文網其他相關文章!