1. Check the installation dependent program
install gcc-c++yum install -y tclyum install wget
2. Get the installation files
wget http://download.redis.io/releases/redis-2.8.13.tar.gz
3. Unzip the file
tar -xzvf redis-2.8.19.tar.gzmv redis-2.8.19 /usr/local/redis
4. Enter the catalogue
cd /usr/local/redis
5. Compile and install
install
6. Set configuration file path
mkdir -p /etc/rediscp redis.conf/etc/redis
7. Modify the configuration file
vi /etc/redis/redis.conf仅修改: daemonize yes (no-->yes)
8. Start
/usr/local/bin/redis-server /etc/redis/redis.conf
9. View Startup
ps -ef | grep redis
10. Using the Client
redis-cli>set name davidOK>get name"david"
11. Close the Client
shutdown
12. Boot Start configuration
"/usr/local/bin/redis-server /etc/redis/redis.conf &" >> /etc/rc.local
Boot boot to be configured in rc.local
, and /etc/profile
file, to have the user logged in, will be executed.
CENTOS6 Installing Redis