# # # #安装redis -2.8.3.tar.gzcd/usr/local/src/tar-zxvf redis-2.8.3.tar.gzcd redis-2.8.3make #or make Test # Test compile make install #开始编译安装
# Set up Database folder mkdir/var/lib/redis_db/-pvim/etc/redis.conf# Modify the following variables daemonize Yes # daemon run logfile "/var/log/redis.log" # log file dir/var/lib/redis_db/ # Data Persistence folder
Running Redis
Redis-server/etc/redis.conf
Compiling Phpredis
git clone https://github.com/phpredis/phpredis.git phprediscd phpredis/usr/local/php/bin/phpize./configure# The old high environment variable is not imported so the compile command is./configure--with-php-config=/usr/local/php/bin/php-configmake && make install
cp/usr/local/php/lib/php/extensions/no-debug-non-zts-20131226/redis.so/usr/local/php/lib/php/extensions/
Turn on Redis extensions
vim/etc/php.ini# add[redis]extension=redis.so
After restarting Apache or PHP-FPM, Phpinfo page
Linux servers configure Redis and enable PHP support