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

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.

主站蜘蛛池模板: 中阳县| 杭锦后旗| 永丰县| 周口市| 瑞金市| 陇南市| 马边| 陵川县| 湘潭县| 梁山县| 曲周县| 南康市| 芮城县| 南昌县| 阿拉善右旗| 营口市| 弋阳县| 苏尼特左旗| 咸阳市| 湟中县| 新密市| 湖北省| 定南县| 常山县| 叶城县| 甘孜县| 弥勒县| 全南县| 闻喜县| 汉阴县| 永新县| 固阳县| 左云县| 莎车县| 香格里拉县| 互助| 浦江县| 缙云县| 兴宁市| 澳门| 县级市|