To install the MySQL Enterprise Agent on Linux systems, you must have the Linux Standards Base (LSB) initialization functions installed. To check the existence of the LSB components, look for an LSB package within your Linux package management environment. For example, on RedHat and other RPM-based distributions:
shell> rpm -qa | grep -i lsb redhat-lsb-3.1-19.fc8.x86_64
Under Debian/Ubuntu:
shell> dpkg -l|grep -i lsb
ii lsb-base 3.2-20ubuntu4
Linux Standard Base 3.2 init script function
ii lsb-release 3.2-20ubuntu4
Linux Standard Base version reporting utilit
Alternatively, you can use the lsb_release command. Existence of this command normally indicates that the current distribution is LSB compliant.
To install the agent, navigate to the directory that contains the
file
mysqlmonitoragent-
(where version-installer.binversion indicates the three-part
version number, the OS, and the architecture). Ensure that this
file is executable by typing:
shell> chmod +x mysqlmonitoragent-version-installer.bin
To install to the default directory
(/opt/mysql/enterprise/agent), log in as
root first. Installing as an unprivileged
user installs to the
/home/
directory.
user_name/mysql/enterprise/agent
To automatically start the agent upon rebooting, you must install while logged in as root. If you install as an unprivileged user, you must start the agent yourself after each reboot.
The following section covers installation from the command line. You can install the Monitor Agent graphically by running the installer from within a windows manager. In both cases, the steps are identical.
You can also install the Monitor Agent in
unattended mode, for example to do multiple
installations. For more information on unattended installation,
see Section 5.4, “Unattended Installation”.
To install multiple agents on the same machine, use the
servicename option to the installer to set a
unique service name each time. For more information, see
installer_servicename
Begin installation from the command line by typing:
shell> ./mysqlmonitoragent-version-installer.bin --mode text
The following section shows the various options. Default values are indicated by square brackets; to select them, press Enter. Otherwise, enter a value of your choosing.
First, select the Language you want to use during the installation process:
Language Selection Please select the installation language [1] English [2] Japanese Please choose an option [1] :
Next, specify the directory in which to install the agent:
---------------------------------------------------------------------------- Welcome to the MySQL Enterprise Monitor Agent Setup Wizard. ---------------------------------------------------------------------------- Please specify the directory where MySQL Enterprise Monitor Agent will be installed Installation directory [/opt/mysql/enterprise/agent]:
If the installer identifies that an existing version of the
MySQL Enterprise Agent is installed, provide an alternative name for
the installation. This defines the name of the file created in
/etc/init.d used to start the agent. You
can enter a different name to perform multiple installations.
Specify the MySQL server to monitor. First, specify whether to use a TCP/IP or a socket-based connection to communicate with the MySQL Server:
How will the agent connect to the database it is monitoring? [1] TCP/IP [2] Socket Please choose an option [1] :
Choose one or more operations for this agent to perform:
Enable monitoring a MySQL Server: This is the main operation of monitoring the MySQL server in terms of performance, security and availability.
Enable the MySQL Enterprise Agent Aggregator: It is used for future Connector plugins or user-written methods of transmitting Query Analyzer data to the MySQL Enterprise Service Manager.
Enable the MySQL Enterprise Agent Proxy Service: To study Query Analyzer information by sending your queries through the MySQL Enterprise Agent Proxy Service, switch this option on.
If you chose to monitor a MySQL server, next you provide the connection options for communicating with the server.
If you selected TCP/IP, you enter the TCP/IP address and port number:
---------------------------------------------------------------------------- Monitored Database Information ... MySQL hostname or IP address [127.0.0.1]: Validate MySQL hostname or IP address [Y/n]: MySQL Port [3306]:
If you select Socket, then you provide the path name to the
MySQL socket. Typical values are
/tmp/mysql.sock,
/var/lib/mysql.sock, or
/var/run/mysql.sock.
---------------------------------------------------------------------------- Monitored Database Information ... MySQL Socket []:
The monitor agent always associates “localhost” with the TCP/IP address 127.0.0.1, not the MySQL socket. This is in contrast to the MySQL Command Line Tool, which connects via the MySQL socket by default on Unix, if the hostname “localhost” is specified.
If the MySQL server to monitor was started with the
--skip-networking option, then you cannot
connect to it via TCP/IP, as the server does not listen for
TCP/IP connections. In this case, configure the monitor
agent to use the MySQL socket. During installation, select
“socket” rather than “TCP/IP” and
then specify the MySQL socket name. Or, after installation,
edit the agent-instance.ini
configuration file. For further information, refer to
Section C.2.2, “MySQL Server (agent-instance.ini) Configuration”.
If the MySQL server to be monitored was started using the
command option --bind-address, then the
server only listens for connections on the IP address
specified, that is, the IP address of the MySQL server. If
the monitor agent was started using TCP/IP networking and
the default address of 127.0.0.1, it cannot connect to the
server to be monitored. Also, if “localhost” is
specified as the host name during agent configuration, a
connection is not established, as the server listens for
connections on the address specified with the
--bind-address option, not 127.0.0.1.
Specify the user credentials for the MySQL server that you want to monitor:
MySQL Username []: service_agent
MySQL Password :
Re-enter :
The installer can create the MySQL Enterprise Agent user on the MySQL
server that is required to connect to the server and obtain
statistical information. The installer can create an account
for you, or you can use an existing account. If you want the
installer to create the user, enter the credentials of a user
(such as the root user) that has the
privileges to create the new user and grant it the privileges
to monitor the server.
If you want to use Query Analyzer with the MySQL Enterprise Agent Aggregator, configure the aggregator port and SSL settings. For more information on Query Analyzer, see Section 2.6, “The Query Analyzer Tab”.
When MySQL Enterprise Agent Aggregator is enabled, the MySQL Enterprise Agent listens on a network port for connections from Connector plugins providing query analyzer data, forwarding the query analyzer information to MySQL Enterprise Service Manager. You can change the port number that MySQL Enterprise Agent listens for connections from connectors. If you configure the aggregator to support SSL connections, you must provide the location of the PEM and CA certificate files to be used for SSL support.
The default port is 14000 for non-SSL communication, and 14443 for SSL communication.
If you enable the MySQL Enterprise Agent Proxy Service for Query Analyzer, enter the configuration information. (the port on which the agent listens for queries).
---------------------------------------------------------------------------- Query Analyzer Configuration MySQL Proxy enables query monitoring and analysis by listening on a specified port for client connections that are then passed through to a backend MySQL database server. It is not needed for basic monitoring functionality. Click here for more information. [Y/n]: Enable Proxy (recommended) [Y/n]: Proxy Port [6446]: Backend Host: 127.0.0.1 (cannot be changed) Backend Port: 3306 (cannot be changed)
If you disable the Query Analyzer during installation, you can re-enable the Query Analyzer by manually editing the configuration file. For instructions, see Section 2.6, “The Query Analyzer Tab”.
Enter the details of the MySQL Enterprise Service Manager to use with this
agent. You can retrieve this configuration information from
the configuration_report.txt file
generated when you installed MySQL Enterprise Service Manager.
----------------------------------------------------------------------------
MySQL Enterprise Monitor Options
Hostname or IP address []: 192.168.0.197
Tomcat Server Port [18080]:
Tomcat SSL Port [18443]:
The agent and MySQL Enterprise Service Manager support using SSL for communication. To enable SSL communication between the agent and the MySQL Enterprise Service Manager, reply Y to the following question.
Use SSL? [y/N]:
Agent Username [agent]:
Agent Password :
Re-enter :
----------------------------------------------------------------------------
Before installation starts, you receive a summary of the installation settings that you specified:
Here are the settings you specified: Installation directory: /opt/mysql/enterprise/agent Monitored MySQL Database: ------------------------- Hostname or IP address: 127.0.0.1 Port: 3306 MySQL username:mysql_userMySQL password:passwordQuery Analyzer Configuration ------------------------- Proxy Enabled: yes Proxy Port: 6446 MySQL Enterprise Manager: ------------------------------ Hostname or IP address:192.168.0.197Tomcat Server Port: 18080 Tomcat SSL Port: 18443 Use SSL: 0 Agent username:agentPress [Enter] to continue : ---------------------------------------------------------------------------- Setup is now ready to begin installing MySQL Enterprise Monitor Agent on your computer. Do you want to continue? [Y/n]: y
The installer copies the necessary files and creates the configuration file required to run the agent:
---------------------------------------------------------------------------- Please wait while Setup installs MySQL Enterprise Monitor Agent on your computer. Installing 0% ______________ 50% ______________ 100% ######################################### ---------------------------------------------------------------------------- Info to start MySQL Agent The MySQL agent was successfully installed. To start the MySQL Agent please invoke: /opt/mysql/enterprise/agent/etc/init.d/mysql-monitor-agent start Press [Enter] to continue : ---------------------------------------------------------------------------- Setup has finished installing MySQL Enterprise Monitor Agent on your computer.
Finally, you can read the supplied README
file. The README is the
share/doc/README_en.txt file within the
agent installation directory.
For information on starting the agent, see Section 5.3.5.3, “Starting/Stopping the Agent on Unix”.
