当前位置:网站首页>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.
边栏推荐
- Replication of variables in golang concurrency
- Leetcode (question 1) - sum of two numbers
- Shutter - how to copy certain elements from a map to a new map in dart/shutter?
- What is stored in the domain name server? How does the domain name server provide services?
- Advantages of fixed assets management system
- How to install software on ECs is it expensive to rent ECS
- How are ECS leased? Can the ECS use VPN?
- [leetcode daily question] push domino
- Leetcode question brushing (question 3) - the longest substring without repeated characters
- Bi-sql and & or & in
猜你喜欢

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

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

CTF learning notes 17:iwesec file upload vulnerability-02 file name filtering bypass

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

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

Introduction à la méthode de descente par Gradient - document d'apprentissage automatique pour les programmeurs de chevaux noirs

"Emergency response practice" logparser log analysis practice

What are the disadvantages of the free IP address replacement tool?

Analysis on the subjective enthusiasm of post-90s makers' Education
随机推荐
What are the disadvantages of the free IP address replacement tool?
Data acquisition gateway intelligent industrial Internet of things
What is the secondary domain name of the website? What is the relationship between the secondary domain name and the primary domain name?
014_ TimePicker time selector
What are the advantages of ECS? Is ECS better than VM?
Replication of variables in golang concurrency
Cos+cdn realizes the distribution of game client version files in a faster, better and cheaper manner
线性回归的损失和优化,机器学习预测房价
Customer disaster recovery case - a MySQL database migration scheme
Advantages of fixed assets management system
How to create an FTP server on the ECS? Is it safe to create an FTP server on the ECS?
Why domain name should be resolved? What is the domain name registration query
5g and industrial Internet
How to enlarge the ECS page? How to select ECS instance specifications?
When remote, your resolution is lower than a × B. Some items may not be displayed on the screen
Problem: SQL create stored procedure
Integration of Alibaba cloud SMS services and reasons for illegal message signing
Medical industry EDI overview
Many regulations come into effect today! The main responsibility of network security will be further implemented
Functional advantages of industrial wireless router