redis-server: command not found

-bash: redis-server: command not found
Reason: The
corresponding command is not configured, similar to the environment variable of the window, so the command cannot be found

Solution:
Configure the redis-server execution file path in the installation directory to the system execution command
ln -s /usr/local/redis/redis-4.0.9/src/redis-server /usr/bin/redis-server

Among them,
/usr/local/redis/redis-4.0.9/src/redis-server is the address of the redis-server service file in the installation directory

/usr/bin/redis-server is the key corresponding to the system executable command. When the redis-server command is executed under linux, the redis-server executable file in the corresponding installation directory will be automatically executed; (the file under usr/bin is (Apps used by system users)

Guess you like

Origin blog.csdn.net/nongminkouhao/article/details/108053996