执行无人值守安装的基本过程对于MySQL Enterprise Monitor Agent和MySQL Enterprise Service Manager安装程序是相同的,唯一的区别是每个安装程序支持的选项。有关MySQL企业服务管理器选项的信息,请参见第8.1.2节,“MySQL企业服务管理器选项”。有关MySQL Enterprise Monitor Agent选项的信息,请参见第8.1.3节,“MySQL Enterprise Monitor Agent Options”。
有两种安装方法:要么在命令行上指定选项,要么使用包含相关选项及其值的选项文件。
下面的例子展示了如何通过命令行安装MySQL Enterprise Monitor Agent:
$ > mysqlmonitoragent -版本-linux-x86- 64biti -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 unauthenticated——mysql-identity-source default . txt
对于使用选项文件进行无人值勤安装,请创建一个包含安装参数的文本文件。下面的示例使用一个名为options.server.txt
:
Debugtrace =/opt/mysql/enterprise/install.debugtrace.monitor.log mode=unattend installdir=/opt/mysql/enterprise/monitor tomcatport=8080 tomcatsslport=8443 adminpassword=myadminpassword dbport=3300 mysql-identity-source=host_plus_datadir .log说明
该文件标识日志文件的目录和文件名,设置模式
来无人值守
,并使用installdir
选项指定安装目录。
设置installdir
而且debugtrace
选项设置为适合您的地区和操作系统的值。
安装MySQL Enterprise Service Manager时,必须在选项文件中指定的唯一选项是模式
(如果没有在命令行中指定),installdir
,adminpassword
。
安装前仔细检查选项文件中的选项;无人值守安装期间的问题不会产生任何错误消息。
将监视器安装程序文件和选项文件放在同一个目录中。
下面的示例演示如何从命令行启动无人值守的安装。
在Windows的命令shell中:
C: \ > mysqlmonitor -版本-windows-installer.exe——optionfile options.server.txt
在Unix上,使用如下形式的命令行:
$ > mysqlmonitor -版本-installer.bin——optionfile options.server.txt
在Mac OS X上,找到installerbuilder.sh
在安装包目录中。例如:
美元/ mysqlmonitoragent - >版本-osx-installer.app/Contents/MacOS/installbuilder.sh——optionfile options.server.txt
在安装MySQL Enterprise Monitor Agent时,可以使用MySQL Enterprise Monitor Agent安装程序和相应的代理选项执行相同的基本过程。
作为MySQL Enterprise Monitor Agent安装的最小值,请指定模式
(如果没有在命令行中指定),mysqluser
,installdir
,mysqlpassword
,agentpassword
选项。创建一个包含这些值的文件,并将其与optionfile
无人值守代理安装选项。