【玩转云耀云服务器HECS】华为云之使用HECS部署Redis数据库

举报
江湖有缘 发表于 2023/03/06 14:30:06 2023/03/06
【摘要】 【玩转云耀云服务器HECS】华为云之使用HECS部署Redis数据库

一、Redis数据库介绍

1.Redis数据库简介

Redis 是完全开源的,遵守 BSD 协议,是一个高性能的 key-value 数据库。

2.Redis数据库特点

  • Redis支持数据的持久化,可以将内存中的数据保存在磁盘中,重启的时候可以再次加载进行使用。
  • Redis不仅仅支持简单的key-value类型的数据,同时还提供list,set,zset,hash等数据结构的存储。
  • Redis支持数据的备份,即master-slave模式的数据备份。

二、HECS云耀云服务器介绍

1.HECS云耀云服务器简介

HECS(云耀云服务器)是可以快速搭建简单应用的新一代云服务器,具备独立、完整的操作系统和网络功能,适用于网站搭建、开发环境等低负载应用场景。

image.png

2.HECS云耀云服务器特点

  • 易搭建:支持一站式配置指导,预装第三方市场镜像,新手小白也分钟级完成应用搭建
  • 更实惠: 场景化套餐推荐,快速构建业务系统;根据用户业务诉求适配套餐,轻松购买更省力
  • 易维护:极简控制台可视化管理;全方位性能监测,智能助手瑶光加持,保障业务稳定无忧
  • 更安全: 主机安全防御、免费安全体检、安全升级指导、安全体检报告,多重保护性能无忧

三、本次技术分享介绍

1.熟练使用华为云云耀云服务器HECS产品;
2.使用HECS云耀云服务器部署Redis数据库;
3.可以远程连接Redis数据库,熟悉Redis的基本操作。

四、购买华为云HECS云耀云服务器

1.购买说明

1.新用户可以直接前往开发者试用专区,免费领取ECS云耀云服务器,
官网地址:https://activity.huaweicloud.cn/free_test/index.html
2.老用户直接选择包月购买即可。

image.png

2.进入购买界面

登录华为云官网,控制台——服务列表——云耀云服务器HECS

image.png

image.png

3.购买华为云HECS云耀云服务器

选择购买HECS云耀云服务器

image.png

区域:可定义,这里选择是西南——贵阳一;
系统镜像:选择centos7.6操作系统;
配置:选择入门型的即可,用于学习和测试;
密码:设置root密码,自定义。

image.png

增值服务:可勾选“开启详细云监控”,免费试用;
购买时长:选择一个月即可;
购买量:1台;
配置完毕后,选择立即购买

image.png

image.png
image.png

4.查看购买的HECS状态

选择服务列表——云耀云服务器HECS,进入HECS控制台,看到刚购买的HECS云耀云服务器。

image.png

image.png

五、本地远程连接HECS

1.查看HECS的弹性公网IP

在HECS控制面板,查看当前云服务器的弹性公网IP。

image.png

2.本地连接HECS

打开本地Xshell工具,输入公网IP,云服务器的账号密码进行远程连接。

image.png

3.查看系统版本

检查操作系统版本

[root@hecs-4981 ~]# cat /etc/centos-release
CentOS Linux release 7.6.1810 (Core) 

4.检查系统内核版本

[root@hecs-4981 ~]# uname -r 
3.10.0-1160.53.1.el7.x86_64


六、下载Redis软件包

1.创建下载目录

创建Redis软件包的下载目录

[root@hecs-4981 ~]# mkdir -p /data/redis
[root@hecs-4981 ~]# cd /data/redis/
[root@hecs-4981 redis]# 

2.下载Redis软件包

redis下载地址: https://download.redis.io/releases

[root@hecs-4981 redis]#  wget https://download.redis.io/releases/redis-6.2.6.tar.gz
--2023-03-06 10:32:48--  https://download.redis.io/releases/redis-6.2.6.tar.gz
Resolving download.redis.io (download.redis.io)... 45.60.125.1
Connecting to download.redis.io (download.redis.io)|45.60.125.1|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 2476542 (2.4M) [application/octet-stream]
Saving to: ‘redis-6.2.6.tar.gz’

