当前位置:网站首页>Redis series - redis startup, client day1-2
Redis series - redis startup, client day1-2
2022-06-26 07:09:00 【Concise programming】
Redis series ——redis start-up , client ,GUI
Redis start-up
The front desk starts
The front desk startup is actually that we are day1-1 See the last startup mode
If we close terminal Will shut down
redis-server
redis-cli
Background start
Even if it turns off terminal It won't shut down redis
First we need to find reids Configuration file for related configuration
find redis The configuration file
redis The configuration file for is redis.comf Position in /etc/redis Next
You can find
whereis redis

Copy redis.conf
We will redis.conf The original configuration is copied to redis_copy.conf
cp redis.conf redis_copy.conf

Modify the configuration file
Change the listening address to 0.0.0.0
Originally 127.0.0.1 Indicates local access , It is amended as follows 0.0.0.0 Can be used in any IP Visit , because 0.0.0.0(unspecified) Indicates the total broadcast address of the machine , yes IP Address set ( You can understand it this way ), arbitrarily IP All are accessible
bind 0.0.0.0
Modify the daemon to yes
Indicates that background startup is allowed
daemonize yes
Change Password ( It's up to you )
requirepass 123456
Other configuration
// Modify the port
port 6379
// Modify working directory
dir .
// Modify the number of databases ,1 Means to use the first library , share 16 Databases (0--15)
databases 1
// Set the maximum memory
maxmemory 512mb
// Set log file location
logfile "redis.log"
start-up ( Plus configuration files )
redis-server /etc/redis/redis.conf
Boot up ( recommend )
Edit service file
cd /etc/systemd/system
vim redis.service
The contents are as follows :
[Unit]
Description=redis-server
After=network.target
[Service]
Type=forking
ExecStart=/usr/bin/redis-server /etc/redis/redis.conf
PrivateTmp=true
[Install]
WantedBy=multi-user.target
Reload service
systemctl daemon-reload
Boot up ( If the startup fails, you can restart it )
systemctl start redis
systemctl enable redis

client ( This refers to the command-line client )
Namely redis-cli
redis-cli [options] [commonds]
options:
- -h 127.0.0.1 : Indicates the specified to connect redis Node IP Address
- -p 6379: Specify port number
- -a 123456: Specify the access password as 123456
commonds
- ping: Perform a heartbeat test , Normal return pong
GUI
https://github.com/lework/RedisDesktopManager-Windows/releases
Then you can install it normally
边栏推荐
- 【图像增强】基于人工多重曝光融合AMEF实现图像去雾附matlab代码
- 炒股怎么选择证券公司?手机开户安全么?
- One chip realizes functions such as spray 𞓜 ws2812 drive | key touch | LED display | voice broadcast chip and simplifies the design of humidifier products
- MySQL'replace into'has a self incrementing ID of the pit. There is a problem with the backup opportunity
- 网络io,磁盘io
- ES字符串类型(Text vs keyword)的选择
- 【图像检测】基于Itti模型实现图像显著性检测附matlab代码
- Installation homebrew error summary
- What is data mining?
- Dark red crystal meso-5,10,15,20-tetra (p-aminophenyl) cobalt porphyrin (co TAPP); Meso-5,10,15,20-tetra (p-aminophenyl) cobalt porphyrin no complex (TAPP co no) supplied by Qiyue
猜你喜欢

5,10,15,20-tetraphenylporphyrin (TPP) and metal complexes fetpp/mntpp/cutpp/zntpp/nitpp/cotpp/pttpp/pdtpp/cdtpp supplied by Qiyue

How can I find the completely deleted photos in Apple mobile phone?

Procedure macros in rust

Tetra - (4-pyridyl) porphyrin tpyp and metal complexes zntpyp/fetpyp/mntpyp/cutpyp/nitpyp/cotpyp/ptpyp/pdtpyp/cdtpyp (supplied by Qiyue porphyrin)

大厂面试TCP协议经典十五连问!22张图让你彻底弄明白
![[image segmentation] blood vessel extraction from retinal fundus images based on maximum principal curvature with matlab code](/img/10/3cef095ae5834bbbe51ef16b5c9f78.png)
[image segmentation] blood vessel extraction from retinal fundus images based on maximum principal curvature with matlab code

Shell编程-用户信息管理

【推荐一款实体类转换工具 MapStruct,性能强劲,简单易上手 】

. Net 20th anniversary! Microsoft sends a document to celebrate

Tetradecanoxy tetraphenylporphyrin methacrylate mm-tpp-14c; Cetanoxy tetraphenyl porphyrin methacrylate mm-tpp-16c; Purple solid; Qiyue supply
随机推荐
Parameter index out of range (0 < 1) (1> number of parameters, which is 0
【图像检测】基于形态学实现图像目标尺寸测量系统附matlab代码
Tetradecanoxy tetraphenylporphyrin methacrylate mm-tpp-14c; Cetanoxy tetraphenyl porphyrin methacrylate mm-tpp-16c; Purple solid; Qiyue supply
【推荐一款实体类转换工具 MapStruct,性能强劲,简单易上手 】
[path planning] robot path planning based on improved artificial potential field with matlab code
MySQL 'replace into' 的坑 自增id,备机会有问题
Shell input validation alphanumeric only
php array_merge详解
同花顺究竟如何开户,网上开户是否安全么?
The performance of iron and steel enterprises was expected to be good in January this year. Since February, the prices of products of iron and steel enterprises have increased significantly. A mighty
Alkynyl crosslinked porphyrin based polyimide materials (ppbpi-h-cr, ppbpi Mn cr.ppbpi Fe Cr); Metalloporphyrin based polyimide (ppbpi Mn, ppbpi FE) supplied by Qiyue
【元胞自动机】基于元胞自动机实现高速公路收费站交通流问题附matlab代码
Shengshi Haotong enterprise wechat sector creates a digital ecological community
[image fusion] MRI-CT image fusion based on gradient energy, local energy and PCA fusion rules with matlab code
一文深入底层分析Redis对象结构
China's audio industry competition trend outlook and future development trend forecast report 2022 Edition
缓存使用
【推荐10个 让你轻松的 IDEA 插件,少些繁琐又重复的代码】
Numpy learning challenge level 5 - create array
炒股怎么选择证券公司?手机开户安全么?