Centos7安装redis

Linux Centos7安装Redis 安装 Redis 5 一、安装gcc依赖 由于 redis 是用 C 语言开发,安装之前必先确认是否安装 gcc 环境(gcc -v),如果没有安装,执行以下命令进行安装 [root@localhost local]# yum install -y gcc 二、下载并解压安装包 [root@localhost local]# wget http://download.redis.io/releases/redis-5.0.3.tar.gz [root@localhost local]# tar -zx 阅读详情

记录centos7安装配置redis

1.下载需要的版本

redis各版本下载地址
进入需要下载的目录

wget http://download.redis.io/releases/redis-5.0.6.tar.gz

在这里插入图片描述

2.解压到指定目录

tar -zxvf redis-5.0.6.tar.gz -C /www/applation/

3.yum安装gcc依赖

yum install gcc

4.编译安装

cd /www/applation/redis-5.0.6       //先进入redis解压后所在的目录
make MALLOC=libc

将/usr/local/redis-4.0.6/src目录下的文件加到/usr/local/bin目录

cd src && make install

5.启动

  • 直接启动
    • 在redis的src目录下输入
    ./redis-server
    
  • 后台启动
    • 1.修改redis.conf文件
    [root@localhost applation]# cd redis-5.0.6/
    [root@localhost redis-5.0.6]# vim redis.conf
    // 将daemonize no 修改为==> daemonize yes
    
    • 2.指定redis.conf文件启动
    [root@localhost src]# ./redis-server /www/applation/redis-5.0.6/redis.conf
    6899:C 10 Oct 2019 15:04:05.583 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
    6899:C 10 Oct 2019 15:04:05.583 # Redis version=5.0.6, bits=64, commit=00000000, modified=0, pid=6899, just started
    6899:C 10 Oct 2019 15:04:05.583 # Configuration loaded
    
    
    • 3.关闭redis进程
      ps -aux | grep redis查看redis进程
    [root@localhost src]#  ps -aux | grep redis
    root       6900  0.2  0.1 144024  1984 ?        Ssl  15:04   0:00 ./redis-server 127.0.0.1:6379
    root       6922  0.0  0.0 112728   972 pts/1    S+   15:06   0:00 grep --color=auto redis
    
      使用kill命令杀死进程
    
    	[root@localhost src]#  ps -aux | grep redis
    	root       6900  0.2  0.1 144024  1984 ?        Ssl  15:04   0:00 ./redis-server 127.0.0.1:6379
    	root       6922  0.0  0.0 112728   972 pts/1    S+   15:06   0:00 grep --color=auto redis
    	[root@localhost src]# kill -9 6900
    

6.设置redis开机自动启动

  • 1.在/etc下新建redis目录
cd /etc
mkdir redis
  • 2.将/usr/local/redis-4.0.6/redis.conf 文件复制一份到/etc/redis目录下,并命名为6379.conf
cp /usr/local/redis-4.0.6/redis.conf /etc/redis/6379.conf
  • 3.将redis的启动脚本复制一份放到/etc/init.d目录下
cp /usr/local/redis-4.0.6/utils/redis_init_script /etc/init.d/redisd
  • 4.设置redis开机自启动
    • 先进入/etc/init.d目录下
    • 然后执行自启命令
cd /etc/init.d
chkconfig redisd on

结果显示redisd不支持chkconfig
解决方法:

使用vim编辑redisd文件,在第一行加入如下两行注释,保存退出

# chkconfig:   2345 90 10
# description:  Redis is a persistent key-value database
注释的意思是,redis服务必须在运行级2,3,4,5下被启动或关闭,启动的优先级是90,关闭的优先级是10。

现在可以直接已服务的形式启动和关闭redis了

启动:

service redisd start 

关闭:

service redisd stop

======================================================

如果提示出现如下提示说明没有分配权限

[root@localhost ~]# service redisd start
env: /etc/init.d/redisd: 权限不够

运行如下此命令

[root@localhost ~]# chmod a+x /etc/init.d/redisd

a+x 是给所有人加上可执行权限,包括所有者,所属组,和其他人
o+x 只是给其他人加上可执行权限

=============================================================

参考资料

https://www.cnblogs.com/zuidongfeng/p/8032505.html

========================================================
自启动时,遇到如下错误,未解决
在这里插入图片描述

CentOS7安装redis centos7安装redis 阅读详情

相关推荐

从零开始使用matlab实现EKF-SLAM算法(含完整代码)