100%[==========================================================================================================>] 2,476,542   4.63MB/s   in 0.5s   

2023-03-06 10:32:50 (4.63 MB/s) - ‘redis-6.2.6.tar.gz’ saved [2476542/2476542]

3.解压Redis软件包

将Redis软件包进行解压

[root@hecs-4981 redis]# tar -xzf redis-6.2.6.tar.gz 
[root@hecs-4981 redis]# ls
redis-6.2.6  redis-6.2.6.tar.gz
[root@hecs-4981 redis]# ls redis-6.2.6
00-RELEASENOTES  CONDUCT       COPYING  INSTALL   MANIFESTO  redis.conf  runtest-cluster    runtest-sentinel  src    TLS.md
BUGS             CONTRIBUTING  deps     Makefile  README.md  runtest     runtest-moduleapi  sentinel.conf     tests  utils

4.查看Redis目录的结构

使用tree命令查看Redis源码目录结构

[root@hecs-4981 redis]# tree redis-6.2.6 -L 2
redis-6.2.6
├── 00-RELEASENOTES
├── BUGS
├── CONDUCT
├── CONTRIBUTING
├── COPYING
├── deps
│   ├── hdr_histogram
│   ├── hiredis
│   ├── jemalloc
│   ├── linenoise
│   ├── lua
│   ├── Makefile
│   ├── README.md
│   └── update-jemalloc.sh
├── INSTALL
├── Makefile
├── MANIFESTO
├── README.md
├── redis.conf
├── runtest
├── runtest-cluster
├── runtest-moduleapi
├── runtest-sentinel
├── sentinel.conf
├── src
│   ├── acl.c
│   ├── adlist.c
│   ├── adlist.h
│   ├── ae.c
│   ├── ae_epoll.c
│   ├── ae_evport.c
│   ├── ae.h
│   ├── ae_kqueue.c
│   ├── ae_select.c
│   ├── anet.c
│   ├── anet.h
│   ├── aof.c
│   ├── asciilogo.h
│   ├── atomicvar.h
│   ├── bio.c
│   ├── bio.h
│   ├── bitops.c
│   ├── blocked.c
│   ├── childinfo.c
│   ├── cli_common.c
│   ├── cli_common.h
│   ├── cluster.c
│   ├── cluster.h
│   ├── config.c
│   ├── config.h
│   ├── connection.c
│   ├── connection.h
│   ├── connhelpers.h
│   ├── crc16.c
│   ├── crc16_slottable.h
│   ├── crc64.c
│   ├── crc64.h
│   ├── crcspeed.c
│   ├── crcspeed.h
│   ├── db.c
│   ├── debug.c
│   ├── debugmacro.h
│   ├── defrag.c
│   ├── dict.c
│   ├── dict.h
│   ├── endianconv.c
│   ├── endianconv.h
│   ├── evict.c
│   ├── expire.c
│   ├── fmacros.h
│   ├── geo.c
│   ├── geo.h
│   ├── geohash.c
│   ├── geohash.h
│   ├── geohash_helper.c
│   ├── geohash_helper.h
│   ├── gopher.c
│   ├── help.h
│   ├── hyperloglog.c
│   ├── intset.c
│   ├── intset.h
│   ├── latency.c
│   ├── latency.h
│   ├── lazyfree.c
│   ├── listpack.c
│   ├── listpack.h
│   ├── listpack_malloc.h
│   ├── localtime.c
│   ├── lolwut5.c
│   ├── lolwut6.c
│   ├── lolwut.c
│   ├── lolwut.h
│   ├── lzf_c.c
│   ├── lzf_d.c
│   ├── lzf.h
│   ├── lzfP.h
│   ├── Makefile
│   ├── memtest.c
│   ├── mkreleasehdr.sh
│   ├── module.c
│   ├── modules
│   ├── monotonic.c
│   ├── monotonic.h
│   ├── mt19937-64.c
│   ├── mt19937-64.h
│   ├── multi.c
│   ├── networking.c
│   ├── notify.c
│   ├── object.c
│   ├── pqsort.c
│   ├── pqsort.h
│   ├── pubsub.c
│   ├── quicklist.c
│   ├── quicklist.h
│   ├── rand.c
│   ├── rand.h
│   ├── rax.c
│   ├── rax.h
│   ├── rax_malloc.h
│   ├── rdb.c
│   ├── rdb.h
│   ├── redisassert.h
│   ├── redis-benchmark.c
│   ├── redis-check-aof.c
│   ├── redis-check-rdb.c
│   ├── redis-cli.c
│   ├── redismodule.h
│   ├── redis-trib.rb
│   ├── release.c
│   ├── replication.c
│   ├── rio.c
│   ├── rio.h
│   ├── scripting.c
│   ├── sdsalloc.h
│   ├── sds.c
│   ├── sds.h
│   ├── sentinel.c
│   ├── server.c
│   ├── server.h
│   ├── setcpuaffinity.c
│   ├── setproctitle.c
│   ├── sha1.c
│   ├── sha1.h
│   ├── sha256.c
│   ├── sha256.h
│   ├── siphash.c
│   ├── slowlog.c
│   ├── slowlog.h
│   ├── solarisfixes.h
│   ├── sort.c
│   ├── sparkline.c
│   ├── sparkline.h
│   ├── stream.h
│   ├── syncio.c
│   ├── testhelp.h
│   ├── t_hash.c
│   ├── timeout.c
│   ├── t_list.c
│   ├── tls.c
│   ├── tracking.c
│   ├── t_set.c
│   ├── t_stream.c
│   ├── t_string.c
│   ├── t_zset.c
│   ├── util.c
│   ├── util.h
│   ├── valgrind.sup
│   ├── version.h
│   ├── ziplist.c
│   ├── ziplist.h
│   ├── zipmap.c
│   ├── zipmap.h
│   ├── zmalloc.c
│   └── zmalloc.h
├── tests
│   ├── assets
│   ├── cluster
│   ├── helpers
│   ├── instances.tcl
│   ├── integration
│   ├── modules
│   ├── sentinel
│   ├── support
│   ├── test_helper.tcl
│   ├── tmp
│   └── unit
├── TLS.md
└── utils
    ├── build-static-symbols.tcl
    ├── cluster_fail_time.tcl
    ├── corrupt_rdb.c
    ├── create-cluster
    ├── generate-command-help.rb
    ├── gen-test-certs.sh
    ├── graphs
    ├── hashtable
    ├── hyperloglog
    ├── install_server.sh
    ├── lru
    ├── redis-copy.rb
    ├── redis_init_script
    ├── redis_init_script.tpl
    ├── redis-sha1.rb
    ├── releasetools
    ├── speed-regression.tcl
    ├── srandmember
    ├── systemd-redis_multiple_servers@.service
    ├── systemd-redis_server.service
    ├── tracking_collisions.c
    └── whatisdoing.sh

