Centos7 linux下通过源码安装redis以及使用
下载redis安装包
wget http://download.redis.io/releases/redis-5.0.3.tar.gz
解压压缩包
tar -zxvf redis-5.0..tar.gz
yum安装gcc依赖
[root@iZwz991stxdwj560bfmadtZ local]# yum -y install gcc
跳转到redis解压目录下
cd redis-5.0.
编译
[root@iZwz991stxdwj560bfmadtZ redis-5.0.]# make MALLOC=libc
安装
[root@iZwz991stxdwj560bfmadtZ redis-4.0.]# cd src && make install
CC Makefile.dep Hint: It's a good idea to run 'make test' ;) INSTALL install
INSTALL install
INSTALL install
INSTALL install
INSTALL install
测试是否能够启动redis
[root@iZwz991stxdwj560bfmadtZ src]# redis-server
:C Dec ::12.507 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
:C Dec ::12.507 # Redis version=4.0., bits=, commit=, modified=, pid=, just started
:C Dec ::12.507 # Warning: no config file specified, using the default config. In order to specify a config file use ./redis-server /path/to/redis.conf
_._
_.-``__ ''-._
_.-`` `. `_. ''-._ Redis 4.0. (/) bit
.-`` .-```. ```\/ _.,_ ''-._
( ' , .-` | `, ) Running in standalone mode
|`-._`-...-` __...-.``-._|'` _.-'| Port:
| `-._ `._ / _.-' | PID: 18685
`-._ `-._ `-./ _.-' _.-'
|`-._`-._ `-.__.-' _.-'_.-'|
| `-._`-._ _.-'_.-' | http://redis.io
`-._ `-._`-.__.-'_.-' _.-'
|`-._`-._ `-.__.-' _.-'_.-'|
| `-._`-._ _.-'_.-' |
`-._ `-._`-.__.-'_.-' _.-'
`-._ `-.__.-' _.-'
`-._ _.-'
`-.__.-' :M Dec ::12.508 # WARNING: The TCP backlog setting of cannot be enforced because /proc/sys/net/core/somaxconn is set to the lower value of .
:M Dec ::12.508 # Server initialized
:M Dec ::12.508 # WARNING overcommit_memory is set to ! Background save may fail under low memory condition. To fix this issue add 'vm.overcommit_memory = 1' to /etc/sysctl.conf and then reboot or run the command 'sysctl vm.overcommit_memory=1' for this to take effect.
:M Dec ::12.508 # WARNING you have Transparent Huge Pages (THP) support enabled in your kernel. This will create latency and memory usage issues with Redis. To fix this issue run the command 'echo never > /sys/kernel/mm/transparent_hugepage/enabled' as root, and add it to your /etc/rc.local in order to retain the setting after a reboot. Redis must be restarted after THP is disabled.
:M Dec ::12.508 * Ready to accept connections
移动目录
sudo mv redis-5.0. /usr/local/redis
修改配置文件(后台运行)
sudo vi /usr/local/redis/redis.conf
将
daemonize no
修改为
daemonize yes
使用配置文件启动
redis-server /usr/local/redis/redis.conf
关闭redis
首先使用ps -aux | grep redis查看redis进程
[root@iZwz991stxdwj560bfmadtZ src]# ps -aux | grep redis
root 0.0 0.1 ? Ssl : : ./redis-server 127.0.0.1:
root 0.0 0.0 pts/ R+ : : grep --color=auto redis
使用kill命令杀死进程
[root@iZwz991stxdwj560bfmadtZ src]# kill -9 18714
客户端连接
[root@localhost bin]# redis-cli
127.0.0.1:>
参考:
https://www.cnblogs.com/zuidongfeng/p/8032505.html
Centos7 linux下通过源码安装redis以及使用的更多相关文章
- linux下通过源码安装git
1.移除旧版本git [root@Git ~]# git --version ## 查看自带的版本git version 1.8.3.1 [root@Git ~]# yum remove git ## ...
- Linux下通过源码编译安装程序
本文简单的记录了下,在linux下如何通过源码安装程序,以及相关的知识.(大神勿喷^_^) 一.程序的组成部分 Linux下程序大都是由以下几部分组成: 二进制文件:也就是可以运行的程序文件 库文件: ...
- 在CentOS7(虚拟机)下通过源码安装Postgresql10以及基本配置
操作系统:CentOS7 安装文件:postgresql-10.0.tar.gz 系统环境:gcc.Python 1:源码安装 [postgres@localhost ~]# tar zxvf pos ...
- Linux下通过源码编译安装程序(configure/make/make install的作用,然后在/etc/profile文件里修改PATH环境变量)
一.程序的组成部分 Linux下程序大都是由以下几部分组成: 二进制文件:也就是可以运行的程序文件 库文件:就是通常我们见到的lib目录下的文件 配置文件:这个不必多说,都知道 帮助文档:通常是我们在 ...
- 通过源码安装PostgresSQL
通过源码安装PostgresSQL 1.1 下载源码包环境: Centos6.8 64位 yum -y install bison flex readline-devel zlib-devel yum ...
- 在centos6.7通过源码安装python3.6.7报错“zipimport.ZipImportError: can't decompress data; zlib not available”
在centos6.7通过源码安装python3.6.7报错: zipimport.ZipImportError: can't decompress data; zlib not available 从 ...
- linux下python3源码安装及卸载
Linux下Python3的源码编译安装和卸载方法 [日期:2019-06-21] 来源:博客园 作者:wuli潇萧 [字体:大 中 小] (一)Linux下软件的源码编译安装和卸载方法 L ...
- Ubuntu 14.04 卸载通过源码安装的库
cd cere-solvermkdir buildcd buildcmake ..sudo makesudo make install 卸载通过以上方式源码安装的库 再次进入buildsudo mak ...
- 【Git】CentOS7 通过源码安装Git
yum源仓库里的Git版本更新不及时,最新版的Git是1.8.3,但是官方的最新版早已经更新到2.9.5.想要安装最新版本Git,只能下载源码进行安装 建议最好更新git为较新版本,便于使用 1.查看 ...
随机推荐
- Caterpillar sis service information training and software
Cat et sis caterpillar heavy duty truck diagnostics repair. Training demonstration allows.cat electr ...
- NUL和NULL
此处讨论C语言中的NUL和NULL 1.NUL是ASCII字符集中'\0'字符的名字,它的字节模式为全0 2.NULL指一个其值为0的指针 3.它们都是整型值,其值也相同,所以可以互换使用 4.然而, ...
- vue中的指令v-model
Vue的指令:其实就是单个JavaScript表达式,一般来说是带有v-前缀:都有着对应的官网介绍:https://cn.vuejs.org/v2/guide/forms.html v-model:数 ...
- netstat -ano输出中的ESTABLISHED off
今天,我们性能测试的环境出现个奇怪现象,通过oci direct load回库的进程似乎僵死了,应用端cpu 200%(两个线程在跑,一个是一直在ocidirectload没反应,另外一个是正在sem ...
- day5-json和pickle序列化
一.json模块 序列化:把一个对象的形态改变一下,使他能够存放在文件中,或者在网络上传输,序列化也叫持久化,是把对象存储到永久介质中,这样就不会因为掉电而丢失. JSON (JavaScript O ...
- JavaBean的getters和setters方法自动生成
xgClass.java文件: public class XgClass { private String ccCityDerate1000Num; } 添加getter/setter方法: 在代码区 ...
- Item的anchors属性
1.anchors group: anchors.top : AnchorLine anchors.bottom : AnchorLine anchors.left : AnchorLine anch ...
- 前端 --- 6 jQuery 初始
一.引入方式 1.直接下载文件到本地(最常用),从本地中导入 2.使用文件的网络地址,就像我们img标签里面的那个src的用法差不多. 引入完之后,就可以直接使用jQuery的语法来写了,但是还是要写 ...
- topcoder srm 692 div1 -23
1.给定一个带权有向图.选出一些边满足使得任意两点可相互到达的前提下使得选出的边的权值的最大最小差值最小. 思路:二分答案,然后枚举权值的范围判断是否可行. #include <stdio.h& ...
- Delphi程序的主题(Theme)设置
本文参考了 http://superlevin.ifengyuan.tw/delphi-change-vcl-style/ 在项目的工程文件中勾选主题,设置缺省主题为Windows 部分代码如下: u ...