@echo off
:start
set var1=
echo.
echo 【【【【【 redis 常用功能 】】】】】
echo.
echo 1.安装redis服务
echo 2.启动redis服务
echo 3.停止redis服务
echo 4.卸载redis服务
echo.
echo 5.启动redis进程
echo 6.查看redis进程
echo.
echo 7.连接redis
echo. ******************************************************************************
set /P type="请输入(1/2...),默认 1:"
if "%type%" == "" goto a
if "%type%" == "1" goto a
if "%type%" == "2" goto b
if "%type%" == "3" goto c
if "%type%" == "4" goto d
if "%type%" == "5" goto e
if "%type%" == "6" goto f
if "%type%" == "7" goto g
goto a
:a
redis-server--service-install redis.windows.conf
goto start
:b
redis-server --service-start
goto start
:c
redis-server --service-stop
goto start
:d
redis-server --service-uninstall
goto start
:e
redis-server redis.windows.conf
goto start
:f
netstat -ano | findstr "0.0.0.0:6379"
netstat -ano | findstr "127.0.0.1:6379"
goto start
:g
echo. 获取 redis 中所有的 key 可用使用 *:KEYS *
echo. 查看key的内容:get keyname
redis-cli.exe -h 127.0.0.1 -p 6379
goto start
exit;