26 directories, 184 files


七、编译Redis源码包

1.安装环境依赖

安装环境依赖

yum -y install gcc automake autoconf libtool make

2.编译Redis前准备工作

在deps目录下执行以下命令:

[root@hecs-4981 deps]# ls
hdr_histogram  hiredis  jemalloc  linenoise  lua  Makefile  README.md  update-jemalloc.sh
[root@hecs-4981 deps]# make lua hiredis linenoise hdr_histogram jemalloc

3.开始编译Redis

在Redis源码目录./src/下,编译redis

[root@hecs-4981 src]# pwd
/data/redis/redis-6.2.6/src
[root@hecs-4981 src]# make PREFIX=/usr/local/redis MALLOC=libc install

image.png

八、启动Redis服务

1.配置环境变量

vim /etc/profile.d/redis.sh

[root@hecs-4981 src]# cat  /etc/profile.d/redis.sh
#!/bin/bash
##########################################################
#File Name:/etc/profile.d/redis.sh
#Version:V1.0
#Aurhor:jeven
#Emali:111116@qq.com
#Created Time:2023-03-06 11:53:28
#Description:
##########################################################
export PATH=$PATH:/usr/local/redis/bin

使变量文件生效

[root@hecs-4981 src]# source !$
source /etc/profile.d/redis.sh


