The specific method is as follows:
(Learning video sharing:redis video tutorial)
1. Add redis service
Note: When downloading the installation-free version of redis, you must have a conf file.
Enter the redis folder, open the command window, and execute the following command
redis-server --service-install redis.windows.conf --service- name redis6379 --loglevel verbose
Open the service to view
Also note that if you use powershell to open and execute the above statement, it will The error "The "redis-server" item cannot be recognized as the name of a cmdlet, function, script file, or executable program..." is reported. This is due to compatibility issues with PowerShell. Complete everything in front of the redis-server executable file. The path is enough
2. Delete the redis service
I tried the following method but it didn’t work at all. The redis service is still there.
redis-server --service-uninstall
I changed it to the following sc command Deleting the service will take effect
sc delete redis6379
Related recommendations:redis database tutorial
The above is the detailed content of How to add and delete redis service in windows system. For more information, please follow other related articles on the PHP Chinese website!