【基本环境】快速启动、minio问题
This commit is contained in:
parent
64c5f6bf3d
commit
efc17b4f84
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -6,18 +6,15 @@ set MINIO_EXE=minio.exe
|
||||
set DATA_DIR=./data
|
||||
set CONSOLE_PORT=9001
|
||||
|
||||
:: 检查minio.exe是否存在
|
||||
if not exist "%MINIO_EXE%" (
|
||||
echo Error: %MINIO_EXE% 不存在!
|
||||
echo [Error] %MINIO_EXE% is not exist!
|
||||
pause
|
||||
exit /b 1
|
||||
)
|
||||
|
||||
:: 设置MinIO凭据
|
||||
set MINIO_ROOT_USER=minio_FEaTQx
|
||||
set MINIO_ROOT_PASSWORD=minio_34KYwR
|
||||
|
||||
:: 检查数据目录是否存在,不存在则创建
|
||||
if not exist "%DATA_DIR%" (
|
||||
mkdir "%DATA_DIR%"
|
||||
)
|
||||
@ -25,11 +22,14 @@ if not exist "%DATA_DIR%" (
|
||||
|
||||
if exist "%MINIO_EXE%" (
|
||||
echo Starting MinIO server...
|
||||
start "Scenario Server" cmd /k "%MINIO_EXE% server ^"%DATA_DIR%^" --console-address ^":%CONSOLE_PORT%^""
|
||||
start "Scenario Server" /B cmd /c "%MINIO_EXE% server ^"%DATA_DIR%^" --console-address ^":%CONSOLE_PORT%^""
|
||||
)
|
||||
|
||||
echo MinIO:
|
||||
echo - MinIO API (Port: 9000)
|
||||
echo.
|
||||
echo ========================================
|
||||
echo MinIO Services Status
|
||||
echo ========================================
|
||||
echo - MinIO Web (Port: 9001)
|
||||
|
||||
pause
|
||||
echo - MinIO API (Port: 9000)
|
||||
echo ========================================
|
||||
echo.
|
||||
|
42
base/Resources/quick.bat
Normal file
42
base/Resources/quick.bat
Normal file
@ -0,0 +1,42 @@
|
||||
@echo off
|
||||
setlocal enabledelayedexpansion
|
||||
chcp 65001 >nul
|
||||
title Quick Start
|
||||
|
||||
set "SCRIPT_DIR=%~dp0"
|
||||
cd /d "%SCRIPT_DIR%"
|
||||
|
||||
if exist "%SCRIPT_DIR%\io\minio-server.bat" (
|
||||
echo.
|
||||
echo [INFO] Starting MinIO...
|
||||
cd "%SCRIPT_DIR%\io\"
|
||||
start "MinIO Startup" /B cmd /c "minio-server.bat"
|
||||
if errorlevel 1 (
|
||||
echo [ERROR] MinIO start Failed.
|
||||
pause && exit /b 1
|
||||
)
|
||||
)
|
||||
|
||||
if exist "%SCRIPT_DIR%\redis\redis-server.exe" (
|
||||
echo.
|
||||
echo [INFO] Starting Redis...
|
||||
cd "%SCRIPT_DIR%\redis"
|
||||
start "Redis Startup" /B cmd /c "redis-server.exe redis.conf"
|
||||
if errorlevel 1 (
|
||||
echo [ERROR] Redis start Failed.
|
||||
pause && exit /b 1
|
||||
)
|
||||
)
|
||||
|
||||
if exist "%SCRIPT_DIR%\rocketmq\sbin\rocketmq.bat" (
|
||||
echo.
|
||||
echo [INFO] Starting RocketMQ...
|
||||
cd "%SCRIPT_DIR%\rocketmq\sbin\"
|
||||
start "RocketMQ Startup" /B cmd /c "rocketmq.bat"
|
||||
if errorlevel 1 (
|
||||
echo [ERROR] RocketMQ start Failed.
|
||||
pause && exit /b 1
|
||||
)
|
||||
)
|
||||
|
||||
pause && exit /b 0
|
@ -1,7 +1,7 @@
|
||||
;iss
|
||||
|
||||
#define MyAppName "基础环境"
|
||||
#define MyAppVersion "1.0.2"
|
||||
#define MyAppVersion "1.0.5"
|
||||
#define MyAppPublisher "X"
|
||||
#define MyAppURL "~"
|
||||
#define MyAppExeName "command"
|
||||
@ -13,6 +13,7 @@
|
||||
#define MyAppFirstPath "XManage"
|
||||
#define MyAppResources "Resources"
|
||||
#define InstallPassword GetDateTimeString('yyyymmdd', '', '')
|
||||
#define BuildTime GetDateTimeString('yyyymmddhhnnss', '', '')
|
||||
|
||||
|
||||
; 默认配置
|
||||
@ -31,7 +32,7 @@ UninstallFilesDir={app}
|
||||
UninstallDisplayIcon={app}\{#MyAppExeName}.exe
|
||||
VersionInfoCompany=
|
||||
VersionInfoCopyright=CopyRight © 2025
|
||||
VersionInfoDescription=装配DB、IO、MQ、Command等
|
||||
VersionInfoDescription=构建于 {#BuildTime},装配DB、IO、MQ、Command等
|
||||
VersionInfoProductVersion={#MyAppVersion}
|
||||
VersionInfoProductName=基础环境(支持Windows7及以上)
|
||||
|
||||
@ -66,13 +67,13 @@ Name: "Chinese"; MessagesFile: "compiler:Languages\Chinese.isl";
|
||||
; 是否创建桌面图标
|
||||
; checkablealone 默认选中
|
||||
; unchecked 默认不选中
|
||||
;Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked
|
||||
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: checkablealone
|
||||
|
||||
|
||||
;; 程序 ICO
|
||||
[Icons]
|
||||
;Name: "{autoprograms}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}.exe"
|
||||
;Name: "{autodesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}.exe"; Tasks: desktopicon
|
||||
Name: "{autodesktop}\Quick Start Environment"; Filename: "{app}\quick.bat"; Tasks: desktopicon
|
||||
|
||||
|
||||
;; 组件安装方式
|
||||
@ -105,6 +106,7 @@ Name: "MySQL"; Description: "MySQL"; Types: full; Flags: checkablealone;
|
||||
;Source: "{#MyAppResources}\Readme.md"; DestDir: "{app}"; Flags: isreadme;
|
||||
;; 文件
|
||||
Source: "{#MyAppResources}\grep.exe"; DestDir: "{app}\usr"; DestName: "grep.exe"; Flags: ignoreversion; Components: MainApp;
|
||||
Source: "{#MyAppResources}\quick.bat"; DestDir: "{app}"; DestName: "quick.bat"; Flags: ignoreversion; Components: MainApp;
|
||||
;; 文件夹
|
||||
; recursesubdirs createallsubdirs 递归复制整个目录
|
||||
Source: "{#MyAppResources}\usr\*"; DestDir: "{app}\usr\"; Flags: ignoreversion recursesubdirs createallsubdirs; Components: MainApp;
|
||||
@ -148,9 +150,12 @@ Root: HKA; Subkey: "Software\Classes\{#MyAppAssocKey}\DefaultIcon"; ValueType: s
|
||||
Root: HKA; Subkey: "Software\Classes\{#MyAppAssocKey}\shell\open\command"; ValueType: string; ValueName: ""; ValueData: """{app}\{#MyAppExeName}.exe"" ""%1"""; Flags: uninsdeletevalue;
|
||||
|
||||
|
||||
;; 安装路径
|
||||
|
||||
;; 【grep、awk、sed、head、sort、ls、rm、xargs、rar、zip、tar、md5sum、sha1sum...】
|
||||
Root: HKLM; Subkey: "SYSTEM\CurrentControlSet\Control\Session Manager\Environment"; ValueType: string; Components: MainApp; Flags: uninsdeletevalue; \
|
||||
ValueName: "X_COMMAND"; ValueData: "{app}";
|
||||
Root: HKLM; Subkey: "SYSTEM\CurrentControlSet\Control\Session Manager\Environment"; ValueType: expandsz; Components: MainApp; Flags: preservestringtype; AfterInstall: RefreshEnvironment; \
|
||||
ValueName: "Path"; ValueData: "{olddata};%X_COMMAND%\usr"; Check: NeedsAddPath('%X_COMMAND%\usr');
|
||||
|
||||
|
||||
|
||||
@ -162,11 +167,6 @@ Root: HKLM; Subkey: "SYSTEM\CurrentControlSet\Control\Session Manager\Environmen
|
||||
Root: HKLM; Subkey: "SYSTEM\CurrentControlSet\Control\Session Manager\Environment"; ValueType: expandsz; Components: JDK; Flags: preservestringtype; AfterInstall: RefreshEnvironment; \
|
||||
ValueName: "Path"; ValueData: "{olddata};%JAVA_HOME%\bin"; Check: NeedsAddPath('%JAVA_HOME%\bin');
|
||||
|
||||
|
||||
;; 【grep、awk、sed、head、sort、ls、rm、xargs、rar、zip、tar、md5sum、sha1sum...】
|
||||
Root: HKLM; Subkey: "SYSTEM\CurrentControlSet\Control\Session Manager\Environment"; ValueType: expandsz; Components: MainApp; Flags: preservestringtype; AfterInstall: RefreshEnvironment; \
|
||||
ValueName: "Path"; ValueData: "{olddata};%X_COMMAND%\usr"; Check: NeedsAddPath('%X_COMMAND%\usr');
|
||||
|
||||
|
||||
|
||||
;; 【Redis】追加到 PATH 变量
|
||||
@ -187,6 +187,16 @@ Root: HKLM; Subkey: "SYSTEM\CurrentControlSet\Control\Session Manager\Environmen
|
||||
|
||||
|
||||
|
||||
;; 【RocketMQ】追加到 PATH 变量
|
||||
Root: HKLM; Subkey: "SYSTEM\CurrentControlSet\Control\Session Manager\Environment"; ValueType: string; Components: RocketMQ; Flags: uninsdeletevalue; \
|
||||
ValueName: "ROCKETMQ_HOME"; ValueData: "{app}\rocketmq"; Check: CheckRegistryPath('{app}\rocketmq');
|
||||
Root: HKLM; Subkey: "SYSTEM\CurrentControlSet\Control\Session Manager\Environment"; ValueType: string; Components: RocketMQ; Flags: uninsdeletevalue; \
|
||||
ValueName: "ROCKETMQ_SBIN"; ValueData: "{app}\rocketmq\sbin";
|
||||
Root: HKLM; Subkey: "SYSTEM\CurrentControlSet\Control\Session Manager\Environment"; ValueType: expandsz; Components: RocketMQ; Flags: preservestringtype; AfterInstall: RefreshEnvironment; \
|
||||
ValueName: "Path"; ValueData: "{olddata};%ROCKETMQ_SBIN%"; Check: NeedsAddPath('%ROCKETMQ_SBIN%');
|
||||
|
||||
|
||||
|
||||
;; 【MySQL】环境变量【注册服务使用】
|
||||
; 数据库服务注册后服务名
|
||||
;Root: HKLM; Subkey: "SYSTEM\CurrentControlSet\Control\Session Manager\Environment"; ValueType: string; Components: MySQL; Flags: uninsdeletevalue; AfterInstall: RefreshEnvironment; \
|
||||
@ -205,17 +215,7 @@ Root: HKLM; Subkey: "SYSTEM\CurrentControlSet\Control\Session Manager\Environmen
|
||||
ValueName: "Path"; ValueData: "{olddata};%X_COMMAND_MYSQL%\bin"; Check: NeedsAddPath('%X_COMMAND_MYSQL%\bin');
|
||||
|
||||
|
||||
|
||||
;; 【RocketMQ】追加到 PATH 变量
|
||||
Root: HKLM; Subkey: "SYSTEM\CurrentControlSet\Control\Session Manager\Environment"; ValueType: string; Components: RocketMQ; Flags: uninsdeletevalue; \
|
||||
ValueName: "ROCKETMQ_HOME"; ValueData: "{app}\rocketmq"; Check: CheckRegistryPath('{app}\rocketmq');
|
||||
Root: HKLM; Subkey: "SYSTEM\CurrentControlSet\Control\Session Manager\Environment"; ValueType: string; Components: RocketMQ; Flags: uninsdeletevalue; \
|
||||
ValueName: "ROCKETMQ_SBIN"; ValueData: "{app}\rocketmq\sbin";
|
||||
Root: HKLM; Subkey: "SYSTEM\CurrentControlSet\Control\Session Manager\Environment"; ValueType: expandsz; Components: RocketMQ; Flags: preservestringtype; AfterInstall: RefreshEnvironment; \
|
||||
ValueName: "Path"; ValueData: "{olddata};%ROCKETMQ_SBIN%"; Check: NeedsAddPath('%ROCKETMQ_SBIN%');
|
||||
|
||||
|
||||
|
||||
|
||||
;; 自定义函数
|
||||
[Code]
|
||||
|
||||
@ -235,6 +235,14 @@ begin
|
||||
end;
|
||||
|
||||
|
||||
// 获取当前时间
|
||||
function GetDateTime(): String;
|
||||
begin
|
||||
// Result := GetDateTimeString('yyyy/mm/dd hh:nn:ss', '-', ':');
|
||||
Result := GetDateTimeString('yyyymmddhhnnss', '', '');
|
||||
end;
|
||||
|
||||
|
||||
function SendMessageTimeout(
|
||||
hWnd: Integer;
|
||||
Msg: Integer;
|
||||
@ -435,15 +443,21 @@ begin
|
||||
// 仅在安装完成后执行
|
||||
if CurStep = ssPostInstall then
|
||||
begin
|
||||
// 创建配置文件
|
||||
CreateConfigFromTemplate;
|
||||
|
||||
// 删除模版文件
|
||||
if FileExists(ExpandConstant('{app}\mysql\template.ini')) then
|
||||
DeleteFile(ExpandConstant('{app}\mysql\template.ini'));
|
||||
|
||||
if FileExists(ExpandConstant('{app}\mysql\template-initialize-and-start-mysql.bat')) then
|
||||
DelTree(ExpandConstant('{app}\mysql\template-initialize-and-start-mysql.bat'), False, True, False);
|
||||
|
||||
if FileExists(ExpandConstant('{app}\mysql\template-register-mysql-with-data.bat')) then
|
||||
DelTree(ExpandConstant('{app}\mysql\template-register-mysql-with-data.bat'), False, True, False);
|
||||
|
||||
if FileExists(ExpandConstant('{app}\mysql\import-data-into-mysql-v2.bat')) then
|
||||
DelTree(ExpandConstant('{app}\mysql\import-data-into-mysql-v2.bat'), False, True, False);
|
||||
end;
|
||||
end;
|
||||
|
||||
@ -471,3 +485,4 @@ Filename: "sc"; Parameters: "delete x_database"; Flags: runascurrentuser runhidd
|
||||
Type: files; Name: "{app}\mysql\my.ini"
|
||||
Type: files; Name: "{app}\mysql\*.bat"
|
||||
Type: filesandordirs; Name: "{app}\mysql\data"
|
||||
Type: filesandordirs; Name: "{app}\io\data"
|
||||
|
@ -13,6 +13,7 @@
|
||||
#define MyAppFirstPath "XManage"
|
||||
#define MyAppResources "Resources"
|
||||
#define InstallPassword GetDateTimeString('yyyymmdd', '', '')
|
||||
#define BuildTime GetDateTimeString('yyyymmddhhnnss', '', '')
|
||||
|
||||
|
||||
; 默认配置
|
||||
@ -31,7 +32,7 @@ UninstallFilesDir={app}
|
||||
UninstallDisplayIcon={app}\{#MyAppExeName}.exe
|
||||
VersionInfoCompany=
|
||||
VersionInfoCopyright=CopyRight © 2025
|
||||
VersionInfoDescription=基本命令扩充(sed、awk、grep等)
|
||||
VersionInfoDescription=构建于 {#BuildTime},基本命令扩充(sed、awk、grep等)
|
||||
VersionInfoProductVersion={#MyAppVersion}
|
||||
VersionInfoProductName=基础环境(支持Windows7及以上)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user