ReviewIn the previous section, we have laid down the functional specs of the application and studied how to map a Java object to a Redis data structure. In this section, we will study how to setup a Redis server both in Windows and Ubuntu.
Table of ContentsPart 1: Introduction and Functional Specs
Part 2: Redis setup
Part 3: Java classes
Part 4: XML configuration
Part 5: HTML (with AJAX)
Part 6: Running the Application
Redis SetupWe will demonstrate first how to setup Redis in Windows 7, then on Ubuntu 10.04.
Windows 7To setup a Redis server in Windows, follow these steps:
1. Open a browser and visit the Redis download section at http://redis.io/download
2. Choose the Win32/64 download. Notice it's status is Unofficial because the Redis project does not directly support win32/win64
3. Although Windows is not officially supported, there's a port available for it by Dušan Majkić. Under the Win32/64 section, click on the link A Native win32/win64 port created by Dušan Majkić.. It will bring you to a Github page.
4. Click on the Downloads section (upper-right) and you should see the following downloads.
5. Download the latest one (currently, it's 2.4.5).
6. Once the download is finished, extract the contents. Open the new folder and browse under the 32bit folder (choose 64bit if you have Windows 64bit version).
7. To run a Redis server, double-click the redis-server.exe
You should see the following console stating that Redis is now running:
To run a client interface, double-click the redis-cli.exe
And you should see the following console--waiting for your command:
Ubuntu 10.04To setup a Redis server in Ubuntu, you will need to build it from the source. There are two ways:
- Manual download
Manual download1. Open a browser and visit the Redis download section at http://redis.io/download
2. Download the latest and stable version (currently at 2.4.7).
3. Once the download is finished, extract the contents.
4. Now, let's build the source. Open a terminal and enter the following command:
After building Redis, test it using the following command (make sure to replace REDIS-DOWNLOAD-PATH accordingly):
5. The binaries that are now compiled are available in the src directory. Run Redis with:
Terminal-based1. Download, extract and compile Redis with:
$ wget http://redis.googlecode.com/files/redis-2.4.7.tar.gz $ tar xzf redis-2.4.7.tar.gz $ cd redis-2.4.7 $ make
2. The binaries that are now compiled are available in the src directory. Run Redis with:
Note: These are the same steps you will see under the Download section at http://redis.io/download
NextIn the next section, we will discuss the project's structure and start writing the Java classes. Click here to proceed.
Share the joy:
Subscribe by reader Subscribe by email Share