redis-server命令 – redis服务端程序启动

aiofo2022-08-09  133

Redis是一个开放源码(BSD授权)的内存数据结构存储,用作数据库、缓存和消息中介。redis-server命令是一个启动Redis服务器的命令行。redis-sentinel命令是一个与redis-server命令的符号链接,它意味着--sentionel选项。

语法格式:redis-server [参数]

常用参数:

--port 配置端口
--slaveof 将当前服务器转变为指定服务器的从属服务器
--loglevel 配置日志级别
--sentinel 以哨兵模式运行

参考实例

启动redis,加载默认配置文件:

[root@linuxcool ~]# redis-server

启动redis并配置端口:

[root@linuxcool ~]# redis-server --port 7777 --slaveof 127.0.0.1 8888

配置日志类级别:

[root@linuxcool ~]# redis-server /etc/myredis.conf --loglevel verbose

以哨兵模式运行:

[root@linuxcool ~]# redis-server /etc/sentinel.conf --sentinel
转载请注明原文地址:https://www.aiofo.com/read-829.html