CentOS6.4下安装redis-2.6.14
CentOS6.4下安装redis-2.6.14
1.如果你是安装的CentOS桌面版的话,看上一blog,先安装gcc,gdb,g++ 等工具,
2,安装图为:
这一步,你想移动就移动,如果不想移动就可以放在当前文件目录下,
作一个软连接,如:
ln /usr/redis2.6.4/src/redis-server /usr/bin/
ln /usr/redis2.6.4/src/redis-cli /usr/bin/
这样 下次就可以直接用 redis-server 启动了,
在redis-2.6.4 文件下 mkdir conf
再 cp redis.conf conf/ copy 到此文件内,
修改 redis.conf 中的参数:
daemonize no 修改为 yes ,表示以后台方式启动。root 8245 1 0 16:05 ? 00:00:00 redis-server /usr/redis-2.6.14/conf/redis.conf
root 8764 4514 0 16:18 pts/1 00:00:00 grep redis
3.redis 的 默认端口是 6379 ,再查看端口:
[[email protected] redis-2.6.14]# netstat -tunpl | grep 6379
tcp 0 0 0.0.0.0:6379 0.0.0.0:* LISTEN 8245/redis-server
4. 杀掉redis-serve 用:
[[email protected] redis-2.6.14]# pkill redis-server --kill 进程
[[email protected] redis-2.6.14]# netstat -tunpl | grep 6379 --再查看端口就没有被占用
[[email protected] redis-2.6.14]#
或用:
[[email protected] redis-2.6.14]# redis-cli shutdown --kill 进程
[[email protected] redis-2.6.14]# netstat -tunpl | grep 6379
[[email protected] redis-2.6.14]#
附件中上传一份操作手册,网上找的。