redis 常用功能命令.bat

@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;

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章