Redis01 Redis服务端环境搭建

Linux 环境Redis集群搭建 部署redis03/redis04、redis05/redis06,参考redis01/redis02的操作;redis.conf,从redis-5.0.07复制redis.conf至redis01目录。#指定cluster-config-file,不能与别的节点相同。注:最后的密码要与上面配置的密码相同,按实际的设置。#修改端口、pid文件、日志文件、数据文件路径。#开启redis-cluster。/home/redis/目录。#设置redis数据库密码。#设置集群节点间访问密码。 阅读详情

 

1 前提准备

  下载 VM centos6 安装包,安装好虚拟系统

 

2 安装远程连接工具

  工具获取

  2.1 SecureCRT、Xshell

    连接远程服务器

  2.2 WinSCP

    向远程服务器发送文件

 

3 虚拟机启动后无IP信息

  3.1 问题描述

    首次启动虚拟机时查看不到IP地址

    

  3.2 解决办法

    利用 ifup 命令来打开指定的网络接口

    ifup eth0  打开eth0这个网络接口

    

 

4 利用Xshell或者SecureCRT连接服务器

  详情参见百度

  技巧01:利用secureCRT连接后出现乱码问题

    

 

 

5 查看虚拟机能否上网

  5.1 桥接网络和NAT网络的区别

    待更新....

    本博文默认使用NAT网络

  5.2 虚拟机ping物理主机和外网

    

  5.3 物理主机ping虚拟机

    

 

6 环境准备

  安装redis时需要虚拟机有 gcc-c++

yum install gcc-c++

  技巧01:遇到的选项全部选择yes即可

 

7 下载redis压缩包并上传

  7.1 redis官网下载地址

    网盘地址

    

  7.2 文件上传

    利用winSCP将到redis官网下载redis压缩文件并上传到服务器

    本博文中:在home目录下创建了一个software文件夹,并将压缩文件上传到这个文件夹

  7.3 解压redis压缩包

tar -zxvf redis-3.2.12.tar.gz

  

8 编译和安装

  8.1 编译

    进入到解压后的文件夹进行编译操作

    执行 make 就可以进行编译操作了

    技巧:需要安装了gcc-c++后执行make才会对redis进行编译

  8.2 安装

    进入到解压后的文件夹进行安装操作

    执行 make PREFIX=/usr/local/redis install 就可以进行安装操作了

make PREFIX=/opt/installed/redis install

    技巧01:PREFIX后面是安装路径,安装时系统会自动为我们创建不存在的目录

    技巧02:安装完成后的redis目录中只有一个bin目录

复制代码

bin目录文件解释:
                    -rw-r--r--. 1 root root      77 6月  10 18:14 dump.rdb   
                    -rwxr-xr-x. 1 root root 5580551 6月  10 18:08 redis-benchmark -->> 性能测试
                    -rwxr-xr-x. 1 root root   22177 6月  10 18:08 redis-check-aof -->> 文件修复工具
                    -rwxr-xr-x. 1 root root 7833185 6月  10 18:08 redis-check-rdb -->> 文件检查的工具
                    -rwxr-xr-x. 1 root root 5709379 6月  10 18:08 redis-cli -->> 命令行的客户端
                    lrwxrwxrwx. 1 root root      12 6月  10 18:08 redis-sentinel -> redis-server
                    -rwxr-xr-x. 1 root root 7833185 6月  10 18:08 redis-server -->> 启动redis服务的命令

复制代码

  8.3 配置文件

    进入到解压后的文件夹将redis的配置文件复制一份到redis的安装目录 -> cp redis.conf /usr/local/redis/

cp redis.conf /opt/installed/redis

 

9 启动服务端

  9.1 前台启动

    进入到redis安装目录的bin目录执行redis-server

    技巧01:直接 ctrl + c 就可以关闭前端启动