扩展卡尔曼滤波器同步定位与建图 (EKF-SLAM) 算法建立在 EKF 的基础上,集成了 EKF 的功能,可解决机器人技术中最具挑战性的问题之一:同时定位与建图 (SLAM)。 EKF-SLAM采用EKF方法来同时估计机器人的状态和周围环境的布局,而无需事先了解位置。 这种双重功能对于在未知环境中运行的自主系统至关重要,使它们能够在绘制区域地图时有效导航。 EKF-SLAM 算法一直是自动驾驶车辆和机器人系统开发的基石,为处理现实世界环境中固有的不确定性提供了一个强大的框架。

mjmmm的博客 6635

Centos7安装Redis

安装完成Redis,我们就可以操作Redis,实现数据的CRUD了。如果要让Redis以后台方式启动,则必须修改Redis配置文件,就在我们之前解压的redis安装包下(其他的常见配置可以选择配置,比如监听的端口、工作目录、指定日志文件名开启日志的保存功能,不必要。redis的启动方式有很多种,例如默认启动,指定配置启动,开机自启。可以下载各种redis的客户端,这里使用的是RESP。可以在centos进入redis进行数据库的操作。

qq_47637405的博客 1万+

python多线程实现http代理

python多线程实现http代理文章要求1.py socket模块2.py threading模块3.环境搭建3.1设置代理3.2搭建http简单服务器代码分析1.完整代码2.逻辑结构 文章要求 1.py socket模块 socket模块接触后很简单,我实现的是阻塞性的套接字。 需要了解到,连接套接字,监听套接字,和套接字accept()方法的返回值是元组 数据传递过程sock.recv(1024),sock.send()也不需要转换编码,直接以b"二进制流"传输 2.py threading模块 th

qq_43402663的博客 2508

【Redis】Centos7 安装 redis(详细教程)

一、使用 yum 安装查看当前 Redis 版本:当前的 redis 版本太老了,选择安装 Redis5。一、使用 yum 安装1、首先安装 scl 源由于我之前已经安装过了,所以加载速度比较快,且显示已经安装成功,是最新的版本。2、再安装 redis。

Elena's Blog 8145

macOS安装Cplex+yalmip

macOS安装Cplex+yalmip

DS 4248

python音频信号分析

声音以具有诸如频率、带宽、分贝等参数的音频信号的形式表示,典型的音频信号可以表示为幅度和时间的函数

MAY的博客 2785

Centos 7安装 Redis

Centos 7 安装redis流程

小松鼠的博客 5696

STK轨道仿真环境搭建实战:从地月系到多天体场景

本文详细介绍了STK轨道仿真环境搭建的实战指南,从基础的地月系统到复杂的多天体场景。通过逐步操作说明和实用技巧,帮助用户快速掌握STK软件的使用方法,提升轨道仿真效率,适用于航天任务设计和教学演示。

weixin_30312563的博客 398

Centos7 安装Redis详细教程

Centos7 安装Redis详细教程

IT之一小佬的博客 1万+

通过TMS320F28335学习DSP的开发流程——28335的基础知识(1)

1、TMS320F28335内核的主要特点 ①F28335 DSP集成了DSP和微控制器的长处,如DSP的主要特征、单周期乘法运算,F28335能够在一个周期内完成32x32位的乘法累加运算,或者两个16x16位乘法累加运算,而同样32位的普通单片机则需要4个周期以上才能完成 ②快速的中断响应 ③可在任何内存位置进行单周期读、修改、写操作 ④可采用C/C++编程软件,效率非常高 2、处理器的主要资源 ①32位浮点DSP,主频是150MHz,方便电机控制、电力设备控制及工业控制等。 ②片上存储器:FLASH–

Kayboy的博客 2万+

ECU-TEST笔记&使用技巧01

说明 1)所述均基于如下环境:ECU-TEST 8.0、Win10系统、NI Veristand 2018(HIL测试)。不排除因为版本及软件环境问题,所述方法不奏效或有更好的方法,欢迎交流,一起提高。 2)本博客以问答形式进行,所述问题均来自于实际测试(包括MIL、HIL测试)遇到的问题及需求,目的是提高测试效率和自动化测试序列的可维护性。 3)本博客尽量从测试方法及ECU-TEST原...

Eigrl的博客 1万+

【redis】centos7下安装redis7

在CentOS 7下安装Redis7可以通过以下两种方法实现:手动编译安装和使用YUM进行安装。

morris 3万+

英伟达 Jetson AGX Thor 官方入门教程(一)系统U盘安装

NVIDIA Jetson AGX Thor开发套件快速安装指南 本指南详细介绍了NVIDIA Jetson AGX Thor开发套件的安装流程。该套件搭载T5000 SoM,为物理AI和机器人应用提供强大支持。安装过程采用全新的JetPack 7.0方案,通过USB闪存盘即可完成BSP(Jetson Linux)安装,无需依赖Ubuntu主机。指南包含硬件开箱说明、两种配置模式(带显示器/无显示器)、详细的ISO镜像下载和USB制作步骤(推荐使用Balena Etcher工具),以及首次启动后的初始设置流

