This article mainly introduces the installation of redis on CentOS7, which has certain reference value. Now I share it with everyone. Friends in need can refer to it
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
The above is the detailed content of Install redis on CentOS7. For more information, please follow other related articles on the PHP Chinese website!