Centos 7最小化redis部署
2024-10-19 03:32:35
配置源
[GuGe]
name=GuGe
baseurl=ftp://192.168.1.82
gpgcheck=
enable=
安装
sh-4.2# yum -y install gcc gcc-c++ wget
sh-4.2# wget http://download.redis.io/releases/redis-5.0.3.tar.gz
sh-4.2# tar -zxf redis-5.0..tar.gz -C /usr/local/
sh-4.2# mv /usr/local/redis-5.0. /usr/local/redis
sh-4.2# cd /usr/local/redis
sh-4.2# make
简单启动脚本
sh-4.2# cat /etc/init.d/redis
#!/bin/bash
source /etc/profile
if [ ! -d /usr/local/redis ]
then
echo "Redis program directory is not exist!"
exit
fi if [ ! -f /usr/local/redis/redis.conf ]
then
echo "Redis program configuration file is not exist!"
exit
fi start() {
nohup /usr/local/redis/src/redis-server /usr/local/redis/redis.conf &> /var/log/redis.log &
if [ $? -ne ]
then
echo "redis start failed. Please check the program directory."
else
echo "redis start-up success."
fi
} stop() {
/usr/bin/kill - /usr/local/redis/src/redis-server &> /dev/null
sleep
echo "The program to stop."
} case "$1" in
start)
start
;;
stop)
stop
;;
restart)
stop
start
;;
*)
echo "Usage: {start|stop|restart}"
esac
启动
sh-4.2# chmod a+x /etc/rc.local
sh-4.2# chmod a+x /etc/init.d/redis
sh-4.2# /etc/init.d/redis start
sh-4.2# echo "/etc/init.d/redis start" >> /etc/rc.local
参考地址
https://redis.io/download
最新文章
- 分享一个前辈的NPOIhelper
- 移动设计必备:iPhone 5S PSD 矢量原型免费下载
- css3中的animation
- Server Error in '/' Application
- Django跑起来
- 自动化TOPSQL优化脚本
- OSPF LSA的详解
- TransactionScope简单用法
- 2014年河南省第七届ACM大赛总结
- EnterpriseArchitectect 软件的勾选的几个选项对应的中文意思
- 字符串数组越界bug(2)
- jQuery扩展extend一
- 关键自li,em,dl,ul,ol,footer,header,nav,aside,article
- Atom的追踪函数插件和自定义语法
- .NET Core 快速入门教程
- bently addin 二次开发学习
- python 获取流文件 大小
- Linux、Debian、Jenkins、GIT、Nginx、码云安装,自动化部署前后端分离项目
- [osg][原]osg的坐标系:使用右手法则Y轴向前、X向、右Z向上。camare的默认姿态:向下看(Z轴负向),头向前(Y轴正向)
- ThinkPHP 3.1.2 CURD特性 -3