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 ...
随机推荐
- 计算直线的交点数(hdu1466简单的dp)
题意:平面上有n条直线,且无三线共点,问这些直线能有多少种不同交点数.比如,如果n=2,则可能的交点数量为0(平行)或者1(不平行). 思路:动态规划,想办法记忆化搜索,当前状态和之前状态结合起来 d ...
- This is a sandbox of markdown
A First Level Header A Second Level Header Now is the time for all good men to come to the aid of th ...
- 动态调用WebService(C#)
通常我们在程序中需要调用WebService时,都是通过“添加Web引用”,让VS.NET环境来为我们生成服务代理,然后调用对应的Web服务.这样是使工作简单了,但是却和提供Web服务的URL.方法名 ...
- CloudStack 4.2 与CloudStack 4.1二级存储API发生变化
CloudStack 4.1查看二级存储 http://192.168.150.16:8080/client/api?command=listHosts&response=json&s ...
- JavaScript寻踪OOP之路
上一集中,重点介绍了谁动了你的代码.这里先总结一下:咱们的代码从敲下来到运行出结果,经历了两个阶段:分析期与运行期.在分析期,JavaScript分析器悄悄动了我们的代码:在运行期,JavaScrip ...
- Remove a Driver Package from the Driver Store
http://technet.microsoft.com/en-us/library/cc730875.aspx Determine the name of the driver package in ...
- VPW Communication Protocol
http://www.fastfieros.com/tech/vpw_communication_protocol.htm Breakdown of the j1850 3 byte Header f ...
- CodeForces 163B Lemmings 二分
Lemmings 题目连接: http://codeforces.com/contest/163/problem/B Descriptionww.co As you know, lemmings li ...
- Codeforces Gym 100015B Ball Painting 找规律
Ball Painting 题目连接: http://codeforces.com/gym/100015/attachments Description There are 2N white ball ...
- LFS7.4编译笔记(3)
在第一部分,我们编译了一个工具链及临时系统,然后在第二部分我们chroot到/mnt/lfs下面,利用临时系统的工具编译了我们最终的LFS系统.不过此时,我们的LFS系统还是不完整的,因为我们还没有安 ...