当前位置:网站首页>Redis ubuntu18.04.6 intranet deployment
Redis ubuntu18.04.6 intranet deployment
2022-06-23 17:39:00 【Common_ youmen】
1 brief introduction
Redis Is the key value storage in memory , With its flexibility 、 Performance and extensive language support . In this guide , We will show you how to Ubuntu 18.04.6 Install and configure Redis.
2 Install build and test dependencies
In order to get Redis Latest version , We will compile and install the software from the source . Before downloading the code , We need to satisfy our build dependencies , So that the software can be compiled .
sudo apt-get install gcc make # Download the deb Package in this directory /var/cache/apt/archives # If you want to deploy in a netless environment, you can take it offline deb The package is copied to the server and sudo dpkg -i *.deb
3 download , Compile and install redis
wget http://download.redis.io/releases/redis-6.0.1.tar.gz tar xf redis-6.0.1.tar.gz cd redis-6.0.1/ make && make MALLOC=libc
3.1 To configure Redis
sudo mkdir /data/jsdesign/apps/redis/{data,bin,conf} -p
sudo cp /tmp/redis-6.0.1/redis.conf /data/jsdesign/apps/redis/conf/
sudo vim /data/jsdesign/apps/redis/conf/redis.conf
216 supervised systemd
345 dir /data/jsdesign/apps/redis/data3.2 Create a Redis System unit files
sudo vim /lib/systemd/system/redis.service [Unit] Description=Redis In-Memory Data Store After=network.target [Service] User=redis Group=redis ExecStart=/data/jsdesign/apps/redis/bin/redis-server /data/jsdesign/apps/redis/conf/redis.conf ExecStop=/data/jsdesign/apps/redis/bin/redis-cli shutdown Restart=always [Install] WantedBy=multi-user.target
3.3 establish redis user , Group
sudo adduser --system --group --no-create-home redis sudo chown -R redis:redis /data/jsdesign/apps/redis
4 Start and test redis
4.1 start-up redis service
sudo systemctl start redis [email protected]:~/redis-6.0.1$ sudo systemctl status redis ● redis.service - Redis In-Memory Data Store Loaded: loaded (/etc/systemd/system/redis.service; static; vendor preset: enabled) Active: active (running) since Thu 2022-01-06 07:41:16 UTC; 1h 9min ago Main PID: 9034 (redis-server) Tasks: 4 (limit: 4656) CGroup: /system.slice/redis.service └─9034 /data/jsdesign/apps/redis/bin/redis-server 127.0.0.1:6379 Jan 06 07:41:16 ubuntu-test-240 redis-server[9034]: 9034:M 06 Jan 2022 07:41:16.041 # Server initialized Jan 06 07:41:16 ubuntu-test-240 redis-server[9034]: 9034:M 06 Jan 2022 07:41:16.041 # WARNING overcommit_memory i Jan 06 07:41:16 ubuntu-test-240 redis-server[9034]: 9034:M 06 Jan 2022 07:41:16.041 # WARNING you have Transparen Jan 06 07:41:16 ubuntu-test-240 redis-server[9034]: 9034:M 06 Jan 2022 07:41:16.041 * Loading RDB produced by ver Jan 06 07:41:16 ubuntu-test-240 redis-server[9034]: 9034:M 06 Jan 2022 07:41:16.041 * RDB age 0 seconds Jan 06 07:41:16 ubuntu-test-240 redis-server[9034]: 9034:M 06 Jan 2022 07:41:16.041 * RDB memory usage when creat Jan 06 07:41:16 ubuntu-test-240 redis-server[9034]: 9034:M 06 Jan 2022 07:41:16.041 * DB loaded from disk: 0.000 Jan 06 07:41:16 ubuntu-test-240 redis-server[9034]: 9034:M 06 Jan 2022 07:41:16.041 * Ready to accept connections Jan 06 07:41:16 ubuntu-test-240 redis-server[9034]: 9034:M 06 Jan 2022 07:41:16.041 # systemd supervision request Jan 06 08:50:26 ubuntu-test-240 systemd[1]: redis.service: Current command vanished from the unit file, execution lines 1-18/18 (END) sudo systemctl enable redis
5 test Redis Instance function
[email protected]:~/redis-6.0.1$ redis-cli 127.0.0.1:6379> ping PONG 127.0.0.1:6379> set test "redsi is ok" OK 127.0.0.1:6379> get test "redsi is ok" [email protected]:~/redis-6.0.1$ sudo systemctl restart redis [email protected]:~/redis-6.0.1$ redis-cli 127.0.0.1:6379> get test "redsi is ok"
边栏推荐
- How important is 5g dual card dual access?
- Robot Orientation and some misunderstandings in major selection in college entrance examination
- 混沌工程在云原生中间件稳定性治理中的实践分享
- Huawei mobile phones install APK through ADB and prompt "the signature is inconsistent. The application may have been modified."
- 【网络通信 -- WebRTC】WebRTC 源码分析 -- PacingController 相关知识点补充
- How long does it take to open a stock account by mobile phone? Is online account opening safe?
- Tupu software builds smart city with lightweight modeling
- ELK日志收集系统部署
- ABAP essays - program optimization notes
- EasyPlayer移动端播放webrtc协议时长按播放页面无法关闭“关于我们”页面
猜你喜欢

How to use SQL window functions

混沌工程在云原生中间件稳定性治理中的实践分享

图扑软件数字孪生挖掘机实现远程操控

Shushulang passed the listing hearing: the gross profit margin of the tablet business fell, and the profit in 2021 fell by 11% year-on-year

接口的所有权之争

官方零基础入门 Jetpack Compose 的中文课程来啦!

《MPLS和VP体系结构》

Ctfshow PHP features

【30. 串联所有单词的子串】

The Google play academy team PK competition is in full swing!
随机推荐
Elk log collection system deployment
Can the asemi fast recovery diodes RS1M, us1m and US1G be replaced with each other
What is an abstract class? How to define abstract classes?
A number of individual stocks in Hong Kong stocks performed actively, triggering investors' speculation and concern about the recovery of the Hong Kong stock market
Tupu software builds smart city with lightweight modeling
Innovative technology leader! Huawei cloud gaussdb won the 2022 authoritative award in the field of cloud native database
官方零基础入门 Jetpack Compose 的中文课程来啦!
数据库 实验二 查询
Wechat applet: time selector for the estimated arrival date of the hotel
How can the points mall make profits
C#与数据库连接
How long does it take to open a stock account by mobile phone? Is online account opening safe?
Jetpack compose and material you FAQs
如何设计一个秒杀系统?
EasyPlayer移动端播放webrtc协议时长按播放页面无法关闭“关于我们”页面
使用Jmeter进行性能测试及性能监控平台搭建
Database Experiment 2 query
DataNode进入Stale状态问题排查
Read the typical application circuit of microphone
Analysis of three battery capacity monitoring schemes