redis安装
[root@localhost ~]# cd /usr/local/redis/ [root@localhost redis]# vim redis.conf redis重启 [root@localhost redis]# pkill redis [root@localhost redis]# /usr/local/redis/redis-server /usr/local/redis/redis.conf redis [root@localhost ~]# cd /usr/local/redis/ [root@localhost redis]# ./redis-cli 安装redis 1、解压 [root@localhost ~]# tar zxvf redis-2.6.14.tar.gz 2、安装 [root@localhost ~]# cd redis-2.6.14 [root@localhost redis-2.6.14]# make && make install 3、创建redis的安装目录 [root@localhost redis-2.6.14]# mkdir -p /usr/local/redis 4、拷贝文件 [root@localhost redis-2.6.14]# cp /root/redis-2.6.14/redis.conf /usr/local/redis/ [root@localhost redis-2.6.14]# cp /root/redis-2.6.14/src/redis-server /usr/local/redis/ [root@localhost redis-2.6.14]# cp /root/redis-2.6.14/src/redis-cli /usr/local/redis/ redis.conf为配置文件 redis-server为服务端工具 redis-cli为客户端工具 5、启动redis [root@localhost redis-2.6.14]# /usr/local/redis/redis-server Port: 6379 占用的端口号 6、修改redis的配置文件 [root@localhost ~]# cd /usr/local/redis/ [root@localhost redis]# vim redis.conf 修改内容: daemonize no改为daemonize yes 7、用配置文件启动redis服务 [root@localhost redis]# ./redis-server redis.conf 8、检查是否启动 [root@localhost redis]# ps aux|grep redis 成功启动进程 root 3076 0.0 0.1 31756 1784 pts/0 Sl+ 18:29 0:00 /usr/local/redis/redis-server root 3103 0.0 0.0 5976 744 pts/1 S+ 18:36 0:00 grep redis