Yum install Redis Run the following command: 1 Start redis service redis start 2 Stop redis service redis stop 3 Check the redis running status service redis status 4 Check the redis process ps -ef | grep redis 3. Set Redis to start automatically upon startup

chkconfig redis on

  1. Go to native Redis

redis-cli

5. Change the default port and password of redis

vi /etc/redis.conf

To change the default port, search for port 6379 and change it to the corresponding port (search command: /6379 if you find more than one port, press N to search for the next one)

Change the default password, look for RequirePass Foobared change foobared to your password and remove the #

After the modification, restart Redis

The command is service redis restart

Connecting clients

Redis -cli -h 127.0.0.1 -p 6379

After the connection, for example, set a password

Enter the auth password