CentOS7下Redis的安装
来源:互联网 发布:暴走漫画官方淘宝 编辑:程序博客网 时间:2024/05/19 12:18
第一步,安装EPEL,直接第二步会报错
Loaded plugins: fastestmirrorLoading mirror speeds from cached hostfile* base: centos.sonn.com* extras: mirror.supremebytes.com* updates: mirrors.cat.pdx.eduSetting up Install ProcessNo package redis available.Error: Nothing to do
所以先下载https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm后安装
第二步,安装Redis
在CLI用su提权
执行yum -y install redis
过程有点漫长,不知为啥最初链接到国外服务器了,反正最后还是完成了
Running transaction Installing : jemalloc-3.6.0-1.el7.x86_64 1/2 Installing : redis-2.8.19-2.el7.x86_64 2/2 Verifying : redis-2.8.19-2.el7.x86_64 1/2 Verifying : jemalloc-3.6.0-1.el7.x86_64 2/2 Installed: redis.x86_64 0:2.8.19-2.el7 Dependency Installed: jemalloc.x86_64 0:3.6.0-1.el7 Complete!调用
systemctl start redis.service把redis启动起来
调用
systemctl enable redis.service
把redis做成服务.
第四步,允许外网访问
当然,我们要打开防火墙6379端口
然后vi /etc/redis.conf修改一下bind,最简单的做法就是注释掉这样大家都能访问了
最后给出redis相关的命令
Now start the redis server after this.
systemctl start redis.service
Check the running status of redis server
systemctl status redis.service
To test the installation of Redis, use below given command
redis-cli ping
If the response output is PONG, it means installation is completed successfully.
[root@localhost ~]# redis-cli ping
PONG
[root@localhost ~]#
Start/Stop/Restart/Status and Enable redis server
To start redis server
systemctl start redis.service
To stop redis server
systemctl stop redis.service
To restart redis server
systemctl restart redis.service
To get running status of redis server
systemctl status redis.service
To enable redis server at system’s booting time.
systemctl enable redis.service
To disable redis server at system’s booting time.
systemctl disable redis.service
Listening Port Of Redis Server
Redis Server listens by default at port number 6379. Use below given ss command. (To learn more about ss command)
[root@localhost ~]# ss -nlp|grep redis
tcp LISTEN 0 128 127.0.0.1:6379 *:* users:(("redis-server",19706,4))
- centos7下redis的安装
- CentOS7下Redis的安装
- CentOS7下安装Redis
- CentOS7下安装Redis
- CentOs7下redis的部署和安装
- CentOS7 下Redis的安装以及使用
- Redis在Centos7下的集群安装
- Centos7.0下redis数据库的安装
- redis的安装(centOS7)
- Linux CentOs7 下安装 redis
- redis在centos7下的安装以及自启动
- centos7 下的 Redis 安装 && 启动 && 关闭 && 卸载
- CentOS7.0下Redis的安装和部署
- Centos7下redis安装phpredis扩展安装
- 在Centos7下源码安装配置Redis
- Centos7 下安装redis 3.2.6
- CentOS7 下安装redis简单步骤
- centos7.1下php7安装redis扩展
- 算法--四种排序
- git代码行统计命令集
- if用法--Python
- Mac环境下,NodeJs配置Oracle开发环境
- 交换机Vlan中 tagged和untagged的区别
- CentOS7下Redis的安装
- CSDN-markdown编辑器语法——字体、字号与颜色
- 习近平谈社会主义核心价值观
- android文件存储openfileoutputstream
- Android 6 多用户操作系统 检测当前系统是否设置了锁屏密码
- 聚合数据常用快递接口代码
- SQLServer 2008以上误操作数据库恢复方法——日志尾部备份
- zeromq 在ubuntu 下的编译命令,以及使用时的注意事项
- 当str.Format()遇到0xC015000F:正被停用的激活上下文不是最近激活的