概述
安装路径固定 D:Program
文件地址 https://share.weiyun.com/S3Vy57yO
1、nginx.bat
@echo off
rem zheng-tools
rem author: shuzheng http://www.zhangshuzheng.cn
rem GitHub: https://github.com/shuzheng
rem OsChina: http://git.oschina.net/shuzheng/zheng
echo ==================begin========================
cls
SET NGINX_PATH=D:
SET NGINX_DIR=D:Programnginx-1.12.2
color 0a
TITLE zheng-tools Power By shuzheng (http://www.zhangshuzheng.cn)
CLS
ECHO.
ECHO. ********************************************************************
ECHO. * *
ECHO. * *
ECHO. * zheng-tools Power By shuzheng (http://www.zhangshuzheng.cn) *
ECHO. * *
ECHO. * *
ECHO. ********************************************************************
ECHO.
:MENU
ECHO.---------------------------- nginx 进程列表 --------------------------------
tasklist|findstr /i "nginx.exe"
if ERRORLEVEL 1 (echo nginx未启动) else (echo nginx已启动)
ECHO.----------------------------------------------------------------------------
ECHO.
ECHO. [1] 启动Nginx
ECHO. [2] 关闭Nginx
ECHO. [3] 重启Nginx
ECHO. [4] 退 出
ECHO.
ECHO.请输入选择项目的序号:
set /p ID=
IF "%id%"=="1" GOTO start
IF "%id%"=="2" GOTO stop
IF "%id%"=="3" GOTO restart
IF "%id%"=="4" EXIT
PAUSE
:start
call :startNginx
ECHO.============================================================================
ECHO.
ECHO.
GOTO MENU
:stop
call :shutdownNginx
ECHO.============================================================================
ECHO.
ECHO.
GOTO MENU
:restart
call :shutdownNginx
call :startNginx
ECHO.============================================================================
ECHO.
ECHO.
GOTO MENU
:shutdownNginx
ECHO.
ECHO.关闭Nginx......
taskkill /F /IM nginx.exe > nul
ECHO.OK,关闭所有nginx 进程
goto :eof
:startNginx
ECHO.
ECHO.启动Nginx......
IF NOT EXIST "%NGINX_DIR%nginx.exe" ECHO "%NGINX_DIR%nginx.exe"不存在
%NGINX_PATH%
cd "%NGINX_DIR%"
IF EXIST "%NGINX_DIR%nginx.exe" (
echo "start '' nginx.exe"
start "" nginx.exe
)
ECHO.OK
goto :eof
2、 redis.bat
@echo off
echo bigen
start cmd /k "cd/d D:ProgramRedis-x64-3.2.100&&echo start Redis &&redis-server.exe redis.windows.conf"
ping -n 5 127.0.0.1
3、zookeeper.bat
@echo off
echo bigen
start cmd /k "cd/d D:Programzookeeper-3.5.3-betabin&&D:Programzookeeper-3.5.3-betabinzkServer.cmd"
ping -n 5 127.0.0.1
最后
以上就是热心猎豹为你收集整理的win10本地 Nginx、redis、zookeeper脚本的全部内容,希望文章能够帮你解决win10本地 Nginx、redis、zookeeper脚本所遇到的程序开发问题。
如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复