linux安装redis5

linux安装redis5.0.5

安装方式源码安装

1.下载

wget http://download.redis.io/releases/redis-5.0.4.tar.gz
  1. 解压进入目录

    tar xzvf redis-5.0.4.tar.gz && cd redis-5.0.4

  2. 编译

    make

  3. 进入src目录

    cd src

5.开始安装和配置 (安装到/usr/local/redis目录下)

make install PREFIX=/usr/local/redis

6.移动配置文件到安装目录下

	cd ../
	mkdir /usr/local/redis/etc
	mv redis.conf /usr/local/redis/etc

5.配置redis为后台启动

	vi /usr/local/redis/etc/redis.conf //将daemonize no 改成daemonize yes

6.将redis加入到开机启动

vi /etc/rc.local //在里面添加内容:/usr/local/redis/bin/redis-server /usr/local/redis/etc/redis.conf (意思就是开机调用这段开启redis的命令)

7.开启redis

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

你可能感兴趣的:(redis)