Chapter 8 Unattended Installation Reference

Table of Contents

8.1 Unattended Installation
8.1.1 Performing an Unattended Installation
8.1.2 MySQL Enterprise Service Manager Options
8.1.3 MySQL Enterprise Monitor Agent Options

8.1 Unattended Installation

This section explains how to automate the install and upgrade procedures for the MySQL Enterprise Service Manager and MySQL Enterprise Monitor Agent components, to perform those operations across one or multiple machines without any user interaction.

To perform an unattended installation, specify the installation mode as unattended by using the mode command line option. In this mode, you specify all the installation parameters, such as the installation directory, and user, password, and network options, through command-line options. For convenient scripting, you can save these options in a text file and run the installer using the optionfile option.

Before performing an unattended installation, familiarize yourself with the options by doing at least one interactive MySQL Enterprise Monitor install. Read the regular installation instructions, since some tasks still remain after an unattended installation: you must configure the MySQL Enterprise settings, and start up all the services/daemons.

8.1.1 Performing an Unattended Installation

The basic process for performing an unattended installation is the same for both the MySQL Enterprise Monitor Agent and MySQL Enterprise Service Manager installers, with the only difference being the options supported by each installer. For information on the options for MySQL Enterprise Service Manager, see Section 8.1.2, “MySQL Enterprise Service Manager Options”. For information on the options for MySQL Enterprise Monitor Agent, see Section 8.1.3, “MySQL Enterprise Monitor Agent Options”.

There are two methods for installation: either specify the option on the command line, or use an options file containing the relevant options and their values.

For example, using the command-line method, you could install the MySQL Enterprise Monitor Agent using:

shell> 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

For unattended installation using an option file, create a text file that contains the definition for the installation. The following example uses a sample configuration file named 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

This file identifies a directory and file name for a log file, sets the mode to unattended, and uses the installdir option to specify an installation directory.

Note

Set the installdir and debugtrace options to values appropriate to your locale and operating system.

The only options that must be specified in an option file when installing the MySQL Enterprise Service Manager are mode (if not specified at the command line), installdir, and adminpassword.

Check the options in your option file closely before installation; problems during unattended installation do not produce any error messages.

Put the monitor installer file and the options file in the same directory.

The following examples show how to start the unattended installation from the command line.

On Windows within a command shell:

C:\> mysqlmonitor-version-windows-installer.exe --optionfile options.server.txt

On Unix, use a command-line of the form:

shell> mysqlmonitor-version-installer.bin --optionfile options.server.txt

On Mac OS X, locate the installerbuilder.sh within the installation package directory. For example:

shell> ./mysqlmonitoragent-version-osx-installer.app/Contents/MacOS/installbuilder.sh --optionfile options.server.txt

When installing MySQL Enterprise Monitor Agent, the same basic process can be followed using the MySQL Enterprise Monitor Agent installer and the corresponding agent options.

As a minimum for the MySQL Enterprise Monitor Agent installation, specify the mode (if not specified at the command line), mysqluser, installdir, mysqlpassword, and agentpassword options. Create a file containing these values and use it with the optionfile option for unattended agent installation.

8.1.2 MySQL Enterprise Service Manager Options

The following options let you customize the installation process for MySQL Enterprise Service Manager. The MySQL Enterprise Service Manager supports using a bundled MySQL server, or a separate MySQL server provided by the user. To use your own MySQL server, the server must be installed and running before installation. For more information, see Section 3.2.3, “MySQL Enterprise Monitor Repository”.

Table 8.1 MySQL Enterprise Service Manager Installer Options

