Redis服务搭建

一、服务搭建

1、安装gcc套装

  yum install cpp

  yum install binutils

  yum install glibc

  yum install glibc-kernheaders

  yum install glibc-common

  yum install glibc-devel

  yum install gcc

  yum install make

  yum -y install gcc automake autoconf libtool make

 

2、升级gcc

  yum -y install centos-release-scl

  yum -y install devtoolset-9-gcc devtoolset-9-gcc-c++ devtoolset-9-binutils

  scl enable devtoolset-9 bash

  echo "source /opt/rh/devtoolset-9/enable" >>/etc/profile

 

3、下载安装redis

 

4、配置redis并启动

  • redis.conf配置以下内容

  daemonize:yes

  bind0.0.0.0

  protected-modeno

  requirepass:123456

  • 启动redis

  /usr/local/redis/bin/redis-server ./redis.conf

 

二、开机自启动配置

    

    

    

posted @ 2023-03-09 20:03  Ocean-Luo  阅读(80)  评论(0编辑  收藏  举报