前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >Codis 基础13

Codis 基础13

作者头像
franket
发布2022-03-22 16:38:41
2880
发布2022-03-22 16:38:41
举报
文章被收录于专栏:技术杂记技术杂记

启动 codis-proxy

代码语言:javascript
复制
[root@h102 codis]# bin/codis-proxy -c config.ini -L /tmp/proxy.log --cpu=2 --addr=0.0.0.0:19000 --http-addr=0.0.0.0:11000

  _____  ____    ____/ /  (_)  _____
 / ___/ / __ \  / __  /  / /  / ___/
/ /__  / /_/ / / /_/ /  / /  (__  )
\___/  \____/  \__,_/  /_/  /____/
...
...
...
修改codis-proxy状态
代码语言:javascript
复制
[root@h102 codis]# bin/codis-config proxy help
usage:
	codis-config proxy list
	codis-config proxy offline <proxy_name>
	codis-config proxy online <proxy_name>
[root@h102 codis]# bin/codis-config -c config.ini  proxy  list
[
  {
    "addr": "h102.temp:19000",
    "debug_var_addr": "h102.temp:11000",
    "description": "",
    "id": "proxy_1",
    "last_event": "",
    "last_event_ts": 0,
    "pid": 36715,
    "start_at": "2015-12-04 22:37:24.576758464 +0800 CST",
    "state": "offline"
  }
]
[root@h102 codis]# bin/codis-config -c config.ini  proxy  online proxy_1
{
  "msg": "OK",
  "ret": 0
}
[root@h102 codis]#

管理界面中的proxy状态

codis_proxystatus.png
codis_proxystatus.png

打开防火墙
代码语言:javascript
复制
[root@h102 ~]# vim /etc/sysconfig/iptables
[root@h102 ~]# grep 1.000 /etc/sysconfig/iptables
-A INPUT -p tcp -m state --state NEW -m tcp --dport 19000 -j ACCEPT 
-A INPUT -p tcp -m state --state NEW -m tcp --dport 11000 -j ACCEPT 
[root@h102 ~]# /etc/init.d/iptables reload 
iptables: Trying to reload firewall rules:                 [  OK  ]
[root@h102 ~]# iptables -L -nv | grep 1.000
    3   148 ACCEPT     tcp  --  *      *       0.0.0.0/0            0.0.0.0/0           state NEW tcp dpt:19000 
    0     0 ACCEPT     tcp  --  *      *       0.0.0.0/0            0.0.0.0/0           state NEW tcp dpt:11000 
[root@h102 ~]# 

本文系转载,前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文系转载前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
目录
  • 启动 codis-proxy
    • 修改codis-proxy状态
      • 打开防火墙
      领券
      问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档