2.检查redis版本

检查安装的Redis版本

[root@hecs-4981 src]# redis-server --version
Redis server v=6.2.6 sha=00000000:0 malloc=libc bits=64 build=efa06b788d254775


3.创建redis相关目录

创建redis相关目录

mkdir -p /usr/local/redis/{etc,logs,data}

4.编辑redis配置文件

编辑redis配置文件

[root@hecs-4981 src]# cat  /usr/local/redis/etc/redis.conf

daemonize yes
supervised systemd
pidfile /var/run/redis.pid
port 6379
logfile /usr/local/redis/logs/redis.log
dbfilename dump.rdb
dir /usr/local/redis/data

maxmemory 1G

bind 192.168.0.146 127.0.0.1

timeout 300
loglevel notice

databases 16
save 900 1
save 300 10
save 60 10000

rdbcompression yes

maxclients 10000
appendonly yes
appendfilename appendonly.aof
appendfsync everysec



5.启动redis服务

直接使用redis-server命令启动redis服务

redis-server /usr/local/redis/etc/redis.conf

6.检查redis服务状态

检查redis服务的进程是否正常启动

[root@hecs-4981 src]#  ps -ef |grep redis
root     16448     1  0 12:49 ?        00:00:00 redis-server 192.168.0.146:6379
root     16453  1553  0 12:49 pts/0    00:00:00 grep --color=auto redis


7.测试本地连接redis数据库

在本地HECS云耀云服务器中,连接Redis数据库。

[root@hecs-4981 src]# redis-cli -h 192.168.0.146 -p 6379
192.168.0.146:6379> info
# Server
redis_version:6.2.6
redis_git_sha1:00000000
redis_git_dirty:0
redis_build_id:efa06b788d254775
redis_mode:standalone
os:Linux 3.10.0-1160.53.1.el7.x86_64 x86_64
arch_bits:64
multiplexing_api:epoll
atomicvar_api:atomic-builtin
gcc_version:4.8.5
process_id:16448
process_supervised:no
run_id:9a11c75af9064ee4b97a19132bd68f2f4e81b527
tcp_port:6379
server_time_usec:1678078384098266
uptime_in_seconds:195
uptime_in_days:0
hz:10
configured_hz:10
lru_clock:356784
executable:/data/redis/redis-6.2.6/src/redis-server
config_file:/usr/local/redis/etc/redis.conf
io_threads_active:0

# Clients
connected_clients:1
cluster_connections:0
maxclients:10000
client_recent_max_input_buffer:48
client_recent_max_output_buffer:0
blocked_clients:0
tracking_clients:0
clients_in_timeout_table:0

# Memory
used_memory:936080
used_memory_human:914.14K
used_memory_rss:2482176
used_memory_rss_human:2.37M
used_memory_peak:990880
used_memory_peak_human:967.66K
used_memory_peak_perc:94.47%
used_memory_overhead:901168
used_memory_startup:884112
used_memory_dataset:34912
used_memory_dataset_perc:67.18%
allocator_allocated:901664
allocator_active:2444288
allocator_resident:2444288
total_system_memory:1038635008
total_system_memory_human:990.52M
used_memory_lua:37888
used_memory_lua_human:37.00K
used_memory_scripts:0
used_memory_scripts_human:0B
number_of_cached_scripts:0
maxmemory:1000000000
maxmemory_human:953.67M
maxmemory_policy:noeviction
allocator_frag_ratio:2.71
allocator_frag_bytes:1542624
allocator_rss_ratio:1.00
allocator_rss_bytes:0
rss_overhead_ratio:1.02
rss_overhead_bytes:37888
mem_fragmentation_ratio:2.75
mem_fragmentation_bytes:1580512
mem_not_counted_for_evict:20
mem_replication_backlog:0
mem_clients_slaves:0
mem_clients_normal:17032
mem_aof_buffer:24
mem_allocator:libc
active_defrag_running:0
lazyfree_pending_objects:0
lazyfreed_objects:0

