Download and decompress wgethttp: // Unzip download and decompress
Wget http://redis.googlecode.com/files/redis-2.6.16.tar.gz
Tar zxvf redis-2.6.16.tar.gz
Music redis-2.6.16 redis
Installation process/bin/sh: cc: command not found error
Run the make command in the redis directory.
An error occurred while executing make:/bin/sh: cc: command not found.
Google solution: execute the following two commands:
1. sudo yum-y install gcc-c ++ libstdc ++-devel
2. make MALLOC = libc
Handle 'hint: To run 'Make test' is a good idea 'errors
Now there is no/bin/sh: cc: command not found error, but there is another 'hint: To run 'Make test' is a good idea 'error.
Make test: You need tcl 8.5 or newer in order to run the Redis test
Solution: install tcl
: Http://downloads.sourceforge.net/tcl/tcl8.5.10-src.tar.gz
[User @ localhost desktop] $ ls tcl8.5.9-src.tar.gztcl8.5.9-src.tar.gz [user @ localhost desktop] $ su password: [root @ localhost desktop] # cp tcl8.5.9-src.tar.gz/usr/local/src/[root @ localhost desktop] # cd/usr/local/src/[root @ localhost src] # tar- zxvf tcl8.5.9-src.tar.gz [root @ localhost src] # cd tcl8.5.9/[root @ localhost tcl8.5.9] # cd unix/[root @ localhost unix] #. /configure -- prefix =/usr/local/tcl/-- enable-shared [root @ localhost unix] # make [root @ localhost unix] # make install [root @ localhost unix] #/usr/local/tcl/bin/tclsh8.5% exit [root @ localhost unix] #
Execute the make command or prompt an error. tcl8.5 or an updated version is required. you can find sudo yum install tcl, but the version is 8.5.7. Then execute the make test command and finally prompt '\ o/All tests passed without errors! '
Modify configuration modify the redis. conf file under the redis Directory
Find requirepass, set the password to daemonize, and set it to yes. In this way, it can be run in the background.
Modify the configuration file directory
mkdir /etc/rediscp redis.conf /etc/redis
Run and start redis
Run the following command in the redis Directory :. /redis-server/etc/redis. conf check whether the process has Redis: ps aux | grep redis. you can see that there is a process named "src/redis-server" in the process list.
Enter the client
Run the following command in the redis Directory :. /redis-cli enter the client and enter auth your password redis 127.0.0.1: 6379> auth myRedis OK and then you can perform related operations redis 127.0.0.1: 6379> config get requirepass 1) "requirepass" 2) "myRedis"