Chapter 8 Unattended Installation Reference
Prev |  | Next

## Chapter 8 Unattended Installation Reference

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

Format | Description
--- | ---
--adminpassword | Password for the database repository
--adminuser | Username for the database repository
--backupdir | Backup directory path.
--createDataBackup | Backup stored data. Upgrade process only.
--dbhost | Hostname or IP address of the MySQL server
--dbname | Name of the repository database.
--dbport | TCP/IP port for the MySQL server
--debuglevel | Set the debug information level
--debugtrace | File for a debug trace of the installation
--forceRestart | Upgrade only. Restarts the services after the upgrade process completes.
--help | Display the list of valid options
--installdir | Installation directory
--installer-language | Language selection
--mode | Installation mode
--mysql_installation_type | MySQL server to be used by the MySQL Enterprise Monitor
--mysql_ssl | Use SSL when connecting to the database
--optionfile | Installation option file
--system_size | Defines Tomcat and MySQL repository configuration based on installation size.
--tomcatport | Server port for the Tomcat component
--tomcatshutdownport | Shutdown TCP/IP port for the Tomcat component
--tomcatsslport | SSL TCP/IP port for the Tomcat component
--unattendedmodeui | Unattended mode user interface
--version | Display 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 Values | Type | `string`

  Upgrade only. The backup directory.

- `--createDataBackup`

  Command-Line Format | `--createDataBackup`
  Permitted Values | Type | `boolean`
  Default | `1`
  Valid Values | `0` (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) | Type | `string`
  Default | `gtk`
  Valid Values | `gtk` (GTK (X Windows))
  `xwindow` (X Windows (native))
  `text` (Text (command-line))
  `unattended` (Unattended (no dialogs/prompts))
  Permitted Values (OS X) | Type | `string`
  Default | `osx`
  Valid Values | `osx` (Mac OS X (native))
  `text` (Text (command-line))
  `unattended` (Unattended (no dialogs/prompts))
  Permitted Values (Unix) | Type | `string`
  Default | `xwindow`
  Valid Values | `xwindow` (X Windows (native))
  `text` (Text (command-line))
  `unattended` (Unattended (no dialogs/prompts))
  Permitted Values (Windows) | Type | `string`
  Default | `win32`
  Valid Values | `win32` (Windows (native))
  `unattended` (Unattended (no dialogs/prompts))

  The installation mode to use for this installation.

- `--debugtrace`

  Command-Line Format | `--debugtrace`
  Permitted Values | Type | `string`

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

- `--debuglevel`

  Command-Line Format | `--debuglevel`
  Permitted Values | Type | `numeric`
  Default | `2`
  Min Value | `0`
  Max Value | `4`

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

- `--installer-language`

  Command-Line Format | `--installer-language`
  Permitted Values | Type | `string`
  Default | `en`
  Valid Values | `en` (English)
  `ja` (Japanese)

  The installer language.