# Persistence
loading:0
current_cow_size:0
current_cow_size_age:0
current_fork_perc:0.00
current_save_keys_processed:0
current_save_keys_total:0
rdb_changes_since_last_save:0
rdb_bgsave_in_progress:0
rdb_last_save_time:1678078189
rdb_last_bgsave_status:ok
rdb_last_bgsave_time_sec:-1
rdb_current_bgsave_time_sec:-1
rdb_last_cow_size:0
aof_enabled:1
aof_rewrite_in_progress:0
aof_rewrite_scheduled:0
aof_last_rewrite_time_sec:-1
aof_current_rewrite_time_sec:-1
aof_last_bgrewrite_status:ok
aof_last_write_status:ok
aof_last_cow_size:0
module_fork_in_progress:0
module_fork_last_cow_size:0
aof_current_size:0
aof_base_size:0
aof_pending_rewrite:0
aof_buffer_length:0
aof_rewrite_buffer_length:0
aof_pending_bio_fsync:0
aof_delayed_fsync:0

# Stats
total_connections_received:1
total_commands_processed:1
instantaneous_ops_per_sec:0
total_net_input_bytes:31
total_net_output_bytes:20324
instantaneous_input_kbps:0.00
instantaneous_output_kbps:0.00
rejected_connections:0
sync_full:0
sync_partial_ok:0
sync_partial_err:0
expired_keys:0
expired_stale_perc:0.00
expired_time_cap_reached_count:0
expire_cycle_cpu_milliseconds:2
evicted_keys:0
keyspace_hits:0
keyspace_misses:0
pubsub_channels:0
pubsub_patterns:0
latest_fork_usec:0
total_forks:0
migrate_cached_sockets:0
slave_expires_tracked_keys:0
active_defrag_hits:0
active_defrag_misses:0
active_defrag_key_hits:0
active_defrag_key_misses:0
tracking_total_keys:0
tracking_total_items:0
tracking_total_prefixes:0
unexpected_error_replies:0
total_error_replies:0
dump_payload_sanitizations:0
total_reads_processed:2
total_writes_processed:1
io_threaded_reads_processed:0
io_threaded_writes_processed:0

# Replication
role:master
connected_slaves:0
master_failover_state:no-failover
master_replid:d0a9e58fc295749a6391afa505467e1684dde607
master_replid2:0000000000000000000000000000000000000000
master_repl_offset:0
second_repl_offset:-1
repl_backlog_active:0
repl_backlog_size:1048576
repl_backlog_first_byte_offset:0
repl_backlog_histlen:0

# CPU
used_cpu_sys:0.067942
used_cpu_user:0.069307
used_cpu_sys_children:0.000000
used_cpu_user_children:0.000000
used_cpu_sys_main_thread:0.067996
used_cpu_user_main_thread:0.069232

# Modules

# Errorstats

# Cluster
cluster_enabled:0

# Keyspace

8.systemd服务管理redis

编辑redis启动服务文件

[root@hecs-4981 src]# cat   /usr/lib/systemd/system/redis.service
[Unit]
Description=redis-server
After=network.target

[Service]
Type=forking
ExecStart=/usr/local/redis/bin/redis-server   /usr/local/redis/etc/redis.conf
PrivateTmp=true

[Install]
WantedBy=multi-user.target


启动redis服务

systemctl daemon-reload  && systemctl start redis && systemctl enable  redis

检查redis服务状态