./redis-server

    

  9.2 后台启动

    9.2.1 进入到redis安装目录修改redis.conf文件 -> 将daemonize设置为yes

    技巧01:vi在非编辑模式下 / 表示查找,直接在 / 后面输入需要查找的内容后回车即可

    9.2.2 进入到redis安装目录下的bin目录启动redis ->  ./redis-server ../redis.conf

./redis-server ../redis.conf

    9.2.3 查看redis相关进程 -> ps -ef | grep -i redis

      

  9.3 关闭服务端

    9.3.1 杀进程

      查看redis相关进程,然后杀死进程即可 kill -9 进程号

    9.3.2 命令关闭

      或者进入到redis安装目录下的bin目录 -> ./redis-cli shutdown

      技巧01:这里是利用了redis客户端来关闭redis服务端

 

10 启动客户端

  10.1启动客户端

    进入到redis安装目录下的bin目录 -> ./redis-cli

    技巧01:最好是通过后台启动redis服务端,因为通过前台启动时还需要打开一个窗口来启动redis客户端

  10.2 连接测试

    redis客户端启动成功后执行ping -> ping

    技巧02:如果返回 PONG 就说明redis客户端和redis服务端连接成功

    

redis虚拟机环境搭建与安装redis NULL 博文链接:https://chentian114.iteye.com/blog/2290170 立即下载

相关推荐

Redis 服务端及客户端安装包

使用可视化工具redisclient连接redis,使用redisClient连接redis

别再手动勾选了!Winform DataGridView表头添加全选CheckBox的两种实战方案(附完整源码)

本文详细介绍了在Winform DataGridView表头添加全选CheckBox的两种实战方案,包括可视化控件方案和自定义HeaderCell方案。通过对比技术特性和性能表现,帮助开发者选择最适合企业级应用的解决方案,并附有完整源码和性能优化技巧,显著提升数据管理工具的操作效率。

weixin_30781433的博客 143

c语言版数据结构课程设计 学生成绩管理系统

此学生成绩管理系统完成15项功能,是我经过很多次的修改得到的。花费时间不短,功能齐全,主要完成了:输入,输出,插入,修改,删除,查询,读取文件,写入文件,复制文件,建立索引,显示各种情况下的信息,追加学生信息等等功能。一共15项。   代码如下: // shujujiegou.cpp : 定义控制台应用程序的入口点。///**本程序采用数组链表形式,原因:数组查询速度快,数组也能实现动态存储

Java 1万+

Winform中DatagridView 表头实现一个加上一个checkBox,实现全选选项功能

Winform中DatagridView 表头实现一个加上一个checkBox,实现全选选项功能

munangs的博客 1万+

CentOS7上装不了最新Chrome?别折腾依赖了,试试这个老版本安装法(附103.0.5060.24 beta下载地址)

本文提供了在CentOS7上安装兼容版Chrome的详细指南,解决了因GLIBC版本限制导致的最新版Chrome无法安装的问题。推荐使用Chrome 103.0.5060.24 beta版本,并附有下载地址和完整安装步骤,包括禁用自动更新和配套工具安装,确保系统稳定性和功能完整性。

weixin_29289821的博客 571

RGMII时序约束

RGMII时序约束

wudpekerlily的博客 5067

WinForm——DataGridView总结

常用属性 CurrentCell属性 获取或设置当前处于活动状态的单元格。语法:public DataGridViewCell currentCell{get;set;} 默认值时第一列中的第一个单元格,如控件中没有单元格,则为空引用。 例:DataGridView1.CurrentCell=DataGridView1[0,0]; 取消默认选中行的办法1、dataGridView1.Curr...

AI浩 5401

Python + Google AI 自动修复 Sonar Bug 实践

在工作中总会遇到种种不期而至的需求,比如前段时间突然要修复所有 Sonar Bug,涉及各种琐碎的代码风格问题,包括但不限于语法不规范、废弃注释等问题。这些项目都已经持续开发几年了,Sonar 上的问题层出不穷,各种问题已经累积到了上万个,手动修复不但费时费力,而且过程异常枯燥。