- `--installdir`

  Command-Line Format | `--installdir`
  Permitted Values (OS X) | Type | `string`
  Default | `/Applications/mysql/enterprise/monitor/`
  Permitted Values (Unix) | Type | `string`
  Default | `/opt/mysql/enterprise/monitor/`
  Permitted Values (Windows) | Type | `string`
  Default | `C:\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 Values | Type | `string`
  Default | `medium`
  Valid Values | `small` (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 Values | Type | `numeric`
  Default | `18080`

  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 Values | Type | `numeric`
  Default | `18443`

  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 Values | Type | `string`
  Default | `default`
  Valid Values | `default` (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 Values | Type | `boolean`
  Default | `0`
  Valid Values | `0` (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 Values | Type | `string`
  Default | `service_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 Values | Type | `string`
  Default | `none`
  Valid Values | `none` (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 Values | Type | `string`

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

- `--mysql_installation_type`

  Command-Line Format | `--mysql_installation_type`
  Permitted Values | Type | `string`
  Default | `bundled`
  Valid Values | `bundled` (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 Values | Type | `numeric`
  Default | `13306`

  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 Values | Type | `string`
  Default | `127.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 Values | Type | `string`
  Default | `mem`

  The name of the MySQL Enterprise Service Manager repository.

- `--forceRestart`

  Command-Line Format | `--forceRestart`
  Permitted Values | Type | `boolean`
  Default | `0`
  Valid Values | `0` (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

Format | Description
--- | ---
--proxyservicename | Service name for the Proxy

- `--agentpassword`

  Command-Line Format | `--agentpassword`
  Permitted Values | Type | `string`

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

- `--createBackup`

  Command-Line Format | `--createBackup`
  Permitted Values | Type | `boolean`
  Default | `1`

  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 Values | Type | `boolean`
  Default | `1`

  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 Values | Type | `string`
  Default | `agent`

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

- `--checkmysqlhost`

  Command-Line Format | `--checkmysqlhost`
  Permitted Values | Type | `string`
  Default | `yes`
  Valid Values | `yes` (Check host)
  `no` (Do not check host)

  Validate the MySQL hostname or IP address

- `--debuglevel`

  Command-Line Format | `--debuglevel`
  Permitted Values | Type | `numeric`
  Default | `2`
  Min Value | `0`
  Max Value | `4`

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

- `--debugtrace`

  Command-Line Format | `--debugtrace`
  Permitted Values | Type | `string`

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

- `--installdir`

  Command-Line Format | `--installdir`
  Permitted Values (OS X) | Type | `string`
  Default | `/Applications/mysql/enterprise/agent/`
  Permitted Values (Unix) | Type | `string`
  Default | `/opt/mysql/enterprise/agent/`
  Permitted Values (Windows) | Type | `string`
  Default | `C:\Program Files\MySQL\Enterprise\Agent`

  Specify the directory into which to install the software.

- `--installer-language`

  Command-Line Format | `--installer-language`
  Permitted Values | Type | `string`
  Default | `en`
  Valid Values | `en` (English)
  `ja` (Japanese)

  Set the language to use for the installation process.

- `--managerhost`

  Command-Line Format | `--managerhost`
  Permitted Values | Type | `string`

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

- `--managerport`

  Command-Line Format | `--managerport`
  Permitted Values | Type | `numeric`
  Default | `18443`

  Tomcat SSL Port

- `--mode`

  Command-Line Format | `--mode`
  Permitted Values (Linux) | Type | `string`
  Default | `gtk`
  Valid Values | `gtk` (GTK (X Windows))
  `xwindow` (X Windows (native))
  `text` (Text (command-line))
  `unattended` (Unattended (no dialogs/prompts))
  Permitted Values (OS X) | Type | `string`
  Default | `osx`
  Valid Values | `osx` (Mac OS X (native))
  `text` (Text (command-line))
  `unattended` (Unattended (no dialogs/prompts))
  Permitted Values (Unix) | Type | `string`
  Default | `xwindow`
  Valid Values | `xwindow` (X Windows (native))
  `text` (Text (command-line))
  `unattended` (Unattended (no dialogs/prompts))
  Permitted Values (Windows) | Type | `string`
  Default | `win32`
  Valid Values | `win32` (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 Values | Type | `string`
  Default | `tcpip`
  Valid Values | `tcpip` (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 Values | Type | `string`
  Default | `127.0.0.1`

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

- `--mysqlpassword`

  Command-Line Format | `--mysqlpassword`
  Permitted Values | Type | `string`

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

- `--mysqlport`

  Command-Line Format | `--mysqlport`
  Permitted Values | Type | `numeric`
  Default | `3306`

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

- `--mysqlsocket`

  Command-Line Format | `--mysqlsocket`
  Permitted Values | Type | `string`

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

- `--mysqluser`

  Command-Line Format | `--mysqluser`
  Permitted Values | Type | `string`

  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 Values | Type | `boolean`

  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 Values | Type | `string`

  The username for the general user.

- `--generalpassword`

  Command-Line Format | `--generalpassword`
  Permitted Values | Type | `string`

  Password for the `--generaluser`.

- `--limiteduser`

  Command-Line Format | `--limiteduser`
  Permitted Values | Type | `string`

  The username for the limited user.

- `--limitedpassword`

  Command-Line Format | `--limitedpassword`
  Permitted Values | Type | `string`

  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 Values | Type | `string`
  Default | `none`
  Valid Values | `none` (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 Values | Type | `string`
  Default | `database`

  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 Values | Type | `boolean`
  Default | `0`

  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 Values | Type | `string`

  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) | Type | `string`
  Default | `mysql-monitor-agent`
  Permitted Values (OS X) | Type | `string`
  Default | `mysql.monitor.agent`
  Permitted Values (Unix) | Type | `string`
  Default | `mysql-monitor-agent`
  Permitted Values (Windows) | Type | `string`
  Default | `MySQL 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.

Prev | Up | Next
Chapter 7 Post-installation Considerations | Home | Chapter 9 Performance Tuning MySQL Enterprise Monitor