1 , to install redis2.8.19 as an example
Download the installation package: Http://redis.io
Tar zxvf redis-2.8.19.tar.gz # unzip the CD redis-2.8.19 # into the unpacked folder Yum install GCC # may need to install GCCmake # compilation First
If compile error: Error:jemalloc/jemalloc.h:no such file or directory
Solution:
Make MALLOC=LIBC # compile cd src && make install # Enter the src folder and compile the installation file
2 , recursively create folders
Mkdir-p/usr/local/redis/-p/usr/local/redis/etc
3 , move files
Mv/usr/local/src/redis-2.8.19/redis.conf/usr/local/redis/etc # configuration file mv mkreleasehdr.sh Redis-benchmark redis-check-aof redis-check-dump redis-cli redis-sentinel redis-server/usr/local/redis/bin # Startup file
4 , to see if the profile has moved
Cd/usr/local/redis/bin#Enter this directoryll#See if the file is as follows Total2484-rwxrwxr-x. 1 root root 566 Dec 16 16:18mkreleasehdr.sh-rwxr-xr-x. 1 root root 4586363 Mar 01:54 redis-Benchmark-rwxr-xr-x. 1 root root 22233 Mar 01:54 redis-check-aof#Log Append Database-rwxr-xr-x. 1 root root 45443 Mar 01:54 redis-check-dump#Snapshot Mode Database-rwxr-xr-x. 1 root root 4679859 Mar 01:54 redis-cli#Client-rwxr-xr-x. 1 root root 6241796 Mar 01:54 redis-server#Start the service
5 , modify Configuration
vi/usr/local/redis/etc/redis.conf # change config file daemonize No to Yes # background boot
6 , run
redis-server/usr/local/redis/etc/redis.conf # start service command NETSTAT-TUNPL | grep 6379 # See if Port 6379 is occupied
7 , open firewall port
/sbin/iptables-i input-p TCP--dport 6379-j ACCEPT # open 6379 port /etc/rc.d/init.d/iptables save< c11/># save config /etc/rc.d/init.d/iptables restart # Restart service /etc/init.d/ Iptables status # to see if the port is open
--Solemn statement: This article is only for the author's personal notes, please do not reprint! ——
Original CentOS6.5 Installing the Redis database