当前位置:网站首页>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.
边栏推荐
- How does the mobile phone remotely connect to the ECS? What should be paid attention to during the operation
- Shopify background XSS storage vulnerability
- Getattribute return value is null
- What is the use of domain name cloud resolution? What are the factors for domain name errors
- Elfk service setup
- Detailed explanation of tcpip protocol
- How novices choose ECs and how to judge the quality of ECS
- Three methods of local storage
- Activity recommendation | cloud native community meetup phase VII Shenzhen station begins to sign up!
- Data acquisition gateway intelligent industrial Internet of things
猜你喜欢

『渗透基础』Cobalt Strike基础使用入门_Cobalt Strike联动msfconsole

Analysis on the subjective enthusiasm of post-90s makers' Education

Zhang Xiaodan, chief architect of Alibaba cloud hybrid cloud: evolution and development of government enterprise hybrid cloud technology architecture

SAP mts/ato/mto/eto topic 8: ATO mode 2 d+ empty mode strategy 85

Idea creates a servlet and accesses the 404 message

Hard core observation 553 AI needs to identify almost everyone in the world with hundreds of billions of photos

Leetcode (question 1) - sum of two numbers

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

『应急响应实践』LogParser日志分析实践
![[leetcode daily question] push domino](/img/81/1c31e97d9a245816514bcf47c92107.jpg)
[leetcode daily question] push domino
随机推荐
梯度下降法介绍-黑马程序员机器学习讲义
How to change the IP address of ECS? What are the precautions for changing the IP address
What server does domain name and IP address convert through? How does the server convert?
014_ TimePicker time selector
Bi-sql order by
少儿编程课程改革后的培养方式
What is an ECS? What is the difference between ECs and traditional servers?
Bi-sql - Select
Recognize workplus again, not only im but also enterprise mobile application management expert
What are the functions of ASP files on ECs? What if the ECS cannot run ASP with a low version?
How to control CDN traffic gracefully in cloud development?
Spirit breath development log (12)
What is the secondary domain name of the website? What is the relationship between the secondary domain name and the primary domain name?
Introduction to the "penetration foundation" cobalt strike Foundation_ Cobalt strike linkage msfconsole
What is the implementation of domain name to IP address conversion? What are the benefits of switching to a website?
Bi-sql where
Activity recommendation | cloud native community meetup phase VII Shenzhen station begins to sign up!
Popularization of children's programming education in specific scenarios
What's wrong with the failure of uploading web pages to ECS? How many kinds of servers are there
Analyze the actual user groups and demand positioning of distributed database products from the market and demand