linux 下安装 redis

 https://redis.io/

下载:https://redis.io/download/

1、下载

$ cd /usr/local/

$ wget http://download.redis.io/releases/redis-4.0.7.tar.gz $ tar xzf redis-4.0.7.tar.gz $ cd redis-4.0.7 $ make

 

2、安装

 mkdir /usr/local/redis

cd /usr/local/redis-4.0.7/

make PREFIX=/usr/local/redis install

 

 cp redis.conf  /usr/local/redis

 

vi /usr/local/redis/redis.conf 修改下面值启动在后台

daemonize yes

./bin/redis-server ./redis.conf

 

vi /etc/rc.local  设置开机启动

/usr/local/redis/bin/redis-server /usr/local/redis/redis.conf
export PATH=$PATH:$JRE_HOME/bin:/usr/local/redis/bin

source /etc/profile

 

posted @ 2018-02-02 16:12  三瑞  阅读(117)  评论(0编辑  收藏  举报