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

  • 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.

主站蜘蛛池模板: 涞源县| 蒙阴县| 彭山县| 耒阳市| 永城市| 屏南县| 抚州市| 崇仁县| 威海市| 巴中市| 大荔县| 卓资县| 乐都县| 郓城县| 巴彦县| 大理市| 海伦市| 东台市| 安义县| 胶南市| 达孜县| 甘肃省| 阿荣旗| 黄浦区| 神农架林区| 板桥市| 乐至县| 古丈县| 新安县| 察哈| 茂名市| 顺义区| 平顶山市| 博湖县| 吴川市| 黄平县| 哈巴河县| 渑池县| 五家渠市| 将乐县| 浦县|