当前位置:网站首页>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.
边栏推荐
- Before creating an image, it is recommended to execute the following code to purify the image as an administrator
- oracle数据库提示无操作权限的问题
- mini-Web框架:装饰器方式的添加路由 | 黑马程序员
- How to create an FTP server on the ECS? Is it safe to create an FTP server on the ECS?
- Jimureport building block report - expression introduction
- How to control CDN traffic gracefully in cloud development?
- cuDNN installation
- 阿里云混合云首席架构师张晓丹:政企混合云技术架构的演进和发展
- IP and traffic reconciliation tool networktrafficview
- Real time monitoring: system and application level real-time monitoring based on flow computing Oceanus (Flink)
猜你喜欢

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

What is the new generation cloud computing architecture cipu of Alibaba cloud?

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

Leetcode (question 1) - sum of two numbers

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

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

Facebook internal announcement: instant messaging will be re integrated

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

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

Zhang Xiaodan, chief architect of Alibaba cloud hybrid cloud: evolution and development of government enterprise hybrid cloud technology architecture
随机推荐
梯度下降法介紹-黑馬程序員機器學習講義
Locating memory leaks with poolmon
There are many ways to confirm and modify the remote port number
Shutter - how to copy certain elements from a map to a new map in dart/shutter?
Pg-pool-ii read / write separation experience
Bi-sql order by
What is cloud server? How to access the ECS Homepage
SAP mts/ato/mto/eto topic 10: ETO mode q+ empty mode unvalued inventory policy customization
IP and traffic reconciliation tool networktrafficview
2021-08-27: the normal odometer will display natural numbers in turn to indicate mileage, Kyrgyzstan
Disaster recovery series (IV) - disaster recovery construction of business application layer
Many regulations come into effect today! The main responsibility of network security will be further implemented
Customer disaster recovery case - a MySQL database migration scheme
Introduction to gradient descent method - black horse programmer machine learning handout
Inventory of common tools used by dry goods | data journalists
少儿编程教育在特定场景中的普及作用
GDB debugging container and command saving
What's wrong with the failure of uploading web pages to ECS? How many kinds of servers are there
Bi-sql and & or & in
Share 10 creative projects of Gaoxing!