51 lines
1.1 KiB
Batchfile
51 lines
1.1 KiB
Batchfile
|
|
@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
|
||
|
|
.\influx.exe -host localhost -port 8086 -database rqeh6000 -execute "create user rqeh6000 with password 'relyez@2019' 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
|