2025-08-14 17:59:23 +08:00
|
|
|
@echo on
|
2025-08-17 02:18:33 +08:00
|
|
|
chcp 65001 >nul
|
|
|
|
tital Install Redis Server
|
2025-08-14 17:59:23 +08:00
|
|
|
|
|
|
|
:: 检查是否以管理员身份运行
|
|
|
|
net session >nul 2>&1
|
|
|
|
if %errorLevel% neq 0 (
|
|
|
|
echo 请使用管理员身份运行此脚本!
|
|
|
|
pause
|
|
|
|
exit /b 1
|
|
|
|
)
|
|
|
|
|
|
|
|
cd /d %~dp0
|
|
|
|
sc create redis binPath= "\"%CD%\redis-server.exe\" --service-run \"%CD%\redis.conf\"" DisplayName= "Redis" start= auto depend= TCPIP
|
|
|
|
sc description redis "Redis Cache Service"
|
|
|
|
net start redis
|
|
|
|
pause
|
|
|
|
|