Install Redis on the pagoda panel in the Linux environment and test whether the installation is successful

Install Redis on the pagoda panel in the Linux environment and test whether the installation is successful

Install Redis on Pagoda Panel in Linux Environment

Install Redis service

  • Click Software Store -> Operating Environment on the Pagoda Linux panel, search for "redis" in the application search, and quickly locate and install the latest version of redis.
image-20210601224017357

Configure Redis settings

The path for installing Redis on the Emm pagoda panel is mostly /www/server/redis, you can modify the Redis settings in the redis.conf file under this path! !

You can also modify the Redis settings directly in the pagoda panel! !

image-20210601233854169

Configure bind to 0.0.0.0 in the configuration file for monitoring

tips : If it is bound to 0.0.0.0, then all addresses on the machine can access the redis service; if it is bound to a specific ip, then only the specific ip can access the redis service.

image-20210601233104435

Password requirepass in the configuration file (footbared by default), change to the password you want to set

The value of daemonize in the configuration file is set to yes, daemonize is used to specify whether redis should be started in the form of a daemon thread. By default, redis does not run in the background. If you need to run in the background, change the value of this item to yes.

image-20210601235555974

The port corresponding to redis is released

image-20210601232026300
  • The Alibaba Cloud server security group must also release a unified port
image-20210601232157127

Install Php extension

image-20210601231806721

After the above is no problem, restart Redis and the corresponding PHP.

Test whether the installation was successful

You can start and stop the Redis service on the pagoda panel

image-20210602000934023

You can also use the command line in the background

  1. Determine whether the redis service is started
ps -ef|grep redis

Successful startup:

image-20210602001109200

Did not start:

image-20210602001218295

redis start

Enter the src directory under the redis installation path and execute the following command:

./redis-server &
image-20210602001514132

Connect to redis server remotely

./redis-cli -h redis服务器IP -p 6379 (默认端口)

tips : If you only connect locally,

redis-cli

Test connectivity

image-20210602002455407

redis off

The first

redis-cli -a 密码 shutdown
image-20210602004756057

The second

image-20210602003456453