Cento OS7编译安装redis-3.2.3

 

1 下载安装包

wget http://download.redis.io/releases/redis-3.2.3.tar.gz

 2 解压

  

tar xzf redis-3.2.3.tar.gz

 3 移动

  

cp redis-3.2.3 /usr/local/redis-3.2.3

 4 进入主目录

cd /usr/local/redis-3.2.3

 5 编译

make

 6创建安装目录

mkdir /usr/local/redis

 7安装

 make PREFIX=/usr/local/redis install

 8设置环境变量

vi ~/.bash_profile

    确保加上了/usr/local/redis/bin:

PATH=/usr/local/redis/bin:$PATH:$HOME/bin

 9立即生效环境变量设置

source ~/.bash_profile

 10切换到安装包目录utils文件夹

cd /usr/local/redis-3.2.3/utils

 11执行安装设置

[root@192 utils]# ./install_server.sh
Welcome to the redis service installer
This script will help you easily set up a running redis server

Please select the redis port for this instance: [6379] 
Selecting default: 6379
Please select the redis config file name [/etc/redis/6379.conf]  /usr/local/redis/conf/6379.conf
Please select the redis log file name [/var/log/redis_6379.log]  /usr/local/redis/log/redis_6379.log
Please select the data directory for this instance [/var/lib/redis/6379]  /usr/local/redis/data/6379
Please select the redis executable path [] /usr/local/redis/bin/redis-server
Selected config:
Port           : 6379
Config file    : /usr/local/redis/conf/6379.conf
Log file       : /usr/local/redis/log/redis_6379.log
Data dir       : /usr/local/redis/data/6379
Executable     : /usr/local/redis/bin/redis-server
Cli Executable : /usr/local/redis/bin/redis-cli
Is this ok? Then press ENTER to go on or Ctrl-C to abort.
Copied /tmp/6379.conf => /etc/init.d/redis_6379
Installing service...
Successfully added to chkconfig!
Successfully added to runlevels 345!
Starting Redis server...
Installation successful!

 12 测试,终端输入如下命令测试

redis-cli

 13 允许远程访问,打开 /usr/local/redis/conf/6379.conf 注掉bind 127.0.0.1 并保存

 

# bind 127.0.0.1
 

 

如果您觉得我的文章给了您帮助,请为我买一杯饮料吧!我将非常感激并坚持为大家提供更多帮助!
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值