一、下载Redis

Redis下载地址:https://redis.io/download

SRE实战 互联网时代守护先锋,助力企业售后服务体系运筹帷幄!一键直达领取阿里云限量特价优惠。

二、安装依赖包

  安装Redis之前需要安装c++命令

yum install gcc-c++

三、上传并解压

tar -zxvf redis-5.0.4.tar.gz

四、编译Redis

cd redis-5.0.4

make PREFIX=/yangk/redis/redis install   //我是自定义编译到自己规定的目录下面

五、Redis的一些配置 

如果想后台启动、远程连接、不需要密码启动。需要修改redis.conf文件

daemonize no    改为    daemonize    yes
protected-mode yes   改为   protected-mode no
注释 bind

 将redis.conf文件复制到编译后的redis里面,并启动

cp redis.conf /yangk/redis/redis/bin    //复制redis.conf到编译完成的redis ,bin目录下

./redis-server redis.conf  启动服务端
 
./redis-cli   启动客户端

./redis-cli shutdown   关闭客户端

  

 

 

扫码关注我们
微信号:SRE实战
拒绝背锅 运筹帷幄