weiweivip666

1.软件环境

      centos7
      redis3.2.1

2.安装前准备

由于redis是用c编译的,所以需要安装一些c方面的东西
yum -y install cpp binutils glibc glibc-kernheaders glibc-common glibc-devel gcc make tcl

3.将压缩包上传到/usr/local/目录下

tar -xzvf redis-3.2.1.tar.gz

4.编译安装

进入解压后的redis目录里面
cd redis-3.2.1
make
make install

5.安装后的redis命令默认在/usr/local/bin目录
6.启动,默认的启动占用当前进程

redis-server

7.修改配置文件redis.conf,让redis在后台运行

cd /usr/local/redis-3.2.1
vim redis.conf
#找到daemonize no  意思表示是否是守护进程,no表示不是,这边需要改成yes变成守护进程,在其后台运行
daemonize yes


8.重新启动,需要按照你修改的配置文件来启动

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

9.通过查看进程来确定是否在后台运行

ps -ef|grep redis

分类:

技术点:

相关文章:

  • 2021-11-14
  • 2021-10-13
  • 2022-01-10
  • 2021-10-20
猜你喜欢
  • 2021-08-31
  • 2021-05-26
  • 2018-05-16
  • 2021-12-29
  • 2021-07-30
  • 2021-07-28
相关资源
相似解决方案