官术网_书友最值得收藏!

  • Learning Redis
  • Vinoo Das
  • 392字
  • 2021-07-16 14:08:30

Installing Redis on Windows

Microsoft Open Tech group has ported Redis and maintains it for win32/win64 machines. There are two ways in which we can get started with installing Redis on Windows, and these are listed as follows:

  • Working with prebuilt binaries
  • Getting the code and compiling it in the Microsoft environment

For the impatient, downloading the binaries of Redis 2.8 is an easier option. First things first, we need to do the following in order to get started:

  1. Go to https://github.com/MSOpenTech/redis and download the ZIP file under the Clone in Desktop button. For this book, we are going to download the latest version of Redis, that is, the redis-2.8.zip file.
  2. Right-click on the link and save it in a suitable location on your Windows machine. I have saved it at F:\sw2\redis\redis-2.8.zip.
  3. Right-click and unzip the compressed file to a suitable folder. I have named the folder as redis-2.8, and the folder structure after unzipping looks similar to what is shown in the following screenshot:

    Folder structure after unzipping the compressed file

  4. Get inside the bin folder. You will find the release folder; when you click on it, you will have a list of the files inside this folder, as shown in the following screenshot:

    Folder structure inside the bin/release folder

  5. Open Command Prompt and run redis-server.exe. Provide the redis-server.exe --maxheap 1024mb heap size and you should see a console window popping up, similar to the following screenshot. In the case of Windows 7, the user might be asked to trust the software to proceed further.

    Redis server's default startup

  6. Note the last line showing on the Command Prompt: The servers now ready to accept connections on port 6379.
  7. Now, let's start a prebuilt client, which is shipped with the distribution, and connect to the server. The client that we will execute is a command-line interpreter, and when we click on it, the client program will be launched:

    The Redis client is started with the Redis server running

  8. Your simple installation is complete (clustered setup and other management topics will be taken up in later chapters).
    Tip

    Downloading the example code

    You can download the example code files from your account at http://www.packtpub.com for all the Packt Publishing books you have purchased. If you purchased this book elsewhere, you can visit http://www.packtpub.com/support and register to have the files e-mailed directly to you.

主站蜘蛛池模板: 吉林市| 侯马市| 仲巴县| 宝鸡市| 左贡县| 略阳县| 化德县| 永福县| 陵川县| 西贡区| 英山县| 清苑县| 安塞县| 鹤峰县| 海门市| 甘谷县| 故城县| 卓尼县| 泸州市| 金塔县| 平乡县| 墨玉县| 富阳市| 巴塘县| 玛多县| 社旗县| 周至县| 化隆| 亚东县| 志丹县| 榆林市| 射阳县| 阳江市| 上犹县| 乳源| 灌南县| 延长县| 长春市| 中宁县| 大同市| 平邑县|