Install redis 3.0.3 in centos6.6
1. Download redis-3.0.3;
2. tar-zxvf redis-3.0.3.tar.gz
3. make
An error may be reported here. tclsh8.5: not found that tcl was missing.
Solution: download and install tcl
# Wget http://downloads.sourceforge.net/tcl/tcl8.5.9-src.tar.gz
# Cd/tcl8.5.9-src/unix
#./Configure
# Make
# Make install
Then make and make test will not report an error.
Go to the src directory under the redis directory.
The functions of these files in the src directory are as follows:
Redis-server: daemon Startup Program of the Redis server
Redis-cli: Redis command line tool. You can also use telnet to operate based on its plain text protocol.
Redis-benchmark: Redis performance testing tool to test the read/write performance of Redis in your system and your configuration.
Redis-stat: Redis status detection tool that can detect Redis's current status parameters and latency
Create the Redis directory and transfer the compiled program
Mkdir-p/usr/local/redis/bin
Mkdir-p/usr/local/redis/etc
Mkdir-p/usr/local/redis/var
Cp redis-benchmark redis-check-aof redis-cli redis-server redis-check-dump/usr/local/redis/bin/
Cp ../redis. conf/usr/local/redis/etc/
4. to modify the configuration file, change "daemonize no" to "daemonize yes.
5. Start redis
#/Usr/local/redis/bin/redis-server/usr/local/redis/etc/redis. conf
6. Check whether the instance is started. netstat-antp | grep redis
7. Test/usr/local/redis/bin/redis-cli
Redis> set name grhlove123
OK
Redis> get name
"Grhlove123"
8. Successful
Ps:
Enable the redis port and modify the firewall configuration file
Vi/etc/sysconfig/iptables
Add port configuration
-A RH-Firewall-1-INPUT-m state -- state NEW-m tcp-p tcp -- dport 6379-j ACCEPT
Reload rules
Service iptables restart