[root@hecs-4981 ~]# systemctl status redis
● redis.service - redis-server
   Loaded: loaded (/usr/lib/systemd/system/redis.service; enabled; vendor preset: disabled)
   Active: active (running) since Mon 2023-03-06 14:16:43 CST; 1s ago
  Process: 1460 ExecStart=/usr/local/redis/bin/redis-server /usr/local/redis/etc/redis.conf (code=exited, status=0/SUCCESS)
 Main PID: 1461 (redis-server)
   CGroup: /system.slice/redis.service
           └─1461 /usr/local/redis/bin/redis-server 192.168.0.146:6379

Mar 06 14:16:43 hecs-4981 systemd[1]: Starting redis-server...
Mar 06 14:16:43 hecs-4981 systemd[1]: Started redis-server.



九、安全组及防火墙配置

1.关闭防火墙

关闭防火墙,如果需要开启防火墙,则需要放行6379端口

systemctl stop firewalld && systemctl disable firewalld

2.关闭selinux

 sed -i 's/SELINUX=enforcing/SELINUX=disabled/' /etc/selinux/config
 getenforce 

3.HECS的安全组设置

进入HECS安全组管理页面

image.png

安全组放行6379端口

image.png

十、远程访问Redis数据库服务

1.设置redis密码

默认redis密码为空,本地连接redis设置密码。

[root@hecs-4981 ~]# redis-cli -h 192.168.0.146 -p 6379
192.168.0.146:6379> config get requirepass
1) "requirepass"
2) ""

>config set requirepass 123456
>OK

2.远程连接HECS的redis数据库服务

远程连接HECS的redis数据库服务

[root@server ~]# redis-cli  -h 140.210.218.184 -p 6379 -a 123456
[root@server ~]# redis-cli  -h 140.210.218.184 -p 6379 -a Sz.1314520
140.210.218.184:6379> info
# Server
redis_version:6.2.6
redis_git_sha1:00000000
redis_git_dirty:0
redis_build_id:efa06b788d254775
redis_mode:standalone
os:Linux 3.10.0-1160.53.1.el7.x86_64 x86_64
arch_bits:64
multiplexing_api:epoll
atomicvar_api:atomic-builtin
gcc_version:4.8.5
process_id:1461
process_supervised:no
run_id:5872b0c9a827ed2737f7153766579b43812fad7f
tcp_port:6379
server_time_usec:1678083811849622
uptime_in_seconds:408
uptime_in_days:0
hz:10
configured_hz:10
lru_clock:362211
executable:/usr/local/redis/bin/redis-server
config_file:/usr/local/redis/etc/redis.conf
io_threads_active:0

# Clients
connected_clients:2
cluster_connections:0
maxclients:10000
client_recent_max_input_buffer:48
client_recent_max_output_buffer:0
blocked_clients:0
tracking_clients:0
clients_in_timeout_table:0

# Memory
used_memory:953840
used_memory_human:931.48K
used_memory_rss:2490368
used_memory_rss_human:2.38M
used_memory_peak:1008688
used_memory_peak_human:985.05K
used_memory_peak_perc:94.56%
used_memory_overhead:918248
used_memory_startup:884160
used_memory_dataset:35592
used_memory_dataset_perc:51.08%
allocator_allocated:919424
allocator_active:2452480
allocator_resident:2452480
total_system_memory:1038635008
total_system_memory_human:990.52M
used_memory_lua:37888
used_memory_lua_human:37.00K
used_memory_scripts:0
used_memory_scripts_human:0B
number_of_cached_scripts:0
maxmemory:1000000000
maxmemory_human:953.67M
maxmemory_policy:noeviction
allocator_frag_ratio:2.67
allocator_frag_bytes:1533056
allocator_rss_ratio:1.00
allocator_rss_bytes:0
rss_overhead_ratio:1.02
rss_overhead_bytes:37888
mem_fragmentation_ratio:2.71
mem_fragmentation_bytes:1570944
mem_not_counted_for_evict:20
mem_replication_backlog:0
mem_clients_slaves:0
mem_clients_normal:34064
mem_aof_buffer:24
mem_allocator:libc
active_defrag_running:0
lazyfree_pending_objects:0
lazyfreed_objects:0

