Centos7 安装redis3.2.3 过程
1:安装wget: yum install wget
2:安装pip:
1:sudo yum -y install epel-release
2:sudo yum -y install python-pip
3:安装redis:
1:wget --no-check-certificate http://download.redis.io/releases/redis-3.2.3.tar.gz
2:tar xzf redis-3.2.3.tar.gz
3:mv redis-3.2.3 usr/local/redis-3.2.3
4:cd usr/loacl/redis-3.2.3
5:make
6:设置开机自启:
1:设置redis.conf中daemonize为yes
2:设置redis.conf中logfile为"/var/log/redis.log"
2:编写开机自启动脚本
vi /etc/init.d/redis
redis content is:
"""
# chkconfig: 2345 10 90
# description: Start and Stop redis
PATH=/usr/local/bin:/sbin:/usr/bin:/bin
REDISPORT=6379
EXEC=/usr/local/redis-3.2.3/src/redis-server
REDIS_CLI=/usr/local/redis-3.2.3/src/redis-cli
PIDFILE=/var/run/redis.pid
CONF="/usr/local/redis-3.2.3/redis.conf"
case "$1" in
start)
if [ -f $PIDFILE ]
then
echo "$PIDFILE exists, process is already running or crashed."
else
echo "Starting Redis server..."
$EXEC $CONF
fi
if [ "$?"="0" ]
then
echo "Redis is running..."
fi
;;
stop)
if [ ! -f $PIDFILE ]
then
echo "$PIDFILE exists, process is not running."
else
PID=$(cat $PIDFILE)
echo "Stopping..."
$REDIS_CLI -p $REDISPORT SHUTDOWN
sleep 2
while [ -x $PIDFILE ]
do
echo "Waiting for Redis to shutdown..."
sleep 1
done
echo "Redis stopped"
fi
;;
restart|force-reload)
${0} stop
${0} start
;;
*)
echo "Usage: /etc/init.d/redis {start|stop|restart|force-reload}" >&2
exit 1
esac
"""
4:chmod +x /etc/init.d/redis
5:/etc/init.d/redis start
6:设置开机自启:sudo chkconfig redis on
Centos7 安装redis3.2.3 过程的更多相关文章
- centos7安装redis3.0和phpredis扩展详细教程(图文)
整理一下centos7安装redis3.0和phpredis扩展的过程,有需要的朋友可以拿去使用. 一.安装redis3.0 1.安装必要的包 yum install gcc 2.centos7安装r ...
- Centos7安装jdk-12的详细过程
Centos7安装jdk-12的详细过程 2019-04-12 21:23:24 一.下载JDK-12版本 链接地址:官方地址 下载:jdk-12_liunx-x64_bin.tar.gz 二.检 ...
- centos7安装redis3.2.5
安装redis 1官方介绍 Installation Download, extract and compile Redis with: $ wget http://download.redis.io ...
- Centos7安装Redis3.2.8
一.系统环境和版本说明 Redis的版本选取目前的官网版本redis-3.2.8. 二.Redis的安装步骤 2.1 在线下载Redis的安装包 [root@localhost lzh]# ...
- centOS7 安装redis-3.2.6
0.下载tar.gz包并解压到某个位置,然后cd进入解压后的目录(redis-3.2.6)下 1.安装 make MALLOC=libc 关于为什么这样做,参考redis-3.2.6目录下的READM ...
- CentOS7安装Ambari2.7.4过程【离线安装】
先配置免密码登录 修改所有结点的host 192.168.210.133 node1 192.168.210.134 node2 192.168.210.135 node3 192.168.210.1 ...
- centos7安装redis3.2.5集群
安装参照 https://blog.csdn.net/mingliangniwo/article/details/54600640 https://blog.csdn.net/u013820 ...
- Centos7安装Redis3.X
本文只是简单搭建Redis,为了整合ELK用,后面会详细写. Redis:REmote DIctionary Server(远程字典服务器) 是完全开源免费的,用C语言编写的,遵守BSD协议,是一个高 ...
- centos7安装redis3.2.12
1.准备安装包,放在/usr/local/src/ 2.解压安装包,解压到/usr/local/ tar zxf redis-3.2.12.tar.gz -C /usr/local/ 3.cd /us ...
随机推荐
- 在jybot下跑Selenium2Library
应用场景:项目组要将原有SeleniumLibrary写的脚本切换到Selenium2Library(后称S2L)下,但是原来有很多Java写的库,综合考虑认为还是在Jython下跑比较合适.但是安装 ...
- javaScript 获取主机地址,项目名等
//获取当前网址 var curWwwPath=window.document.location.href; alert(curWwwPath); //http://localhost:8080/ ...
- cocos2d制作动态光晕效果基础——blendFunc
转自:http://www.2cto.com/kf/201207/144191.html 最近的项目要求动态光晕的效果. 何谓动态光晕?之前不知道别人怎么称呼这个效果, 不过在我看来,“动态光晕”这个 ...
- AS与JS相互通信(Flex中调用js函数)
转载自http://www.blogjava.net/Alpha/archive/2009/06/27/284373.html Flex中As调用Js的方法是: 1.导入包 (import f ...
- CSS选择器 使用小结
==> .x-boundlist-floating[style$="px;"] .x-boundlist-item 元素中含有Style属性,并且属性值以"px;& ...
- Looksery Cup 2015 A. Face Detection 水题
A. Face Detection Time Limit: 20 Sec Memory Limit: 256 MB 题目连接 http://codeforces.com/contest/549/pro ...
- hdu 5276 YJC tricks time 数学
YJC tricks time Time Limit: 20 Sec Memory Limit: 256 MB 题目连接 http://acm.hdu.edu.cn/showproblem.php?p ...
- 如何从iTunes Connect中提款呢?
最近在AppStore有点小小小收入,但如何从iTunes Connect中提款呢? (Payments and Financial Reports) 网上查了下,发现有种说法:“只要账号余额达到15 ...
- 导入word数据
public static List<FL> ImportDOC(object fileName,out StringBuilder meg) { List<FL> ...
- [NodeJS] Deploy a Node Application with the Now CLI
Now offers a friction-free way to deploy node applications right from the terminal. In this lesson, ...