当前位置:网站首页>Redis installation mode for windows and Linux systems
Redis installation mode for windows and Linux systems
2022-06-24 05:04:00 【User 5005176】
Window Lower installation
Download address :https://github.com/MSOpenTech/redis/releases.
Redis Support 32 Bit and 64 position . This needs to be selected according to the actual situation of your system platform , Here we download Redis-x64-xxx.zip Compress package to C disc , After decompressing , Rename the folder redis.
Open folder , The contents are as follows :
Open one cmd window Use cd Command to switch the directory to C:\redis function :
redis-server.exe redis.windows.conf
If it's convenient , You can put redis Path to the system's environment variable , In this way, there is no need to lose the way , The one in the back redis.windows.conf It can be omitted , If omitted , Will enable the default . After typing , The following interface will be displayed :
At this time, another one will be opened cmd window , Don't close the original , Otherwise, you won't be able to access the server .
Switch to redis Run in directory :
redis-cli.exe -h 127.0.0.1 -p 6379
Set key value pairs :
set myKey abc
Take out the key value pair :
get myKey
Linux Lower installation
Download address :http://redis.io/download, Download the latest stable version .
The latest documentation version used in this tutorial is 2.8.17, Download and install :
$ wget http://download.redis.io/releases/redis-2.8.17.tar.gz $ tar xzf redis-2.8.17.tar.gz $ cd redis-2.8.17 $ make
make After finishing redis-2.8.17 Compiled... Will appear in the directory redis Service program redis-server, There are also client programs for testing redis-cli, Two programs are located in the installation directory src Under the table of contents :
Start below redis service .
$ cd src $ ./redis-server
Pay attention to this way to start redis The default configuration is used . You can also tell redis Use the specified configuration file to start .
$ cd src $ ./redis-server ../redis.conf
redis.conf Is a default profile . We can use our own configuration file as needed .
start-up redis After service process , You can use the test client program redis-cli and redis Service interaction . such as :
$ cd src $ ./redis-cli redis> set foo bar OK redis> get foo "bar"
Ubuntu Lower installation
stay Ubuntu System installation Redis You can use the following command :
$sudo apt-get update $sudo apt-get install redis-server
start-up Redis
$ redis-server
see redis Whether to start ?
$ redis-cli
The above command will open the following terminals :
redis 127.0.0.1:6379>
127.0.0.1 It's local IP ,6379 yes redis Service port . Now let's type in PING command .
redis 127.0.0.1:6379> ping PONG
The above shows that we have successfully installed redis.
stay Cloud Studio Run in Redis
Let's introduce how to Cloud Studio Install in 、 Use Redis:
- step1: visit Tencent cloud Developer Platform , register / Login account .
- step2: Select from the operating environment code list on the right :
"ubuntu"
- step3: Execute the command at the terminal below : sudo apt-get update sudo apt-get install redis-server
- step4: start-up Redis: redis-server
- step5: see redis Whether to start : redis-cli
The above command will open the following terminals :
redis 127.0.0.1:6379>
127.0.0.1 It's local IP ,6379 yes redis Service port . Now let's type in PING command :
redis 127.0.0.1:6379> ping PONG
The above shows that we have successfully installed redis.
边栏推荐
- Are you ready for the exam preparation strategy of level II cost engineer in 2022?
- Analyzing the superiority of humanoid robot in the post human era
- How does the mobile phone remotely connect to the ECS? What should be paid attention to during the operation
- How do ECS create FTP accounts? What should I pay attention to during creation?
- Detailed explanation of the process after the browser enters the domain name and web address
- Pgbouncer lightweight PG connection pool management tool
- Introduction to ebpf
- Inventory of common tools used by dry goods | data journalists
- 011_ Cascader cascade selector
- How to enlarge the ECS page? How to select ECS instance specifications?
猜你喜欢

SAP mts/ato/mto/eto topic 7: ATO mode 1 m+m mode strategy 82 (6892)

Training methods after the reform of children's programming course

少儿编程教育在特定场景中的普及作用

CTF learning notes 18:iwesec file upload vulnerability-03-content-type filtering bypass

Leetcode (question 2) - adding two numbers
![[leetcode daily question] push domino](/img/81/1c31e97d9a245816514bcf47c92107.jpg)
[leetcode daily question] push domino

解析90后创客教育的主观积极性

Introduction to the "penetration foundation" cobalt strike Foundation_ Cobalt strike linkage msfconsole

Facebook internal announcement: instant messaging will be re integrated

Recognize workplus again, not only im but also enterprise mobile application management expert
随机推荐
What domain names do not need to be filed? Is there any process for domain name registration
Introduction to gradient descent method - black horse programmer machine learning handout
Develop a customized music player from scratch, and your girlfriend will have it?
SAP mts/ato/mto/eto topic 7: ATO mode 1 m+m mode strategy 82 (6892)
Problem: SQL create stored procedure
Analyze the actual user groups and demand positioning of distributed database products from the market and demand
少儿编程课程改革后的培养方式
少儿编程教育在特定场景中的普及作用
Use of golang testing framework test
What is a network domain name? What is the role of a domain name for an enterprise
Tencent cloud audio and video award-winning evaluation | leave online messages or submit evaluation, win Dajiang UAV /iphone/switch and other awards
Integration of Alibaba cloud SMS services and reasons for illegal message signing
Powerbi - for you who are learning
How RedHat 8 checks whether the port is connected
"Emergency response practice" logparser log analysis practice
让孩子们学习Steam 教育的应用精髓
Bi-sql - Select
How do ECS create FTP accounts? What should I pay attention to during creation?
Hard core observation 553 AI needs to identify almost everyone in the world with hundreds of billions of photos
What is required for domain name filing and how to select an enterprise domain name