# Persistence
loading:0
current_cow_size:0
current_cow_size_age:0
current_fork_perc:0.00
current_save_keys_processed:0
current_save_keys_total:0
rdb_changes_since_last_save:0
rdb_bgsave_in_progress:0
rdb_last_save_time:1678083403
rdb_last_bgsave_status:ok
rdb_last_bgsave_time_sec:-1
rdb_current_bgsave_time_sec:-1
rdb_last_cow_size:0
aof_enabled:1
aof_rewrite_in_progress:0
aof_rewrite_scheduled:0
aof_last_rewrite_time_sec:-1
aof_current_rewrite_time_sec:-1
aof_last_bgrewrite_status:ok
aof_last_write_status:ok
aof_last_cow_size:0
module_fork_in_progress:0
module_fork_last_cow_size:0
aof_current_size:0
aof_base_size:0
aof_pending_rewrite:0
aof_buffer_length:0
aof_rewrite_buffer_length:0
aof_pending_bio_fsync:0
aof_delayed_fsync:0

# Stats
total_connections_received:2
total_commands_processed:6
instantaneous_ops_per_sec:0
total_net_input_bytes:225
total_net_output_bytes:40725
instantaneous_input_kbps:0.00
instantaneous_output_kbps:0.00
rejected_connections:0
sync_full:0
sync_partial_ok:0
sync_partial_err:0
expired_keys:0
expired_stale_perc:0.00
expired_time_cap_reached_count:0
expire_cycle_cpu_milliseconds:5
evicted_keys:0
keyspace_hits:0
keyspace_misses:0
pubsub_channels:0
pubsub_patterns:0
latest_fork_usec:0
total_forks:0
migrate_cached_sockets:0
slave_expires_tracked_keys:0
active_defrag_hits:0
active_defrag_misses:0
active_defrag_key_hits:0
active_defrag_key_misses:0
tracking_total_keys:0
tracking_total_items:0
tracking_total_prefixes:0
unexpected_error_replies:0
total_error_replies:0
dump_payload_sanitizations:0
total_reads_processed:7
total_writes_processed:6
io_threaded_reads_processed:0
io_threaded_writes_processed:0

# Replication
role:master
connected_slaves:0
master_failover_state:no-failover
master_replid:d4bd6d6fdc6e42a2d9bb1b423f4f67c8b32ec7fe
master_replid2:0000000000000000000000000000000000000000
master_repl_offset:0
second_repl_offset:-1
repl_backlog_active:0
repl_backlog_size:1048576
repl_backlog_first_byte_offset:0
repl_backlog_histlen:0

# CPU
used_cpu_sys:0.151776
used_cpu_user:0.134048
used_cpu_sys_children:0.000000
used_cpu_user_children:0.000000
used_cpu_sys_main_thread:0.152431
used_cpu_user_main_thread:0.133377

# Modules

# Errorstats

# Cluster
cluster_enabled:0

# Keyspace

【玩转“云耀云服务器(HECS)”有奖征文来袭!惊喜大礼包激励等你来拿!】有奖征文第20期正在火热进行中:
https://bbs.huaweicloud.cn/blogs/391930

【版权声明】本文为华为云社区用户原创内容,转载时必须标注文章的来源(华为云社区)、文章链接、文章作者等基本信息, 否则作者和本社区有权追究责任。如果您发现本社区中有涉嫌抄袭的内容,欢迎发送邮件进行举报,并提供相关证据,一经查实,本社区将立刻删除涉嫌侵权内容,举报邮箱: cloudbbs@huaweicloud.com
  • 点赞
  • 收藏
  • 关注作者

评论(0

0/1000
抱歉,系统识别当前为高风险访问,暂不支持该操作

全部回复

上滑加载中

设置昵称

在此一键设置昵称,即可参与社区互动!

*长度不超过10个汉字或20个英文字符,设置后3个月内不可修改。

*长度不超过10个汉字或20个英文字符,设置后3个月内不可修改。