The following instructions must be performed as root
- Decide what accounts are going to be needed. Assume the account 'cyrus' will have root privileges and be used for operations requiring root. Assume that the monitoring will run under the non-root access account 'iepm'. Both, for purposes of this documentation are assumed to be in group
<account group>
, iepm
. For this example, I will assume that the home directory for the 'cyrus' account is /home/cyrus
, and the home directory for the 'iepm' account is /home/iepm
. For the sake of consistency between monitoring systems, the account 'iepm' with /home/iepm
is strongly recommended.
Download the complete package and place the source code in the directory /home/iepm/v3src
- The monitoring host has a name. This is referred to as
<fully qualified monitoring host name>
. e.g. iepm-ncp.ncp.edu.pk or iepm-bw.slac.stanford.edu - The monitoring host should be given an
<aliasname>
that starts with 'iepm-bw'. The idea is to hide the real name of the node, but provide it with a name that can recognize its place in the world. This is important. Examples include: Code Block |
---|
iepm-bw.twaren.net
iepm-bw.cern.ch
iepm-bw.snv.ul-org
iepm-bw.fzk.de
|
- If the account
mysql:mysql
has not been allocated, allocate it by using the following commands: Code Block |
---|
groupadd -g 20000 mysql
useradd -u 20000 -g mysql mysql
|
Normally the account is created itself along with the installation of mysql.
- Make the mysql directory '/home/iepm/mysql'.
Code Block |
---|
mkdir /home/iepm/mysql
chown mysql:mysql /home/iepm/mysql
|
- Create a configuration file for
/etc/my.cnf
which MySQL will use when you install the database. Copy the following contents in to my.cnf
. Code Block |
---|
[mysqld]
datadir=/home/iepm/mysql
socket=/home/iepm/mysql/mysql.sock
port=3306
[mysqld_safe]
datadir=/home/iepm/mysql
socket=/home/iepm/mysql/mysql.sock
port=3306
[mysql.server]
datadir=/home/iepm/mysql
socket=/home/iepm/mysql/mysql.sock
port=3306
[client]
socket=/home/iepm/mysql/mysql.sock
port=3306
|
- If mysql is already running, it is running with the 'test' database. Kill the mysql daemons.
Restart MySQL with mysqld_safe &
. This will restart the MySQL server with the configuration file /etc/my.cnf
. - Create the data base by executing
mysql_install_db
. - Change the ownership of
/home/iepm/mysql
by the command chown chown -R mysql:mysql /home/iepm/mysql
. - Set the database root password with the following command.
Code Block |
---|
mysqladmin -u root password <new password>
|
- You are now ready to create the directories with
/home/iepm/mysql
that must be owned by the iepm account. These directories are used by the iepm monitoring to track the state of the monitoring system. Execute the following commands with 'iepm:iepm' with 'iepm' replaced by the appropriate group for the 'iepm' account. i.e. it would be iepm:< youraccountgroup> in your case. Code Block |
---|
# The data directory is where the results from the probes are stored.
# These files are picked up by the 'load-datad' daemon and put into the database tables.
mkdir /home/iepm/mysql/data
chown iepm:iepm /home/iepm/mysql/data
# the logs directory contain the log files from each process
mkdir /home/iepm/mysql/logs
chown iepm:iepm /home/iepm/mysql/logs
# The pids from the daemons are stored here
mkdir /home/iepm/mysql/pids
chown iepm:iepm /home/iepm/mysql/pids
# The files in the keepalives directory are used by the monitoring software to ascertain that
# the daemons are running
mkdir /home/iepm/mysql/keepalives
# prime the pump with:
touch /home/iepm/mysql/keepalives/traced.alive
touch /home/iepm/mysql/keepalives/pingd.alive
touch /home/iepm/mysql/keepalives/bw-synched.alive
touch /home/iepm/mysql/keepalives/pathchirpd.alive
touch /home/iepm/mysql/keepalives/load-datad.alive
touch /home/iepm/mysql/keepalives/load-scheduled.alive
touch /home/iepm/mysql/keepalives/owpingd.alive
# set the permissions so that the iepm account can access them
chown -R iepm:iepm /home/iepm/mysql/data
chown -R iepm:iepm /home/iepm/mysql/logs
chown -R iepm:iepm /home/iepm/mysql/keepalives
chown -R iepm:iepm /home/iepm/mysql/pids
|
- The output from the analysis and reports must go into a directory which is writeable by the 'iepm' account. Generally this is '/home/iepm/public_html'. Make this directory with by using the commands:
Code Block |
---|
mkdir /home/iepm/public_html
mkdir /home/iepm/public_html/<aliasname>
chown -R iepm:<account> /home/iepm/public_html
|
Where <account>
is the account your UNIX id is under. For example, for 'cyrus:iepm' <account> would be replaced by iepm. - Create a link to this area from /var/www/html as your document root of apache will be /var/www/html.
Code Block |
---|
ln -s /home/iepm/public_html/<aliasname> /var/www/html/<aliasname>
|
- IEPM-BW requires a simple configuration file, '/etc/iepm.cnf'. Create the file by the command
Code Block |
---|
mkdir /etc/iepm.cnf
|
Copy the following contents into the file and make the required changes. Code Block |
---|
# required iepm configuration parameters
# /etc/iepm.conf
dataBase = "iepm"
dataBaseHost = "<fully qualified monitoring host name>"
dataBaseDir = "/home/iepm/mysql"
iepmSrcDir = "/home/iepm/v3src"
updateAcct = "iepm"
acctGroup = "<account group>"
readAcct = "readonly"
# This is provided as the monitoring host and database host could be
# different machines.
# It is not advisable for them to be different. In monitoring a network,
# one should avoid using the network for the monitoriong control and data # logging.
monHost = "<fully qualified monitoring host name>";
aliasName = "<aliasname>";
monHostip = "<monitoring host ip address>";
mysqlport = 3306;
#Connie Logg 5/12/04 cal@slac.stanford.edu <- configurator's name and date please
|
An example iepm.cnf file is below to help you in changing parameters specific to your site. Code Block |
---|
#required iepm configuration parameters
# /etc/iepm.conf
dataBase = "iepm"
dataBaseHost = "iepm-ncp.ncp.edu.pk"
dataBaseDir = "/home/iepm/mysql"
iepmSrcDir = "/home/iepm/v3src"
updateAcct = "iepm"
acctGroup = "iepm"
readAcct = "readonly"
# This is provided as the monitoring host and database host could be different machines
# It is not advisable for them to be different. In monitoring a network, one should avoid using the
# network for the monitoriong control and data logging.
monHost = "iepm-ncp.ncp.edu.pk";
aliasName = "iepm-ncp.ncp.edu.pk";
monHostip = "202.83.167.108";
mysqlport = 3306;
|