Minimalist online installation Redis


Download, unzip and compile Redis:

$ wget
$ tar xzf redis-4.0.11.tar.gz
$ cd redis-4.0.11
$ make

If you want to download the gcc compiler during this period, follow the prompts to download the corresponding software.

The now compiled binary (redis related commands) is located in the src directory. Run Redis:

$ src/redis-server

, you will find that the startup is successful, but did not exit the current operation, you need to press ctrl+c to exit, but after ctrl+c, check the redis process (ps -ef|grep redis) and just started The redis process has also been turned off. This is because Redis is the default foreground startup. You need to modify the redis.conf parameters so that redis is started in the background. Reids.conf in the upper directory of src, use the command ../src to open redis.conf, use the command vi redis.conf, set daemonize to yes, press esc to exit the modification state, then: wq save.

Then restart, you need to specify the modified file

[[email protected] src]# ./redis-server redis-conf
32442:C 17 Sep 10:05:18.601 # Fatal error, can't open config file 'redis-conf'

to find the error, this problem only needs to put the redis-conf file into the src directory, and then restart, you can use

The built-in client interacts with Redis:

[[email protected] src]# ./redis-cli> set cb nb
OK> get cb