Under linux (centos6) mounted Redis

1.wget http://download.redis.io/releases/redis-4.0.8.tar.gz, the download is complete extract the tar -zxvf redis-4.0.8.tar.gz

2. Go to the extracted directory cd /redis-4.0.8, installation make install PREFIX = / usr / local / redis

3. Copy redis.conf to / usr / local / redis / bin

4. Start redis (/ usr / local / redis / bin directory) ./redis-server redis.conf

5. Modify Profile vi redis.conf

daemonize set to yes; bind 127.0.0.1 into bind native ip; protected-mode is set to no; requirepass open connection password ---

Also note that the open 6379 port, vi / etc / sysconfig / iptables

添加  -A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 6379 -j ACCEPT

Restart file service iptables restart

redis kill off the process, restart redis ./redis-server redis.conf

By client connections

./redis-cli -h ip -p 6379 -a password; appears OK for success!

Reference article: https://blog.csdn.net/qq_35992900/article/details/82950157

Several small command:

1. Find content redis.conf -------: / what to look for

2. Check the contents of certain specific sed -n lines '1,10p' redis.conf check the content of one to ten lines

Guess you like

Origin blog.csdn.net/YYpawn/article/details/86519375