1/ Download the installation package
Wget http://download.redis.io/releases/redis-2.8.17.tar.gz of course can choose other versions of theCopy the code
2 / uncompress
The tar - ZXVF redis - 2.8.17. Tar. GzCopy the code
3 / compile
CD redis - 2.8.17 makeCopy the code
4/ After compiling, two programs are generated in the SRC directory under the redis-2.8.17 directory
Redis server: redis-server # Redis database service service: redis-cli # Client interfaceCopy the code
5/ Start redis service
Note that this is the way to start the Redis service, using the default configuration. You can also use the startup parameter to tell Redis to start with the following command using the specified configuration file. ./redis-server .. Redis. conf is a default configuration file, which we can modify as needed, or use our own configuration file for startup. The default port number is 6379Copy the code
6/ Interact with the database through the client
After starting the Redis service process, you can use the test client program redis- CLI to interact with the Redis service. You must, of course, use a language that Redis recognizes. $CD src. /redis-cli # redis> set foo bar OK redis> get foo "bar"Copy the code