当前位置:网站首页>redis-1. Install redis with pictures and texts
redis-1. Install redis with pictures and texts
2022-06-13 07:12:00 【Floating across the sea】
redis
install redis
1. Visit the official website https://redis.io/

2. You can copy the link , It can also be downloaded directly , I use direct copy link here
3. yum install wgetLinux download wget command
4. wget https://download.redis.io/releases/redis-6.2.6.tar.gz
5. Decompress the package tar xf redis…tar.gz, You can see the downloaded redis A very small

Unzip and enter redis…, Generally, what software is installed now , You can see it directly readme
For example, it can tell you how to compile
If the compilation fails, you can also usemake distclean

It can also tell you how to start redis

Default redis Configuration file installation path

6. Use make. (make yes Linux The original order , Will be looking for Makefile), stay src There is also a... Under the file Real body makefile Detailed instructions . Default installation path

7. Return to the right topic , Use it directly make command , install redis.. redis-6.2.6 Under the table of contents
Report errors gcc, Can install
yum install gcc
In the use ofmake distcleanCleanup installation failed
After successful installation, you can see make test

8. To src Under the directory, you can ** ./redis-serve** start-up redis. ( At this time, the program has been generated )
9. In fact, we have successfully installed it here , But we certainly don't want to use this command every time we start up in our daily development process
10. make install PREFIX=/opt/redis6

The purpose of this step is to move the executable out of , Not mixed with the source code

11. For example, we want to use service start redis . But this step certainly does not support . Back to utils below , find install_server.sh

12. First of all, let's j Add the executor to the environment variable vim /etc/profile

13. source /etc/profile Refresh profile , Check whether the configuration path is correct echo $PATH

14. Use ./install_server.sh Prompt error , This program seems to use systemd
This systems seems to use systemd.
modify install_server.sh file , Find the following and comment out the prompt
#bail if this system is managed by systemd
_pid_1_exe="$(readlink -f /proc/1/exe)"
if [ "${_pid_1_exe##*/}" = systemd ]
then
echo "This systems seems to use systemd."
echo "Please take a look at the provided example service unit files in this directory, and adapt and install them. Sorry!"
exit 1
fi
Comment and rerun , Just keep returning , This default will be added to the boot
stackoverflowAddress :ttps://stackoverflow.com/questions/61694459/installing-redis-use-install-server-sh
Welcome to the redis service installer
# One physics machine can run multiple machines redis Distinguish by port number
This script will help you easily set up a running redis server
# Select the port number 16379
Please select the redis port for this instance: [6379] 16379
# 16379 Where to put the configuration file
Please select the redis config file name [/etc/redis/16379.conf]
Selected default - /etc/redis/16379.conf
# redis_16379 Where to put the log file
Please select the redis log file name [/var/log/redis_16379.log]
Selected default - /var/log/redis_16379.log
# redis_16379 Where is the data stored , Disk directories store data , Persistence problem
Please select the data directory for this instance [/var/lib/redis/16379]
Selected default - /var/lib/redis/16379
# Executable path , Because it's up there config It's equipped with , So you know the path
Please select the redis executable path [/opt/redis6/bin/redis-server]
Selected config:
Port : 16379
Config file : /etc/redis/16379.conf
Log file : /var/log/redis_16379.log
Data dir : /var/lib/redis/16379
Executable : /opt/redis6/bin/redis-server
Cli Executable : /opt/redis6/bin/redis-cli
Is this ok? Then press ENTER to go on or Ctrl-C to abort.
# Copy the temporary directory to the system file
Copied /tmp/16379.conf => /etc/init.d/redis_16379
# From installation to service
Installing service...
# Boot up
Successfully added to chkconfig!
Successfully added to runlevels 345!
Starting Redis server...
Installation successful!
15. cd /etc/init.d/
You can see that there is a redis_16379 Script
16. service redis_16379 status The installation is complete with the port number

