当前位置:网站首页>Detailed tutorial on installing stand-alone redis
Detailed tutorial on installing stand-alone redis
2022-07-02 19:33:00 【Charmaine Xia】
1. Download installation package
① Create a new directory on this computer
mkdir /home/admin/redis
② Go to the official website to download the installation package :https://redis.io/download/
③ Copy the installation package to the current virtual machine /home/admin/redis Under the table of contents
2. decompression redis
① Switch redis Under the table of contents , Unzip the installation package
cd /home/admin/redis
tar -zxvf redis-5.0.7.tar.gz
3. Install the basic environment
① install gcc compiler
yum install gcc-c++
Check whether the installation is successful :gcc -v
(gcc It is a super that can compile executable programs on a variety of hardware platforms compiler ,Gcc The compiler can C、C++ Language source 、 Assembly programming and object program compilation 、 connect Executable file ,redis yes C Written language )
② Generate src file
cd redis-5.0.7
make
make install
③redis The default installation path for
cd /usr/local/bin
4. Backup redis The configuration file
① Create a new directory to modify the configuration file
mkdir /home/admin/redis/redis-5.0.7/theRedisConf
② Copy the configuration file ( The original text is put in the unzipped directory for backup , Start up with theRedisConf Profile under )
cp /home/admin/redis/redis-5.0.7/redis.conf /home/admin/redis/redis-5.0.7/theRedisConf/
5. modify redis The configuration file
vi /home/admin/redis/redis-5.0.7/theRedisConf/redis.conf
## modify 1: Comment as follows , After annotation redis You cannot receive any ip The connection of
# bind 127.0.0.1
## modify 2: Turn off protection mode ( If set to yes, Then we are only allowed to connect in the loopback of this machine , Other machines cannot be connected .)
protected-mode no
## modify 3: Turn on redis The service runs in the background
daemonize yes
## modify 4: Add log path , Easy to troubleshoot
logfile “/home/admin/redis/redis-5.0.7/redis.log”
5. start-up redis service
① Turn on the firewall
systemctl start firewalld.service
② Open the specified port number
Check the opened port number
firewall-cmd --list-ports
Open the specified port number , The port number of the following example is 6379
firewall-cmd --zone=public --add-port=6379/tcp --permanent
③ service iptables restart
Only when the port number is opened successfully
firewall-cmd --reload
④ Start the service
cd /usr/local/bin/
./redis-server /home/admin/redis/redis-5.0.7/theRedisConf/redis.conf
6. How to view redis process
ps -ef|grep redis
7. How to close redis service
① Enter the client
redis-cli -p 6379 Or enter src perform ./redis-cli -p 6379
② close redis service
shoutdown
③ Exit client
exit
Close the client without entering redis
redis-cli shutdown
边栏推荐
- Virtual machine initialization script, virtual machine mutual secret key free
- Develop fixed asset management system, what voice is used to develop fixed asset management system
- 第七章-类基础
- Web2.0 giants have deployed VC, and tiger Dao VC may become a shortcut to Web3
- MySQL表历史数据清理总结
- Codeworks round 802 (Div. 2) pure supplementary questions
- AcWing 1127. 香甜的黄油 题解(最短路—spfa)
- 数据降维——主成分分析
- Getting started with typescript
- 2022.7.1-----leetcode.241
猜你喜欢

Idea editor removes SQL statement background color SQL statement warning no data sources are configured to run this SQL And SQL dialect is not config
![[error record] problems related to the installation of the shuttle environment (follow-up error handling after executing the shuttle doctor command)](/img/c1/a00425f2e1824a50644c8fbb15fe38.jpg)
[error record] problems related to the installation of the shuttle environment (follow-up error handling after executing the shuttle doctor command)

AcWing 903. 昂贵的聘礼 题解(最短路—建图、dijkstra)

《架构整洁之道》读书笔记(下)

End to end object detection with transformers (Detr) paper reading and understanding

Web2.0的巨头纷纷布局VC,Tiger DAO VC或成抵达Web3捷径

潇洒郎:彻底解决Markdown图片问题——无需上传图片——无需网络——转发给他人图片无缺失

《重构:改善既有代码的设计》读书笔记(上)

安装单机redis详细教程

Chic Lang: completely solve the problem of markdown pictures - no need to upload pictures - no need to network - there is no lack of pictures forwarded to others
随机推荐
教程篇(5.0) 10. 故障排除 * FortiEDR * Fortinet 网络安全专家 NSE 5
Golang concurrent programming goroutine, channel, sync
Use cheat engine to modify money, life and stars in Kingdom rush
mybatiesHelperPro工具必须的可以生成到对应项目文件夹下
Tutoriel (5.0) 10. Dépannage * fortiedr * fortinet Network Security expert NSE 5
Fastdfs installation
Codeworks round 802 (Div. 2) pure supplementary questions
SIFT特征点提取「建议收藏」
数据降维——主成分分析
横向越权与纵向越权[通俗易懂]
Markdown基础语法
[pytorch learning notes] tensor
High frequency interview questions
多态的理解以及作用
AcWing 1127. 香甜的黄油 题解(最短路—spfa)
股票证券公司排名,有安全保障吗
Windows2008R2 安装 PHP7.4.30 必须 LocalSystem 启动应用程序池 不然500错误 FastCGI 进程意外退出
Chic Lang: completely solve the problem of markdown pictures - no need to upload pictures - no need to network - there is no lack of pictures forwarded to others
数字滚动带动画
Py之interpret:interpret的简介、安装、案例应用之详细攻略