子洋 Blog 2417

DataGridView设置列类型为DataGridViewCheckBoxColumn,如何判断被选中

VS中Winform程序,DataGridView用着非常方便。如果要使用CheckBox类型,只需要设置一下就可以。但是如何判断某一行的Checkbox被选中呢?核心代码:private void btnPushdown_Click(object sender, EventArgs e) { List<int> selectList = new...

king422212809的博客 7741

Python实战:用nltk库5步搭建你的第一个n-gram文本生成器(附古诗生成案例)

本文详细介绍了如何使用Python的nltk库5步搭建n-gram文本生成器,并附有古诗生成案例。从环境准备、n-gram原理讲解到完整实现,逐步指导开发者掌握自然语言生成技术。特别针对中文古诗生成进行了优化,包括分词处理和韵律控制,帮助读者快速上手文本生成项目。

weixin_29090089的博客 208

【ArcGIS教程】基于DEM数据的洪水淹没分析——提取淹没区并计算淹没区洪水量

使用ArcGIS开展洪水淹没区分析、提取淹没区并计算淹没区洪水量的详细说明,如果想获取教程中实验数据,请关注微信公众号【GIS小能手】然后在后台留言。

weixin_45469245的博客 6826

如何实现Redis安装与使用的详细教程

Redis是一个使用C语言编写的开源、高性能、非关系型的键值对存储数据库。它支持多种数据结构,包括字符串、列表、集合、有序集合、哈希表等。Redis的内存操作能力极强,其读写性能非常优秀,且支持持久化,可以将数据存储到磁盘上,确保数据安全。Redis还提供了一个强大的Lua脚本引擎,可以用来实现一些复杂的业务逻辑。Redis的使用场景非常广泛,包括缓存、队列、计数器、分布式锁、会话存储等等。

web13765607643的博客 2354

YOLOv11损失函数进阶:融合SmoothL1与FocalLoss,让检测精度再涨10%的实战教程

在YOLOv11的这里的beta参数控制“L1与L2的过渡阈值”,默认设为1.0即可兼容多数场景。同样在# 计算动态alpha(基于类别样本数,需提前统计self.class_counts)# 交叉熵基础# FocalLoss权重else:使用前需统计数据集的(每个类别的样本数),并传入的alpha参数。损失函数是YOLOv11精度的“灵魂”——SmoothL1让边界框回归“稳、准、狠”,改进FocalLoss让类别分类“雨露均沾”。从代码改造到实战落地,本教程已为你搭建了一条精度跃升的路径。

m0_64661770的博客 214

[2-02-01].第03节:Linux环境中搭建 - 基于Redis-7.0.0的单点环境

在Linux环境中搭建Redis-7.0.0环境

F-T-er 981

ZYNQ GP总线实现PS与PL交互

3,完成 ZYNQ7 Processing System 的配置更改后,回到 Diagram 界面中,可以看到新出现了名为 M_AXI_GP0_ACLK、M_AXI_GP0 和 FCLK_CLK0 的接口,下面我们要对这些接口进行连接或引出。此处的偏移量,AXI的相邻寄存器偏移量相差4个字节,默认slv_reg0的偏移量是0,可以推导出slv_reg1,slv_reg2的偏移量分别为4和8,这里只用到了slv_reg0,所以偏移量为0。当然了,窗口数量的增加,势必会使得单个窗口的采样深度变小。

wangjie36的博客 7095

深度学习工具包 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")

day01——Java开发环境搭建

目的:编写Java代码工具:JDK—Java开发工具包环境:JRE—Java运行时环境。

2403_88004502的博客 2156

复分析 阿尔福斯(Ahlfors) 第三版答案 英文

答案分为十章,有部分习题没有答案,全英文复分析阿尔福斯(Ahlfors) 第三版答案

Redis环境搭建以及简单使用

Windows环境搭建 简述 官方推荐版本 2.8 Or 3.2 压缩版 下载地址 : https://github.com/MSOpenTech/redis/releases/download/win-3.2.100/Redis-x64-3.2.100.zip 安装版 下载地址 : https://github.com/MSOpenTech/redis/releases/down

AndyLizh的专栏 4985

jre9下载 jdk9

(Java SE Runtime Environment 9.0) 9.0u175 官方最新版 【x86|x64】

TMS_WebGMaps_1.9.8.0_Full_Source

TMS_WebGMaps_1.9.8.0_Full_Source 全源码 delphi cbuilder

开发环境搭建——Redis的安装配置

如果 redis 的应用场景是作为数据库使用,不建议设置最大内存限制,因为数据库是不能容忍丢失数据的;如果指定 Redis 最大内存限制,Redis 在启动时会把数据加载到内存中,达到最大内存后,Redis 会先尝试清除已到期或即将到期的 Key,当此方法处理后,仍然到达最大内存设置,将无法再进行写入操作,但仍然可以进行读取操作。打开cmd窗口,输入redis-cli 连接 redis服务,并做简单验证。设置Redis服务端口,默认6379,点击next。双击msi安装程序,打开安装向导,点击next。

m0_65520060的博客 610

Liunx环境下redis主从集群搭建(保姆级教学)01

因为我们没有设置redis可以后台启动,要想一直启动着服务端,那么必须开着这个窗口。在任何目录下都可以执行redis-cli --version检查redis是否安装成功,如果出现版本号,证明安装成功。第三个办法:在redis.conf配置文件中修改配置,指定它可以后台启动,这个办法往下看下一篇;解压完毕后可以看到,在/opt/redis文件夹下可以看到我们解压后的文件夹。进入创建的/opt/redis文件夹下,可以看到我们上传的安装包。进入到/opt/redis/src目录下,执行安装命令。

qq_43676797的博客 635

redis集群搭建

基于docker搭建redis集群 准备工作 服务 端口 服务器 容器名 Redis-master1 6379 120.55.164.91 Redis-master1 Redis-master2 6380 120.55.164.91 Redis-master2 Redis-master3 6381 120.55.164.91 Redis-master3 Redis-slave1 6382 120.55.164.91 Redis-...

520_LH 160

Redis集群搭建

redis单机版安装 环境准备 redis安装在Linux上,redis是c语言开发的,需要gcc-c++环境 查看是否安装gcc-c++ [root@itcast-01 ~]# rpm -qa | grep gcc-c++ gcc-c+±4.4.7-17.el6.i686 如果没有安装,可以使用yum命令进行网络安装 [root@itcast-01 ~]# yum install gcc-c...

DHR的博客 247

Redis服务端配置总结

1、redis 确保读到配置文件,使用下面方式启动服务器: #./redis-server/path/redis.conf   2、默认接受连接的端口 #6379   3、最大listen 队列 #tcp-backlog 511   4、连接地址方式,可以是一个或多个ip地址 # bind  192.168.1.100     192.168.1.60 # bind  192

黑夜童话的博客 1725

Linux运维:composer安装 thinkphp安装 Redis服务端安装,Redis php扩展安装

0x00 linux Composer的安装: cp /usr/local/php/bin/php /usr/bin/ mv composer.phar /usr/local/bin/composer 完成后输入composer 测试是否安装成功 更改中国镜像: composer config -g repo.packagist composer https://packagist....

坚持硬核 820

教程二:本地配置服务端开发环境

《物美智能》系列文章

qq_45273552的博客 2926
上一篇: SpringBoot30 整合Mybatis-Plus、整合Redis、利用Ehcache实现二级缓存、利用SpringCache和Redis作为缓存
下一篇: 最全面的springBoot集成mybatis+mysql项目搭建经验分享
It_BeeCoder
博客等级 码龄10年 967粉丝 238原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

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

抵扣说明:

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

余额充值