X-Git-Url: https://git.saurik.com/redis.git/blobdiff_plain/45636487143097d360dfba4f3fa602b08927e355..379789cc523df4de1a3263c879114610949fade1:/doc/QuickStart.html diff --git a/doc/QuickStart.html b/doc/QuickStart.html index be0e4424..c233a1b5 100644 --- a/doc/QuickStart.html +++ b/doc/QuickStart.html @@ -16,7 +16,7 @@
-QuickStart: Contents
  Quick Start
    Obtaining the latest version of Redis
    Compiling Redis
    Running Redis
    Testing Redis
    Further reading +QuickStart: Contents
  Quick Start
    Obtain the latest version
    Compile
    Run the server
    Play with the built in client
    Further reading

QuickStart

@@ -26,22 +26,39 @@
-

Quick Start

This quickstart is a five minutes howto on how to get started with Redis. For more information on Redis check Redis Documentation Index.

Obtaining the latest version of Redis

The latest stable source distribution of Redis can be obtained at this location as a tarball. The unstable source code, with more features but not ready for production, can be downloaded using git:

-git clone git://github.com/antirez/redis.git
-

Compiling Redis

Redis can be compiled in most POSIX systems, but the development targets mainly Linux, Mac OS X, FreeBSD and OpenBSD. Solaris is currently not supported and there are no short-term plans to support it.

To compile Redis just untar the tar.gz, enter the directly and type 'make'.

-tar xvzf redis-1.0.0.tar.gz
-cd redis-1.0.0
-make
-
In order to test if the Redis server is working well in your computer make sure to run make testand check that all the tests are passed.

Running Redis

Redis can run just fine without a configuration file (when executed without a config file a standard configuration is used). To run Redis just type the following command:

-./redis-server
-
With the default configuration Redis will log to the standard output so you can check what happens. Later, when you'll ready to install Redis in production, you may want to use a configuration file. The redis.conf file included in the source code distribution is a starting point, you should be able to modify it in order do adapt it to your needs without troubles reading the comments inside the file. In order to start Redis using a configuration file just pass the file name as the sole argument when starting the server:

-./redis-server redis.conf
-

Testing Redis

To check if the server is working correctly you can use the redis-cli utility included in the source distribution (and automatically compiled when you compile Redis). For instance to set a key and read back the value use the following:

-./redis-cli set mykey somevalue
+                    #sidebar RedisGuides
+

Quick Start

This quickstart is a five minutes howto on how to get started with Redis. For more information on Redis check Redis Documentation Index.

Obtain the latest version

The latest stable source distribution of Redis can be obtained at this location as a tarball.

+$ wget http://redis.googlecode.com/files/redis-1.02.tar.gz
+
The unstable source code, with more features but not ready for production, can be downloaded using git:

+$ git clone git://github.com/antirez/redis.git
+

Compile

Redis can be compiled in most POSIX systems. To compile Redis just untar the tar.gz, enter the directly and type 'make'.

+$ tar xvzf redis-1.02.tar.gz
+$ cd redis-1.02
+$ make
+
In order to test if the Redis server is working well in your computer make sure to run make test and check that all the tests are passed.

Run the server

Redis can run just fine without a configuration file (when executed without a config file a standard configuration is used). To run Redis just type the following command:

+$ ./redis-server
+
With the default configuration Redis will log to the standard output so you can check what happens. Later, you can change the default settings.

Play with the built in client

Redis ships with a command line client that is automatically compiled when you ran make and it is called redis-cliFor instance to set a key and read back the value use the following:

+$ ./redis-cli set mykey somevalue
 OK
-./redis-cli get mykey
+$ ./redis-cli get mykey
 somevalue
-

Further reading

+
What about adding elements to a list:

+$ ./redis-cli lpush mylist firstvalue
+OK
+$ ./redis-cli lpush mylist secondvalue
+OK
+$ ./redis-cli lpush mylist thirdvalue
+OK
+$ ./redis-cli lrange mylist 0 -1
+1. thirdvalue
+2. secondvalue
+3. firstvalue
+$ ./redis-cli rpop mylist
+firstvalue
+$ ./redis-cli lrange mylist 0 -1
+1. thirdvalue
+2. secondvalue
+

Further reading