机器人控制与仿真应用 2868

Centos7 安装redis

摘要:本文详细介绍了在Linux服务器上安装Redis 7.4.5的全过程。首先检查并安装gcc环境,然后下载解压Redis源码包,通过make命令编译并安装到指定目录。配置redis.conf文件设置后台运行、远程连接等参数,最后将Redis注册为系统服务并设置开机自启。整个过程包括环境准备、源码编译、配置修改和服务管理四个主要步骤,为在Linux系统上部署Redis提供了完整指南。(148字)

qq_38881740的博客 1105

LinePhone3.2.7(android端最新版本) sip客户端

SIP客户端For android:LinePhone3.2.7(最新版本),官网地址:http://www.linphone.org/

TMS_WebGMaps_1.9.8.0_Full_Source

TMS_WebGMaps_1.9.8.0_Full_Source 全源码 delphi cbuilder

CentOS 7上安装Redis

CentOS下安装Redis

weixin_36797191的博客 1279

ssm框架搭建

这个是一个在idea上成功跑起来的ssm框架项目,保存在这里方便以后使用直接下载

CentOS7.6安装redis

本文详细介绍了在CentOS7.6环境下安装redis的详细步骤。操作系统架构为ARM架构。安装方式为RPM离线安装。本文档作为自己实施过程中的参考文档。参考了网上其他优秀的文章。

m0_37542810的博客 2106

深度学习工具包 DeepLearningToolbox

