MySQL Enterprise Monitor Agent 和 MySQL Enterprise Service Manager 安装程序执行无人值守安装的基本过程是相同的,唯一的区别是每个安装程序支持的选项。有关 MySQL 企业服务管理器选项的信息,请参阅 第 8.1.2 节,“MySQL 企业服务管理器选项”。有关 MySQL Enterprise Monitor Agent 选项的信息,请参阅 第 8.1.3 节,“MySQL Enterprise Monitor Agent 选项”。
有两种安装方法:在命令行中指定选项,或使用包含相关选项及其值的选项文件。
以下示例显示了如何通过命令行安装 MySQL Enterprise Monitor Agent:
$> mysqlmonitoragent-version-linux-x86-64bit-installer.bin
--installdir /data0/mysql/agent
--mysqlhost 127.0.0.1 --mysqlport 3306
--mysqluser root --mysqlpassword foo --agent_autocreate
--limiteduser limited --limitedpassword foo --generaluser general --generalpassword foo
--checkmysqlhost yes --managerhost localhost --managerport 48080 --agentuser AGENTUSER
--agentpassword PASSWORD --mode unattended --mysql-identity-source default
对于使用选项文件的无人值守安装,创建一个包含安装参数的文本文件。以下示例使用名为的示例配置文件
options.server.txt
:
debugtrace=/opt/mysql/enterprise/install.debugtrace.monitor.log
mode=unattended
installdir=/opt/mysql/enterprise/monitor
tomcatport=8080
tomcatsslport=8443
adminpassword=myadminpassword
dbport=3300
mysql-identity-source=host_plus_datadir
此文件标识日志文件的目录和文件名,将 设置mode
为unattended
,并使用该installdir
选项指定安装目录。
将installdir
和
debugtrace
选项设置为适合您的语言环境和操作系统的值。
安装 MySQL Enterprise Service Manager 时必须在选项文件中指定的唯一选项是mode
(如果未在命令行指定)installdir
、和adminpassword
。
安装前仔细检查选项文件中的选项;无人值守安装期间出现的问题不会产生任何错误消息。
将监视器安装程序文件和选项文件放在同一目录中。
以下示例显示如何从命令行启动无人值守安装。
在命令外壳中的 Windows 上:
C:\> mysqlmonitor-version-windows-installer.exe --optionfile options.server.txt
在 Unix 上,使用以下形式的命令行:
$> mysqlmonitor-version-installer.bin --optionfile options.server.txt
在 macOS 上,installerbuilder.sh
在安装包目录中找到。例如:
$> ./mysqlmonitoragent-version-osx-installer.app/Contents/MacOS/installbuilder.sh
--optionfile options.server.txt
安装 MySQL Enterprise Monitor Agent 时,可以使用 MySQL Enterprise Monitor Agent 安装程序和相应的代理选项遵循相同的基本过程。
作为 MySQL Enterprise Monitor Agent 安装的最低要求,请指定
mode
(如果未在命令行中指定)
、、、
mysqluser
和选项
。创建一个包含这些值的文件,并将其与
无人值守代理程序安装选项一起使用。
installdir
mysqlpassword
agentpassword
optionfile