17 Specified port login redis-cli -p 16379
Default redis-cli Activate access 639
18 Set the password config set requirepass XXXX
Non permanent settings . Restart failure
# Get into redis Set up
config set requirepass 123456
# Get password
config get requirepass
# Sign in
auth 123456
Permanent configuration
Find the installation cofing /etc/redis/16379.conf

After setting the password , Every time you restart redis Need to be redis -a 123456 stop
You can set init.d Next we install redis6379
vi /etc/init.d/redis
$CLIEXEC -a "youpassword" -p $REDISPORT shutdown
You can also use
vim /etc/init.d/redis_6379
RESDISPASSWORD=“123456”
Hereunder stop Add down -a
$CLIEXEC -a $RESDISPASSWORD -p $REDISPORT shutdown

relieve ip Limit binding
take bind notes Find the installation cofing /etc/redis/16379.conf

边栏推荐
- Xuanwu cloud technology passed the listing hearing: the performance fluctuated significantly, and chenyonghui and other three were the controlling shareholders
- Fe of mL: introduction to vintage curve /vintage analysis, calculation logic and detailed introduction to case application
- 百货中心供应链管理系统
- How to use clion to debug a project built by the make tool
- 关于#数据库#的问题:PGADMIN4 编辑sql窗口问题
- Que se passe - t - il si les produits financiers sont nuls pendant plusieurs jours?
- Xiaomi's one-sided interview questions (self sorting answers)
- Postgraduate entrance examination English
- 2022 - 06 - 12: dans un échiquier carré n * N, il y a n * n pièces, donc chaque pièce peut avoir exactement une pièce. Mais maintenant quelques pièces sont rassemblées sur une grille, par exemple: 2 0
- Periodontitis investigation (ongoing)
猜你喜欢
![[RS-422 and RS-485] RS-422 and RS-485 serial interface standard](/img/08/e50df07d387b2f2d57a518caedc795.jpg)
[RS-422 and RS-485] RS-422 and RS-485 serial interface standard

Make cer/pfx public and private key certificates and export CFCA application certificates

Nfv basic overview

WWDC2022最大的亮点: MetalFX
![[cloud native | kubernetes] kubernetes configuration](/img/cb/20595d34a9e203b83dd086cc27037d.png)
[cloud native | kubernetes] kubernetes configuration

AIO Introduction (VIII)

Tidb statistics
![[Markov chain Monte Carlo] Markov chain Monte Carlo method sampling prior distribution](/img/8a/e6423168e110a168bc3cc6407628f6.png)
[Markov chain Monte Carlo] Markov chain Monte Carlo method sampling prior distribution

2022-06-12:在N*N的正方形棋盘中,有N*N个棋子,那么每个格子正好可以拥有一个棋子。 但是现在有些棋子聚集到一个格子上了,比如: 2 0 3 0 1 0 3 0 0 如上的二维数组代表,一

TiDB Lightning
随机推荐
RT-Thread 模拟器 simulator LVGL控件:slider 控件
不间断管理设计
It's called the next generation monitoring system. Let's see how awesome it is
TXT_ File encryption and compression
FSM state machine
个人js学习笔记
Local file upload FTP or remote directory
【騰訊阿裏最全面試題集錦】(四面:3輪技術+1輪HR)
MySQL query timeout control
MySQL does not recommend setting the column default value to null. Why on earth is this
2022 - 06 - 12: dans un échiquier carré n * N, il y a n * n pièces, donc chaque pièce peut avoir exactement une pièce. Mais maintenant quelques pièces sont rassemblées sur une grille, par exemple: 2 0
How to make a development board from scratch? Illustrated and illustrated, step by step operation for you to see.
RT thread simulator lvgl control: switch switch button control
Word document export
No configure file found when compiling PHP from source code
Real time lighting of websocket server based on esp32cam
[weak transient signal detection] matlab simulation of SVM detection method for weak transient signal under chaotic background
在 localStorage 中上传和检索存储图像
学习Mysql基础第一天
简单了解C语言基本语