redis simple installation

installation

Unzip files redis

[root@localhost ~]# tar xzf redis-5.0.5.tar.gz 

Install gcc Editor

[root@localhost ~]# yum install gcc-c++

After the files are decompressed file

[root@localhost ~]# cd redis-5.0.5

installation

[root@localhost redis-5.0.5]# make

Modify the configuration file

The daemonize set to yes
will guard mode, running in the background, so it will not clog up the thread

[root@localhost redis-5.0.5]# pwd
/root/redis-5.0.5
[root@localhost redis-5.0.5]# vim redis.conf 
daemonize yes

Set password redis

requirepass s.S123456

Specify the configuration file to start redis

[root@localhost src]# ./redis-server ../redis.conf 

Login redis

[root@localhost src]# ./redis-cli -a s.S123456

Test redis

127.0.0.1:6379> set foo bar
OK
127.0.0.1:6379> get foo
"bar"

Close redis service

[root@localhost src]# ./redis-cli -a s.S123456 shutdown

See if the service is still running

[root@localhost src]# ps aux | grep redis

Guess you like

Origin www.cnblogs.com/inmeditation/p/12233431.html