redis cluster 4.0.9 之三: startup stop

news/2024/7/7 16:43:37

os: centos7.4
redis:4.0.9
ruby:2.3.4

ip 规划

redis1    192.168.56.101
redis2    192.168.56.102

用两台虚拟机模拟6个redis节点。
分别为
192.168.56.101 的 9001、9002、9003 端口,
192.168.56.102 的 9001、9002、9003 端口。

start redis cluster

# redis-server --help
Usage: ./redis-server [/path/to/redis.conf] [options]
       ./redis-server - (read config from stdin)
       ./redis-server -v or --version
       ./redis-server -h or --help
       ./redis-server --test-memory <megabytes>

Examples:
       ./redis-server (run the server with default conf)
       ./redis-server /etc/redis/6379.conf
       ./redis-server --port 7777
       ./redis-server --port 7777 --slaveof 127.0.0.1 8888
       ./redis-server /etc/myredis.conf --loglevel verbose

Sentinel mode:
       ./redis-server /etc/sentinel.conf --sentinel

# vi redis_start.sh
redis-server /usr/redis/redis-cluster-data/9001/redis.conf
redis-server /usr/redis/redis-cluster-data/9002/redis.conf
redis-server /usr/redis/redis-cluster-data/9003/redis.conf

stop redis cluster

# redis-cli -h 192.168.56.101 -p 9001 -c 
192.168.56.101:9001> SHUTDOWN 

或者 kill 进程
# ps -ef|grep -i redis
root      4059  1851  0 05:49 pts/0    00:00:00 grep --color=auto -i redis
root     11330     1  0 May18 ?        00:00:24 redis-server 192.168.56.101:9002 [cluster]
root     11340     1  0 May18 ?        00:00:24 redis-server 192.168.56.101:9003 [cluster]
root     11738     1  0 May18 ?        00:00:22 redis-server 192.168.56.101:9001 [cluster]
# kill 11330


http://www.niftyadmin.cn/n/2124306.html

相关文章

emctl start dbconsole起不来问题的解决

emctl start dbconsole起不来问题的解决 要想打开OEM的web管理程序&#xff0c;必须先启动Database listener&#xff0c;再启动Datebase Control端口监控程序&#xff0c;但是碰到下面的情况. [oracleredhat bin]$ emctl dbconsole start TZ set to PRC EM Configuration…

postgresql 监控 table、column 的备注

最近在整理postgresql数据库的表、列的备注信息时&#xff0c;用到了如下的sql 表、视图、分区表的备注 with tmp_tab as (select pc.oid as ooid,pn.nspname,pc.*from pg_class pcleft outer join pg_namespace pnon pc.relnamespace pn.oidwhere 11and pc.relkind in (r,v,…

初识Oracle裸设备二十问

1&#xff0e;什么叫做裸设备&#xff1f; 裸设备&#xff0c;也叫裸分区&#xff08;原始分区&#xff09;&#xff0c;是一种没有经过格式化&#xff0c;不被Unix通过文件系统来读取的特殊字符设备。它由应用程序负责对它进行读写操作。不经过文件系统的缓冲。 2&#xff0…

postgresql 使用 analyze 收集统计信息

os: centos7.4 postgresql:9.6.8 查看os进程 $ ps -ef|grep -i post |grep -i stat postgres 10782 10770 0 May09 ? 00:02:42 postgres: stats collector process表的信息 mondb# select pg_size_pretty(pg_relation_size(t_gather_pgsql_space_table)), pg_size_…

postgresql 9.x 的base backup + restore + pitr(point in time recovery)

os: centos6.8 postgresql:9.1.22 base backup 最初使用 tar 花费4个小时&#xff0c;之后改为 pigz 只花费了30分钟。 # vi /backup_scripts/pg_basebackup.sh #!/bin/bashDATEdate %Y%m%d#删除14天前的物理备份 echo "############################################…

windows下的oracle迁移到linux上

最近学习了一下oracle数据库启动原理&#xff0c;于是&#xff0c;就把在Windows创建起来做测试的数据库。 移植到linux下使用,前几天把Linux移植到Windows成功&#xff0c;但Windows移植到Linux碰到问题会多&#xff0c; Windows下不区分大小写&#xff0c;但在Linux是区分的&…

postgresql 9.x 10.x 的 pg_dumpall 备份数据库

前一段时间使用pg_dump备份了单个数据库&#xff0c;今天试了下 pg_dumpall。 pg_dumpall -U postgres -h 127.0.0.1 -p 54320 -v -f /var/lib/pgsql/10/pgdumpall_20180529 中间会看到如下日志 pg_dumpall: dumping database "mondb"... pg_dumpall: running "…

mysql中limit用法详解

Mysql中limit的用法详解 在我们使用查询语句的时候&#xff0c;经常要返回前几条或者中间某几行数据&#xff0c;这个时候怎么办呢&#xff1f;不用担心&#xff0c;mysql已经为我们提供了这样一个功能&#xff0c;尽管语法逻辑很是怪异。这个功能就好比oracle里的rownum&#…