FormatDescription
--adminpasswordPassword for the database repository
--adminuserUsername for the database repository
--backupdirBackup directory path.
--createDataBackupBackup stored data. Upgrade process only.
--dbhostHostname or IP address of the MySQL server
--dbnameName of the repository database.
--dbportTCP/IP port for the MySQL server
--debuglevelSet the debug information level
--debugtraceFile for a debug trace of the installation
--forceRestartUpgrade only. Restarts the services after the upgrade process completes.
--helpDisplay the list of valid options
--installdirInstallation directory
--installer-languageLanguage selection
--modeInstallation mode
--mysql_installation_typeMySQL server to be used by the MySQL Enterprise Monitor
--mysql_sslUse SSL when connecting to the database
--optionfileInstallation option file
--system_sizeDefines Tomcat and MySQL repository configuration based on installation size.
--tomcatportServer port for the Tomcat component
--tomcatshutdownportShutdown TCP/IP port for the Tomcat component
--tomcatsslportSSL TCP/IP port for the Tomcat component
--unattendedmodeuiUnattended mode user interface
--versionDisplay the product information

  • --help

    Command-Line Format--help

    Display the list of valid installer options.

  • --version

    Command-Line Format--version

    Display product and version information.

  • --backupdir

    Command-Line Format--backupdir
    Permitted ValuesTypestring

    Upgrade only. The backup directory.

  • --createDataBackup

    Command-Line Format--createDataBackup
    Permitted ValuesTypeboolean
    Default1
    Valid Values0 (Do not create data backup)
    1 (Create data backup)

    Upgrade only. Specifies whether the upgrade process should create a backup of the existing data. If --backupdir is not defined, a Backup directory is created in the root of the installation directory.

  • --optionfile

    Command-Line Format--optionfile

    The path to the option file containing the information for the installation.

  • --mode

    Command-Line Format--mode
    Permitted Values (Linux)Typestring
    Defaultgtk
    Valid Valuesgtk (GTK (X Windows))
    xwindow (X Windows (native))
    text (Text (command-line))
    unattended (Unattended (no dialogs/prompts))
    Permitted Values (OS X)Typestring
    Defaultosx
    Valid Valuesosx (Mac OS X (native))
    text (Text (command-line))
    unattended (Unattended (no dialogs/prompts))
    Permitted Values (Unix)Typestring
    Defaultxwindow
    Valid Valuesxwindow (X Windows (native))
    text (Text (command-line))
    unattended (Unattended (no dialogs/prompts))
    Permitted Values (Windows)Typestring
    Defaultwin32
    Valid Valueswin32 (Windows (native))
    unattended (Unattended (no dialogs/prompts))

    The installation mode to use for this installation.

  • --debugtrace

    Command-Line Format--debugtrace
    Permitted ValuesTypestring

    The filename to use for a debug trace of the installation.

  • --debuglevel

    Command-Line Format--debuglevel
    Permitted ValuesTypenumeric
    Default2
    Min Value0
    Max Value4

    Set the debug information level for log data written to the file specified by debugtrace.

  • --installer-language

    Command-Line Format--installer-language
    Permitted ValuesTypestring
    Defaulten
    Valid Valuesen (English)
    ja (Japanese)

    The installer language.

  • --installdir

    Command-Line Format--installdir
    Permitted Values (OS X)Typestring
    Default/Applications/mysql/enterprise/monitor/
    Permitted Values (Unix)Typestring
    Default/opt/mysql/enterprise/monitor/
    Permitted Values (Windows)Typestring
    DefaultC:\Program Files\MySQL\Enterprise\Monitor

    The installation directory for MySQL Enterprise Service Manager, or the previous installation directory when performing an update. Installation only. It is not possible to change the installation directory in an upgrade.

  • --system-size

    Command-Line Format--system_size
    Permitted ValuesTypestring
    Defaultmedium
    Valid Valuessmall (5 to 10 MySQL Servers monitored from a laptop or low-end server with no more than 4GB of RAM.)
    medium (Up to 100 MySQL Servers monitored from a medium-sized, but shared, server with 4 to 8GB of RAM.)
    large (More than 100 MySQL Servers monitored from a high-end, dedicated server, with more than 8GB RAM.)

    Defines the installation type. This choice sets parameters which suit your installation type. Installation only. It is not possible to change the system size in an upgrade.

  • --tomcatport

    Command-Line Format--tomcatport
    Permitted ValuesTypenumeric
    Default18080

    The TCP/IP port for the MySQL Enterprise Service Manager. This port is used by MySQL Enterprise Monitor Agent and as the port for the interface to the MySQL Enterprise Monitor User Interface. Installation only. It is not possible to change the Tomcat port in an upgrade.

  • --tomcatsslport

    Command-Line Format--tomcatsslport
    Permitted ValuesTypenumeric
    Default18443

    The TCP/IP port to use for SSL communication to the MySQL Enterprise Service Manager. Installation only. It is not possible to change the Tomcat SSL port in an upgrade.

  • --mysql-identity-source

    Command-Line Format--mysql-identity-source
    Permitted ValuesTypestring
    Defaultdefault
    Valid Valuesdefault (Default)
    host_plus_datadir (host_plus_datadir)

    The mechanism used to generate a unique identity for the MySQL instance if one does not already exist. Passing in "default" uses either the "server_uuid" variable if present, or generates a random new one. Passing in "host_plus_datadir" uses a hash of the host identity and the path to the MySQL instance's data directory, to create a unique identity.

    Note

    This option is only available in unattended installation mode.

    Note

    host_plus_datadir is not allowed when the Agent is remote monitoring a MySQL instance, as MySQL Enterprise Monitor is unable to definitively compute a known-unique host identity in this case.

  • --mysql_ssl

    Command-Line Format--mysql_ssl
    Permitted ValuesTypeboolean
    Default0
    Valid Values0 (Do not use SSL when connecting to the database)
    1 (Use SSL when connecting to the database)

    Use SSL when connecting to the database.

  • --adminuser

    Command-Line Format--adminuser
    Permitted ValuesTypestring
    Defaultservice_manager

    The user name to use for connecting to the database repository used by MySQL Enterprise Service Manager. If you install the bundled MySQL server, this user is configured in the new database. If you use an existing MySQL server, specify an existing user with rights to access the database.

    Note

    The repository user name and encrypted password are stored in the config.properties configuration file.

  • --unattendedmodeui

    Command-Line Format--unattendedmodeui
    Permitted ValuesTypestring
    Defaultnone
    Valid Valuesnone (No dialogs)
    minimal (Critical dialogs)
    minimalWithDialogs (Minimal UI with dialogs)

    The UI elements to use when performing an unattended installation. The options are none, show no UI elements during the installation; minimal, show minimal elements during installation; minimalWithDialogs, show minimal UI elements, but include the filled-dialog boxes.

  • --adminpassword

    Command-Line Format--adminpassword
    Permitted ValuesTypestring

    The MySQL Enterprise Service Manager password for connecting to the MySQL database repository.

  • --mysql_installation_type

    Command-Line Format--mysql_installation_type
    Permitted ValuesTypestring
    Defaultbundled
    Valid Valuesbundled (Use the bundled MySQL server)
    existing (Use an existing (user supplied) MySQL server)

    Specifies whether the installer should configure MySQL Enterprise Service Manager to install the bundled MySQL server, or use a MySQL server that you have already installed to store the repository data.

  • --dbport

    Command-Line Format--dbport
    Permitted ValuesTypenumeric
    Default13306

    The TCP/IP port for the MySQL database used to store MySQL Enterprise Service Manager repository data. If you install the bundled MySQL server, this is the port where the new database listens for connections. If you use an existing MySQL server, specify the port used for connections by that MySQL server.

  • --dbhost

    Command-Line Format--dbhost
    Permitted ValuesTypestring
    Default127.0.0.1

    The hostname for the MySQL database. When installing MySQL Enterprise Service Manager to use an existing MySQL server, this should be the hostname of the server that will store the database repository.

  • --dbname

    Command-Line Format--dbname
    Permitted ValuesTypestring
    Defaultmem

    The name of the MySQL Enterprise Service Manager repository.

  • --forceRestart

    Command-Line Format--forceRestart
    Permitted ValuesTypeboolean
    Default0
    Valid Values0 (Do not restart services)
    1 (Restart services)

    Force a restart of MySQL Enterprise Service Manager services.