深度学习工具包Deprecation notice.-----This toolbox is outdated and no longer maintained.There are much better tools available for deep learning than this toolbox, e.g. [Theano](http://deeplearning.net/software/theano/), [torch](http://torch.ch/) or [tensorflow](http://www.tensorflow.org/)I would suggest you use one of the tools mentioned above rather than use this toolbox.Best, Rasmus.DeepLearnToolbox================A Matlab toolbox for Deep Learning.Deep Learning is a new subfield of machine learning that focuses on learning deep hierarchical models of data.It is inspired by the human brain's apparent deep (layered, hierarchical) architecture.A good overview of the theory of Deep Learning theory is[Learning Deep Architectures for AI](http://www.iro.umontreal.ca/~bengioy/papers/ftml_book.pdf)For a more informal introduction, see the following videos by Geoffrey Hinton and Andrew Ng.* [The Next Generation of Neural Networks](http://www.youtube.com/watch?v=AyzOUbkUf3M) (Hinton, 2007)* [Recent Developments in Deep Learning](http://www.youtube.com/watch?v=VdIURAu1-aU) (Hinton, 2010)* [Unsupervised Feature Learning and Deep Learning](http://www.youtube.com/watch?v=ZmNOAtZIgIk) (Ng, 2011)If you use this toolbox in your research please cite [Prediction as a candidate for learning deep hierarchical models of data](http://www2.imm.dtu.dk/pubdb/views/publication_details.php?id=6284)```@MASTERSTHESIS\{IMM2012-06284, author = "R. B. Palm", title = "Prediction as a candidate for learning deep hierarchical models of data", year = "2012",}```Contact: rasmusbergpalm at gmail dot comDirectories included in the toolbox-----------------------------------`NN/` - A library for Feedforward Backpropagation Neural Networks`CNN/` - A library for Convolutional Neural Networks`DBN/` - A library for Deep Belief Networks`SAE/` - A library for Stacked Auto-Encoders`CAE/` - A library for Convolutional Auto-Encoders`util/` - Utility functions used by the libraries`data/` - Data used by the examples`tests/` - unit tests to verify toolbox is workingFor references on each library check REFS.mdSetup-----1. Download.2. addpath(genpath('DeepLearnToolbox'));Example: Deep Belief Network---------------------```matlabfunction test_example_DBNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit RBM and visualize its weightsrand('state',0)dbn.sizes = [100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);figure; visualize(dbn.rbm{1}.W'); % Visualize the RBM weights%% ex2 train a 100-100 hidden unit DBN and use its weights to initialize a NNrand('state',0)%train dbndbn.sizes = [100 100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);%unfold dbn to nnnn = dbnunfoldtonn(dbn, 10);nn.activation_function = 'sigm';%train nnopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.10, 'Too big error');```Example: Stacked Auto-Encoders---------------------```matlabfunction test_example_SAEload mnist_uint8;train_x = double(train_x)/255;test_x = double(test_x)/255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit SDAE and use it to initialize a FFNN% Setup and train a stacked denoising autoencoder (SDAE)rand('state',0)sae = saesetup([784 100]);sae.ae{1}.activation_function = 'sigm';sae.ae{1}.learningRate = 1;sae.ae{1}.inputZeroMaskedFraction = 0.5;opts.numepochs = 1;opts.batchsize = 100;sae = saetrain(sae, train_x, opts);visualize(sae.ae{1}.W{1}(:,2:end)')% Use the SDAE to initialize a FFNNnn = nnsetup([784 100 10]);nn.activation_function = 'sigm';nn.learningRate = 1;nn.W{1} = sae.ae{1}.W{1};% Train the FFNNopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.16, 'Too big error');```Example: Convolutional Neural Nets---------------------```matlabfunction test_example_CNNload mnist_uint8;train_x = double(reshape(train_x',28,28,60000))/255;test_x = double(reshape(test_x',28,28,10000))/255;train_y = double(train_y');test_y = double(test_y');%% ex1 Train a 6c-2s-12c-2s Convolutional neural network %will run 1 epoch in about 200 second and get around 11% error. %With 100 epochs you'll get around 1.2% errorrand('state',0)cnn.layers = { struct('type', 'i') %input layer struct('type', 'c', 'outputmaps', 6, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %sub sampling layer struct('type', 'c', 'outputmaps', 12, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %subsampling layer};cnn = cnnsetup(cnn, train_x, train_y);opts.alpha = 1;opts.batchsize = 50;opts.numepochs = 1;cnn = cnntrain(cnn, train_x, train_y, opts);[er, bad] = cnntest(cnn, test_x, test_y);%plot mean squared errorfigure; plot(cnn.rL);assert(er<0.12, 'Too big error');```Example: Neural Networks---------------------```matlabfunction test_example_NNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);% normalize[train_x, mu, sigma] = zscore(train_x);test_x = normalize(test_x, mu, sigma);%% ex1 vanilla neural netrand('state',0)nn = nnsetup([784 100 10]);opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samples[nn, L] = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.08, 'Too big error');%% ex2 neural net with L2 weight decayrand('state',0)nn = nnsetup([784 100 10]);nn.weightPenaltyL2 = 1e-4; % L2 weight decayopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex3 neural net with dropoutrand('state',0)nn = nnsetup([784 100 10]);nn.dropoutFraction = 0.5; % Dropout fraction opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex4 neural net with sigmoid activation functionrand('state',0)nn = nnsetup([784 100 10]);nn.activation_function = 'sigm'; % Sigmoid activation functionnn.learningRate = 1; % Sigm require a lower learning rateopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex5 plotting functionalityrand('state',0)nn = nnsetup([784 20 10]);opts.numepochs = 5; % Number of full sweeps through datann.output = 'softmax'; % use softmax outputopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex6 neural net with sigmoid activation and plotting of validation and training error% split training data into training and validation datavx = train_x(1:10000,:);tx = train_x(10001:end,:);vy = train_y(1:10000,:);ty = train_y(10001:end,:);rand('state',0)nn = nnsetup([784 20 10]); nn.output = 'softmax'; % use softmax outputopts.numepochs = 5; % Number of full sweeps through dataopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, tx, ty, opts, vx, vy); % nntrain takes validation set as last two arguments (optionally)[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');```[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/rasmusbergpalm/deeplearntoolbox/trend.png)](https://bitdeli.com/free "Bitdeli Badge")

centos7安装redis

直接yum安装redis是可行的,但要看安装版本,如果需要特定版本,并且需要创建一个 systemd 服务文件来管理 Redis 服务(),那么就需要wget获取包wget https://download.redis.io/releases/redis-6.2.14.tar.gz,解压编译make , make install(这个命令会将redis默认安装到/usr/local/bin目录下),所以在/usr/local/bin/ 目录下会有redis-server。

sipaike0的博客 3379

CentOS7安装Redis教程

每次安装什么东西就老能踩各种坑 所以以后安装什么东西都记录一下。

m0_74823131的博客 966

CentOS7 安装 Redis

CentOS7 安装 Redis

阿拉丁省油的灯的博客 221

CentOS7下安装Redis

1.1 系统环境和版本说明 Redis的版本选取目前的稳定版本2.8.9。 客户端选用了Redis的Java版本jedis 2.4.2。 1.2 Redis的安装步骤 a. 进入root目录,并下载Redis的安装包 $ cd $ wget http://labfile.oss.aliyuncs.com/files0422/redis-2.8.9.tar.gz 操作截图:

必行 3万+

CentOS7安装Redis6

虚拟机CentOS安装 Redis6 保姆式教程

m0_58803733的博客 1506
上一篇: linux安装java1.8
下一篇: 用python打包成可执行程序,实现使用默认浏览器跳转指定链接
_WY·H_
博客等级 码龄10年 1粉丝 6原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值