当前位置:网站首页>Start multiple redis instances on a Linux machine
Start multiple redis instances on a Linux machine
2022-07-23 17:46:00 【pilaf1990】
explain : On disk redis There's only one copy of the program , Can start multiple redis example , The ports of each instance are different .
Get into redis Find the version to download on the official website :https://redis.io/download
First in linux Machine mounted gcc( use yum install gcc install ), If not installed, follow up make Will report a mistake .
For example, I want to install /root/software Under the table of contents , Enter this directory .
- 1. download tar package
wget http://download.redis.io/releases/redis-5.0.9.tar.gz - 2. decompression tar package
tar xf redis-5.0.9.tar.gz - 3. perform make
cd redis-5.0.9
make ( If not installed gcc Will report a mistake , You can do it first yum install gcc install gcc, And then execute make distclean Before make The generated dirty files are cleared ) - 4. perform make install
make install PREFIX=/root/software/redis5 - 5. modify /etc/profile
vi /etc/profile
stay /etc/profile Add the following content to
export REDIS_HOME=/root/software/redis5
export PATH=${REDIS_HOME}/bin:${PATH}
Then save to exit ,Don't forget to execute source /etc/profile - 6. perform install_server.sh Script
cd utils
./install_server.sh
You will be asked to enter the port number later , If you enter without entering, it defaults to 6379. All the way back .
This script can be executed multiple times , Every time it is executed, a redis example .
Can pass ps -ef | grep redis Command to see how many redis example :
[[email protected] utils]# ps -ef | grep redis
root 11851 1 0 10:23 ? 00:00:03 /root/software/redis5/bin/redis-server 127.0.0.1:6379
root 11920 1 0 10:23 ? 00:00:03 /root/software/redis5/bin/redis-server 127.0.0.1:6380
root 12006 11981 0 11:17 pts/1 00:00:00 grep --color=auto redis
- 7. test redis
[[email protected] utils]# redis-cli -p 6380
127.0.0.1:6380>
127.0.0.1:6380> set mykey myvalue
OK
127.0.0.1:6380> get mykey
"myvalue"
127.0.0.1:6380>
Reference resources : Soldier Zhou Zhima University Redis Series of tutorials
边栏推荐
- Interviewer: what is the possible reason for the slow query of MySQL database besides the index problem?
- Don't ask me again why MySQL hasn't left the index? For these reasons, I'll tell you all
- Why do you get confused when you ask JVM???
- Food safety | drinking fresh milk may infect tuberculosis? Take you to know what is milk sterilization
- xlinx pcie xvc
- Implementation of deep copy deepclone
- Tampermonkey究竟有什么用?
- Interviewer: how to use redis to realize distributed locks?
- 数智化时代文旅遇新机?中国移动咪咕造 “元宇宙第一岛”
- 使用moment获取当天日期与下一天
猜你喜欢

nVisual综合布线管理软件与网管软件的区别

5秒到1秒,记一次效果“非常”显著的性能优化

Leetcode skimming: dynamic planning 04 (different paths)

Interviewer: how to use redis to realize distributed locks?

数据集中度分析,数据分布情况

面试官:MySQL 数据库查询慢,除了索引问题还可能是什么原因?

基于OpenPGP的文件管理系统

MySQL大量写入问题优化方案 MySQL参数调优

Kubernetes kubelet manages pod core process

At least half of the people can't answer the difference between isempty and isblank
随机推荐
The use method of quota command is expanded in detail, and the carrying method of quota command in RHEL 7! Disk capacity quota!
USB通信协议深入理解
rust统计文件中单词出现的次数
Three things programmers want to do most | comics
Tampermonkey究竟有什么用?
leetcode刷题:动态规划04(不同路径)
Visualization of network infrastructure
程序员最想干的三件事 |漫画
别再问我MySQL为啥没走索引?就这几种原因,全都告诉你
活动报名:如何零基础快速上手开源的 Tapdata Live Data Platform?
[introduction series of redis] data types and related commands of redis
Time series data in industrial Internet of things
Do you dare to use BigDecimal without mastering these pits?
Date formatting
@Bean 注解的方法调用多次会创建多个bean 实例吗
Kv260 single board PS control setting IIC switch chip
rust求两数之和
nVisual综合布线管理软件与网管软件的区别
@Will multiple bean instances be created by multiple method calls of bean annotations
乘风破浪!金融科技时代下的数字化转型之路