欢迎投稿

今日深度:

Linux CentOS7 yum安装Redis,centos7redis

Linux CentOS7 yum安装Redis,centos7redis


看能不能下载

# yum install -y redis

不能下载就得下载源

# yum install epel-release

下载并安装

# yum install -y redis

启动

# service redis start

查看状态

# service redis status

redis开机自启动

# chkconfig redis on

进入cli

# redis-cli

测试

# set a 1
# get a

退出cli

# exit

配置防火墙
/sbin/iptables -I INPUT -p tcp --dport 6379 -j ACCEPT

重启防火墙

# systemctl restart iptables.service

修改密码

# vi /etc/redis.conf

vim切换到搜索
Esc → /requirepass foobared → 回车 → i

搜索到后去掉“#”号,把foobared 改成你的密码

保存并退出 Esc → :wq

重启redis

# service redis restart

www.htsjk.Com true http://www.htsjk.com/redis/30969.html NewsArticle Linux CentOS7 yum安装Redis,centos7redis 看能不能下载 # yum install -y redis 不能下载就得下载源 # yum install epel-release 下载并安装 # yum install -y redis 启动 # service redis start 查看状态 # service redis st...
相关文章
    暂无相关文章
评论暂时关闭