HM-SPMS/installer/StartService.bat

51 lines
1.1 KiB
Batchfile
Raw Normal View History

@echo off
set "scriptPath=%~dp0"
echo 脚本所在目录:%scriptPath%
::获取操作平台以及版本
if defined RQEH6000_OS (
set OS_DEFINE=%RQEH6000_OS%
)
if defined ISCS6000_OS (
set OS_DEFINE=%ISCS6000_OS%
)
if exist "%scriptPath%\..\product\%OS_DEFINE%_debug\" (
set SETUP_DEBUG_RELEASE=debug
) else (
set SETUP_DEBUG_RELEASE=release
)
echo SETUP_DEBUG_RELEASE=%SETUP_DEBUG_RELEASE%
echo OS_DEFINE=%OS_DEFINE%
::注册
cd /d "%scriptPath%"
call registry_software.bat
::启动influxdb
cd /d "%scriptPath%"
cd "..\database\InfluxDB"
call InstallService.bat
2025-03-25 10:41:31 +08:00
.\influx.exe -host localhost -port 8086 -database spms_db -execute "create user spms_db with password 'spms@123456' with all privileges"
::启动MySQL
cd /d "%scriptPath%"
cd "..\database\mysql"
call Install.bat
::启动Nginx
cd /d "%scriptPath%"
cd "..\nginx"
call install_nginx.bat
::数据库升级
cd /d "%scriptPath%"
cd "..\product\%OS_DEFINE%_%SETUP_DEBUG_RELEASE%"
start db_installer.exe
cd /d "%scriptPath%"
cd "..\platform\%OS_DEFINE%_%SETUP_DEBUG_RELEASE%"
.\net_keepalived.exe -r
net start net_keepalived
pause