码迷,mamicode.com
首页 > 其他好文 > 详细

redis_install.sh

时间:2019-07-17 00:13:20      阅读:98      评论:0      收藏:0      [点我收藏+]

标签:prefix   version   red   cal   server   Fix   hang   path   ++   

 1 #!/bin/bash
 2 #by zhangjia
 3 #2019.5.12
 4 ##########################
 5 redis_version="redis-2.8.13"
 6 cd /usr/local/src
 7 yum -y install tcl gcc gcc-c++ make wget
 8 wget -c http://download.redis.io/releases/${redis_version}.tar.gz 
 9 tar -xzvf /usr/local/src/${redis_version}.tar.gz
10 cd ${redis_version}
11 make PREFIX=/usr/local/redis install MALLOC=libc
12 make test
13 cp /usr/local/src/${redis_version}/redis.conf /usr/local/redis/redis.conf
14 #将/usr/local/redis/bin/目录加入至环境变量配置文件/etc/profile末尾
15 grep /usr/local/redis/bin /etc/profile || echo "export PATH=/usr/local/redis/bin:$PATH" >> /etc/profile
16 source /etc/profile
17 nohup /usr/local/redis/bin/redis-server  /usr/local/redis/redis.conf  &
18 #/usr/local/redis/bin/redis-cli  -p  6379 shutdown

 

redis_install.sh

标签:prefix   version   red   cal   server   Fix   hang   path   ++   

原文地址:https://www.cnblogs.com/zhj5551/p/11198351.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!