redis 学习

来源:互联网 发布:碧然德 知乎 编辑:程序博客网 时间:2024/06/07 18:17

redis 重启:  redis-server &

redis 启动指定的config 文件: /redis-server redis.config &

(redis 总结:http://www.cnblogs.com/GoQC/p/5764201.html)


查看redis 进程:

[root@localhost ~]# ps -ef|grep redis
root      2053     1  0 Sep30 ?        00:55:52 redis-server *:6379
root     16138 16110  0 09:31 pts/1    00:00:00 grep redis

查看端口监听情况
[root@localhost ~]# netstat -lntp | grep 6379
tcp        0      0 0.0.0.0:6379                0.0.0.0:*                   LISTEN      2053/redis-server * 
tcp        0      0 :::6379                     :::*                        LISTEN      2053/redis-server * 




如果服务启动,但是外部还是访问不了,检查一下防火墙:

查看防火墙状态: 

[root@centos6 ~]# service iptables status

iptables:未运行防火墙。

开启防火墙:

[root@centos6 ~]# service iptables start

关闭防火墙:

[root@centos6 ~]# service iptables stop


原创粉丝点击