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 ...
随机推荐
- fastcgi 分布式
以lighttpd fastcgi写一下自己对fastcgi分布式的理解. 假设一台机器A上运行lighttpd,在这台主机上只是对请求进行分发. 而在其他多台机器上运行多个fastcgi进程,用来接 ...
- LEARUN 开发框架 /aspnetboilerplate ----上海力软信息技术有限公司
LEARUN 开发框架 ----上海力软信息技术有限公司 http://www.learun.cn/ aspnetboilerplate http://www.aspnetboilerplate ...
- yii2.0 gii
1.添加模型 ./yii-dev gii/model --tableName=tableName --generateLabelsFromComments --ns='app\models\base' ...
- C# WinForm开发系列 - RDLC
http://www.cnblogs.com/peterzb/archive/2009/07/08/1519489.html http://jingyan.baidu.com/article/ab69 ...
- jquery视频展示 图片轮播
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/ ...
- android自定义相册 支持低端机不内存溢出
1 之前在网上看的自定义相册很多时候在低端机都会内存溢出开始上代码把 首先我们要拿到图片的所有路径 cursor = context.getContentResolver().query( Media ...
- 二进制程序分析工具Pin在Windows系统中的安装和使用方法
这篇日志其实很弱智,也是因为换了新电脑,实验环境不全(当然,做这个实验我是在虚拟机里,因为接下来想拿些恶意代码的数据),所以这里记录一下在Windows下怎么安装和使用Pin这个程序分析领域最常用的工 ...
- 新唐M0 ISP下载要点
http://blog.csdn.net/rejoice818/article/details/7736029 一.注意:官方光盘内“Software Utilities”目录下,可找到ICP或ISP ...
- Animated Scroll to Top
Due to a number of requests, I'm writing a detail tutorial on how to create an animated scroll to to ...
- Delphi Data Type to C# Data Type
Delphi DataType C# datatype ansistring string boolean bool byte byte char char comp double currency ...