Rumah >pembangunan bahagian belakang >tutorial php >CentOS7安装redis
这篇文章主要介绍了关于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
Atas ialah kandungan terperinci CentOS7安装redis . Untuk maklumat lanjut, sila ikut artikel berkaitan lain di laman web China PHP!