Protocol | ServerName | IP | Port | Used By |
---|---|---|---|---|
TCP | Redis | 192.168.100.20 | 6379 | Jumpserver |
# 升級系統
$ yum upgrade -y
# 安裝 redis 服務 $ yum install -y install epel-release $ yum install -y redis # 設置防火牆, 開放 6379 端口 給 jumpserver 訪問 $ firewall-cmd --permanent --add-rich-rule="rule family="ipv4" source address="192.168.100.30" port protocol="tcp" port="6379" accept" $ firewall-cmd --reload # 設置 redis 自啓 $ systemctl enable redis
# 修改 redis 配置文件
$ vi /etc/redis.conf ... # bind 127.0.0.1 # 註釋這行, 新增以下內容 bind 0.0.0.0 requirepass weakPassword # redis 鏈接密碼 maxmemory-policy allkeys-lru # 清理策略, 優先移除最近未使用的key ...
# 啓動 redis
$ systemctl start redis
# redis 的主從設置請參考其官方, 以後會補上