win10 实现多个环境nacos和nginx 切换
背景 有个两套 nacos 和nginx 配置需要交替运行 实现bat 脚本切换
@echo off
rem ===================31 nacos conf============================
rmdir d:\home
mklink /d d:\home d:\home_31
echo " =================== 31 nacos conf============================"
rem ===================31 nginx conf============================
rmdir d:\openresty-1.19.9.1-win64\conf\nginx.conf.d
mklink /d d:\openresty-1.19.9.1-win64\conf\nginx.conf.d d:\openresty-1.19.9.1-win64\conf\nginx.conf.d_31
echo " =================== 31 nginx conf============================"
rem =================== 31 start nginx ============================
d:
taskkill /f /im nginx.exe >nul 2>nul
cd d:\openresty-1.19.9.1-win64
nginx.exe
cmd
echo " =================== 31 nginx start ============================"
@echo end
@pause
本文来自博客园,作者:vx_guanchaoguo0,转载请注明原文链接:https://www.cnblogs.com/guanchaoguo/p/16419691.html