EPMS

Redis安装与PHP7.0扩展

落花浮王杯 提交于 2019-11-29 11:45:42
操作系统:CentOS7.2 64位 一、安装Redis 1.下载最新版本: $ wget http://download.redis.io/releases/redis-4.0.8.tar.gz $ tar xzf redis-4.0.8.tar.gz $ cp -p redis-4.0.8 /usr/local/redis4 $ cd redis4 $ make 这样就安装成功 2. 运行redis, 进入src目录,运行下面命令 $ src/redis-server 3. 测试: $ src/redis-cli redis> set hello world OK redis> get hello "world" 4. 自启动 $ cp /usr/local/redis4/redis.conf /etc/redis.conf $ vim /etc/redis.conf 编辑如下 daemonize yes $ cp /usr/local/redis4/utils/redis_init_script /etc/rc.d/init.d/redis $ cd /etc/rc.d/init.d/ $ vim redis #把里面的运行目录换成你自己的,并加上chkconfig和description #!/bin/sh # # Simple Redis init.d script