Redis Learning Note II: Redis installation Windows/linux

Source: Internet
Author: User
Tags redis desktop manager install redis

First, under Windows installation

:https://github.com/MSOpenTech/redis/releases version 3.2.100

Baidu Network disk : HTTPS://PAN.BAIDU.COM/S/1JI9G1XK

According to the system, choose 32-bit or 64-bit (Zip) to download, extract to any directory to save.

You can also download the installation files for installation and see if the Redis service is properly installed in the service after the installation is complete.

1, server start : Open a CMD window, switch to the directory where Redis, run Redis-server.exe redis.windows.conf.

Of course, you can add the Redis path to the environment variable, so that you do not have to enter the path, the latter redis.windows.conf can be omitted, if omitted, the default is enabled.

2, the client : A new CMD window (server window cannot be closed, otherwise can not access the server),

Switch to Redis in the directory where you run Redis-cli.exe-h 127.0.0.1-p 6379

Set key-value pairs: Set MyKey myvalue

Remove key-value pairs: Get MyKey--get "myvalue"

3. Installing Redis as a Windows service

CMD window, switch to the directory where Redis is located, and optionally execute the following command:

(1) Installation

Redis-server--service-install redis.windows.conf

(2) Start

Redis-server--service-start

(3) Stop

Redis-server--service-stop

(4) Uninstall (with parameters, uninstall the specified service)

Redis-server--service-uninstall [--service-name Redisservicename]

4. Installing multiple Windows Services, Microsoft recommends installing up to 3 instances

An instance, corresponding to a redis.conf configuration file, and need to modify the port, as for the storage path, you like the good ...

 Redis-server.exe--service-install redis6379.conf--service-name redisSer6379--port 6379

 Redis-server.exe--service-install redis6380.conf--service-name redisSer6380--port 6380

5. A Redis visual management tool is also recommended : Redis Desktop Manager (off-wall website), Baidu Network disk

Second, the installation of Linux

:http://redis.io/download, current version 3.2.8

1. Download and install:

$ wget http://download.redis.io/releases/redis-3.2.8.tar.gz
$ tar xzf redis-3.2.8.tar.gz
$ CD redis-3.2.8
$ make

After make the redis-3.2.8 directory will appear after the compiled Redis service program Redis-server, as well as the client program for testing REDIS-CLI, two programs are located in the installation directory src directory.

2. Start the Redis service below:

$ cd src

$./redis-server

Note: this way of starting Redis is using the default configuration. You can also tell Redis to start with the following command using the specified configuration file through the startup parameters.

$ cd src
$./redis-server redis.conf

Redis.conf is a default configuration file. We can use our own configuration files as needed.
Once the Redis service process is started, you can use the test client program REDIS-CLI to interact with the Redis service.

3. Testing

$ cd src
$./redis-cli
Redis> set Foo Bar
Ok
Redis> get foo
"Bar"

      

Redis Learning Note II: Redis installation Windows/linux

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.