您现在的位置是:网站首页> 编程资料编程资料
CentOS7如何安装配置Reids?_RedHat/Centos_操作系统_
2023-03-22
800人已围观
简介 CentOS7如何安装配置Reids?_RedHat/Centos_操作系统_
安装设置
下载tar包:
wget -c http://download.redis.io/releases/redis-3.2.4.tar.gz
解压安装
tar zxvf redis-3.2.4.tar.gz
mkdir /usr/local/redis
make PREFIX=/usr/local/redis install
设置环境变量
vim /etc/profile
export REDIS_HOME=/usr/local/redis
export PATH=$PATH:$REDIS_HOME/bin
:wq
source /etc/profile 或 . /etc/profile
创建redis服务
cd /root/redis-3.2.4/utils
./install_server.sh
一路回车即可
/etc/init.d 目录下默认的服务名称为 redis_6379

service redis_6379 status
service redis_6379 start
service redis_6379 stop
远程访问
添加防火墙
firewall-cmd --zone=public --add-port=6379/tcp --permanent
firewall-cmd --reload 重启防火墙
vim /etc/redis/6379.conf
密码 requirepass 123456
注释 bind 127.0.0.1
修改 protected-mode no
相关内容
- centos如何批量修改文件名命令?_RedHat/Centos_操作系统_
- Centos7.2使用中文man详解_RedHat/Centos_操作系统_
- 如何解决centos7出现了 license information?_RedHat/Centos_操作系统_
- Centos6.8如何进入救援模式?_RedHat/Centos_操作系统_
- CentOS7如何封停 解封IP?_RedHat/Centos_操作系统_
- CENTOS7下如何安装mbstring扩展?_RedHat/Centos_操作系统_
- 红帽linux怎么安装第三方字体?_RedHat/Centos_操作系统_
- 在CentOS7中如何配置NIC绑定?_RedHat/Centos_操作系统_
- CentOS命令综合详解_RedHat/Centos_操作系统_
- CentOS安装使用VeraCrypt及创建整个加密硬盘详解_RedHat/Centos_操作系统_
