debian安装redis
添加rc.local文件
cat </etc/rc.local
#!/bin/sh -e
exit 0
EOF
cd /opt
wget http://download.redis.io/releases/redis-5.0.0.tar.gz
tar -xzf redis-5.0.0.tar.gz
cd redis-5.0.0
make
如果报错,可能提示gcc命令未找到,这是因为redis没有安装gcc
编译器没安装这时候只要安装编译器即可
cd src
./redis-server ../redis.conf 查看是否安装成功
添加开机启动
vim /etc/rc.local
在exit 0之前添加
REDISPORT=6379
/opt/redis-5.0.0/src/redis-server "/opt/redis-5.0.0/redis.conf"
编辑redis配置文件,修改后台运行和并开启AOF备份
vim /opt/redis-5.0.0/redis.conf
daemonize yes #以后台daemon方式运行redis
port 6379 #默认端口
bind 127.0.0.1 10.6.30.191 #默认绑定本机所有ip地址,为了安全,可以只监听内网ip
pidfile /var/run/redis_6379.pid #redis以后台运行,默认pid文件路径/var/run/redis.pid
requirepass 123456 #设置redis数据库连接密码
appendonly yes #开启AOF备份
重启服务器测试
debian安装redis的更多相关文章
- debian下编译安装redis并加入到systemd启动管理
原文地址: http://blog.duhbb.com/2022/02/09/compile-and-install-redis-debian-and-add-to-systemd/ 欢迎访问我的个人 ...
- Ubuntu 安装 Redis
1. 下载并安装 redis 2.6.16版 sudo mkdir /usr/local/src/Redis cd /usr/local/src/Redis sudo wget http://down ...
- LinuxMint上安装redis和python遇到的一些问题
今天在安装Redis和Python上遇到了些问题,解决后记录下来. 环境:LinuxMint 18.3 安装redis sudo wget http://download.redis.io/relea ...
- Ubuntu安装redis并配置远程、密码以及开启php扩展
一.前言 redis是当前流行的nosql数据库,很多网站都用它来做缓存,今天我们来安装并配置下redis 二.安装并配置redis 1.安装redis sudo apt-get install re ...
- CentOS 7 下安装redis步骤
1. 从redis官网下载redis源码,本例安装在/usr/opt下 [root@localhost opt]# pwd /usr/opt [root@localhost opt]# wget ht ...
- 安装redis以windows服务形式
安装redis以windows服务形式 安装redis以windows服务形式 redis windows windows 服务 以前跑redis,老是要开一个命令行窗口,一旦关闭,redis服务就挂 ...
- Mac Pro 编译安装 Redis 的 PHP 客户端 phpredis
1.去官网下载 redis 扩展源码包 https://github.com/phpredis/phpredis 2.安装 redis 扩展 /usr/local/src/mac-sdk/source ...
- 编译安装PHP7并安装Redis扩展Swoole扩展
编译安装PHP7并安装Redis扩展Swoole扩展 在编译php7的机器上已经有编译安装过php5.3以上的版本,从而依赖库都有了 本php7是编译成fpm-php 使用的, 如果是apache那么 ...
- 【安装Redis】CentOS7 下安装NodeJs+Express+MongoDB+Redis
Redis,V3.2,官网l官方链接:http://www.redis.io/download,参考:http://blog.csdn.net/mlks_2008/article/details/19 ...
随机推荐
- MT【319】分段递推数列
已知数列$ x_n $满足$ 0<x_1<x_2<\pi $,且\begin{equation*} x_{n+1}= \left\{ \begin{aligned}x_n+\sin ...
- wireshark分析dhcp过程
---恢复内容开始--- DHCP DHCP(Dynamic Host Configuration Protocol)是一个用于主机动态获取IP地址的配置解 析,使用UDP报文传送,端口号为67何68 ...
- 让WinSCP和Putty一直保持连接
转: 让WinSCP和Putty一直保持连接 2015年08月14日 01:08:19 zcczbq 阅读数:13173 标签: puttywinscp 更多 个人分类: Operation 版权 ...
- sea.js简单使用教程
sea.js简单使用教程 下载sea.js, 并引入 官网: http://seajs.org/ github : https://github.com/seajs/seajs 将sea.js导入项目 ...
- python中 yield的用法和生成器generator的说明
详情: https://www.cnblogs.com/python-life/articles/4549996.html
- django - 总结 - admin
admin组件,一旦我们注册了表以后,会自动生成很多url,那他是如何添加的呢, 因为admin在启动后会自动执行每个app下的ready方法: 具体是由 from django.utils.modu ...
- Geometric regularity criterion for NSE: the cross product of velocity and vorticity 1: $u\times \om$
在 [Chae, Dongho. On the regularity conditions of suitable weak solutions of the 3D Navier-Stokes equ ...
- [译]Ocelot - Tracing
原文 Ocelot是使用的Butterfly这个项目来实现这个的. 在ocelot要使用tracing, 首先得安装相应的包: Install-Package Ocelot.Tracing.Butte ...
- 使用js代码将html导出为Excel
js代码将html导出为Excel的方法: 直接上源码: <script type="text/javascript" language="javascript&q ...
- SQL Server - Partition by 和 Group by对比
参考:https://www.cnblogs.com/hello-yz/p/9962356.html —————————————————— 今天大概弄懂了partition by和group by的区 ...