8.1.3 MySQL Enterprise Monitor Agent Options

To view all the options available for an unattended agent installation, invoke the agent installer file passing in the help option. The available options are detailed in the following table.

Table 8.2 MySQL Enterprise Monitor Agent Installer Options

FormatDescription
--proxyservicenameService name for the Proxy

  • --agentpassword

    Command-Line Format--agentpassword
    Permitted ValuesTypestring

    Specify the agent password to use to communicate with the MySQL Enterprise Service Manager.

  • --createBackup

    Command-Line Format--createBackup
    Permitted ValuesTypeboolean
    Default1

    Whether to backup the data.

    Note

    This option is only available when upgrading the Agent, and not when performing a new Agent installation.

  • --restartImmediately

    Command-Line Format--restartImmediately
    Permitted ValuesTypeboolean
    Default1

    Restart Agent immediately after updating all files.

    Note

    This option is only available when upgrading the Agent, and not when performing a new Agent installation.

  • --agentuser

    Command-Line Format--agentuser
    Permitted ValuesTypestring
    Defaultagent

    Specify the agent username to use to communicate with the MySQL Enterprise Service Manager.

  • --checkmysqlhost

    Command-Line Format--checkmysqlhost
    Permitted ValuesTypestring
    Defaultyes
    Valid Valuesyes (Check host)
    no (Do not check host)

    Validate the MySQL hostname or IP address

  • --debuglevel

    Command-Line Format--debuglevel
    Permitted ValuesTypenumeric
    Default2
    Min Value0
    Max Value4

    Set the debug information level for log data written to the file specified by debugtrace.

  • --debugtrace

    Command-Line Format--debugtrace
    Permitted ValuesTypestring

    Set the filename to use when recording debug information during the installation.

  • --installdir

    Command-Line Format--installdir
    Permitted Values (OS X)Typestring
    Default/Applications/mysql/enterprise/agent/
    Permitted Values (Unix)Typestring
    Default/opt/mysql/enterprise/agent/
    Permitted Values (Windows)Typestring
    DefaultC:\Program Files\MySQL\Enterprise\Agent

    Specify the directory into which to install the software.

  • --installer-language

    Command-Line Format--installer-language
    Permitted ValuesTypestring
    Defaulten
    Valid Valuesen (English)
    ja (Japanese)

    Set the language to use for the installation process.

  • --managerhost

    Command-Line Format--managerhost
    Permitted ValuesTypestring

    The hostname or IP address of the MySQL Enterprise Service Manager.

  • --managerport

    Command-Line Format--managerport
    Permitted ValuesTypenumeric
    Default18443

    Tomcat SSL Port

  • --mode

    Command-Line Format--mode
    Permitted Values (Linux)Typestring
    Defaultgtk
    Valid Valuesgtk (GTK (X Windows))
    xwindow (X Windows (native))
    text (Text (command-line))
    unattended (Unattended (no dialogs/prompts))
    Permitted Values (OS X)Typestring
    Defaultosx
    Valid Valuesosx (Mac OS X (native))
    text (Text (command-line))
    unattended (Unattended (no dialogs/prompts))
    Permitted Values (Unix)Typestring
    Defaultxwindow
    Valid Valuesxwindow (X Windows (native))
    text (Text (command-line))
    unattended (Unattended (no dialogs/prompts))
    Permitted Values (Windows)Typestring
    Defaultwin32
    Valid Valueswin32 (Windows (native))
    unattended (Unattended (no dialogs/prompts))

    Specify the installation mode to use for this installation. The GUI is executed by default, with the possible values including text and unattended. On Linux, the GUI options are gtk (default) and xwindow.

  • --mysqlconnmethod

    Command-Line Format--mysqlconnmethod
    Permitted ValuesTypestring
    Defaulttcpip
    Valid Valuestcpip (Use TCP/IP)
    socket (Use Unix Socket/Named Pipe)

    Specify the connection method to use to connect to MySQL. If you specify tcpip, the value of the mysqlport option is used. If you specify socket, the value of the mysqlsocket option is used to connect to the MySQL server to be monitored.

    Note

    This option is only available when installing the Agent, and not when performing an Agent upgrade.

  • --mysqlhost

    Command-Line Format--mysqlhost
    Permitted ValuesTypestring
    Default127.0.0.1

    Hostname or IP address of the MySQL server to be monitored.

  • --mysqlpassword

    Command-Line Format--mysqlpassword
    Permitted ValuesTypestring

    Specify the password to use when connecting the Admin user to the monitored MySQL instance.

  • --mysqlport

    Command-Line Format--mysqlport
    Permitted ValuesTypenumeric
    Default3306

    The TCP/IP port to use when connecting to the monitored MySQL server.

  • --mysqlsocket

    Command-Line Format--mysqlsocket
    Permitted ValuesTypestring

    Specify the filename of the MySQL socket to use when communicating with the monitored MySQL instance.

  • --mysqluser

    Command-Line Format--mysqluser
    Permitted ValuesTypestring

    An MySQL Server administrative user for the MySQL instance that will be monitored. This user must already exist.

  • --agent_autocreate

    Command-Line Format--agent_autocreate
    Permitted ValuesTypeboolean

    Auto-create the less privileged users (--generaluser and -limiteduser) using the --mysqluser user. Use this option if the limited and general users do not already exist on your system.

    The default value depends on the context. For new installations, it is "1", and for upgrades it is "0".

  • --generaluser

    Command-Line Format--generaluser
    Permitted ValuesTypestring

    The username for the general user.

  • --generalpassword

    Command-Line Format--generalpassword
    Permitted ValuesTypestring

    Password for the --generaluser.

  • --limiteduser

    Command-Line Format--limiteduser
    Permitted ValuesTypestring

    The username for the limited user.

  • --limitedpassword

    Command-Line Format--limitedpassword
    Permitted ValuesTypestring

    Password for the --limitedpassword.

  • --optionfile <optionfile>

    Command-Line Format--optionfile

    Specify the location of an option file containing the configuration options for this installation.

  • --unattendedmodeui

    Command-Line Format--unattendedmodeui
    Permitted ValuesTypestring
    Defaultnone
    Valid Valuesnone (No dialogs)
    minimal (Critical dialogs)
    minimalWithDialogs (Minimal UI with dialogs)

    The UI elements to use when performing an unattended installation. The options are none, show no UI elements during the installation; minimal, show minimal elements during installation; minimalWithDialogs, show minimal UI elements, but include the filled-dialog boxes.

  • --version

    Command-Line Format--version

    Display product information, including the version number of the installer.

  • --agent_installtype

    Command-Line Format--agent-installtype
    Permitted ValuesTypestring
    Defaultdatabase

    Installation type for the Agent. Passing in "standalone" configures the Agent to only monitor the Host itself. Passing in "database" configures the Agent to monitor both the Host and a specific MySQL Instance.

    This option is typically used when setting "--mode" to "unattended".

    Note

    Additional MySQL Instances can be added for monitoring in the future.

  • --ignore-old-proxy-aggr

    Command-Line Format--ignore-old-proxy-aggr
    Permitted ValuesTypeboolean
    Default0

    Ignores Proxy and Aggregator while running an upgrade.

    Note

    This option is only available when upgrading the Agent, and not when performing a new Agent installation.

  • --mysqlconnectiongroup

    Command-Line Format--mysqlconnectiongroup
    Permitted ValuesTypestring

    Optionally sets the MySQL instance group for the connection.

    As of 3.0.5, multiple groups can be assigned in a single installation by passing in a comma-separated list of group names.

  • --agentservicename

    Command-Line Format--agentservicename
    Permitted Values (Linux)Typestring
    Defaultmysql-monitor-agent
    Permitted Values (OS X)Typestring
    Defaultmysql.monitor.agent
    Permitted Values (Unix)Typestring
    Defaultmysql-monitor-agent
    Permitted Values (Windows)Typestring
    DefaultMySQL Enterprise Monitor Agent

    When the MySQL Enterprise Monitor Agent is installed, a new service is created (Windows), or on Unix or OS X a new startup script is created within the corresponding startup directory (for example /etc/init.d on Unix or /Library/LaunchDaemons on OS X). When installing multiple agents on the same host, you can use this option to create each agent installation with a unique identifier. During an upgrade installation, you then use this identifier to specify which installation of the agent to update.

    The default value is mysql-monitor-agent.

    Note

    This option is only available when installing the Agent, and not when performing an Agent upgrade.

  • --help

    Command-Line Format--help

    Display the list of valid options to the installer.