[root@localhost ~]# uname -a
Linux localhost.localdomain 3.10.0-862.el7.x86_64 #1 SMP Fri Apr 20 16:44:24 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
[root@localhost ~]# cat /etc/redhat-release
CentOS Linux release 7.5.1804 (Core)
redis:
[root@localhost ~]#yum -y install gcc
[root@localhost ~]#tar redis.tar.gz
[root@localhost ~]#cd redis
[root@localhost ~]#make
[root@localhost ~]#make install
[root@localhost ~]#mkdir bin
[root@localhost ~]#cp src/redis-server bin/
[root@localhost ~]#cp src/redis-cli bin/
[root@localhost ~]#vim redis.conf
#bind 127.0.0.0 允许部分ip访问
[root@localhost ~]# daemonize yes
[root@localhost ~]# requirepass 123456
启动
[root@localhost ~]# /usr/local/software/redis/bin/./redis-server redis.conf
结束
[root@localhost ~]# kill -9 id