We left off with a Linux host that had been built and configured to
begin the installation of 3PAR System Reporter. Let’s continue on and
get System Reporter installed and configured.
As a recap from Part 1, we are building a System Reporter system in Linux. I have chosen to use RedHat Enterprise Linux 5.8, along with MySQL for the database backend. Both System Reporter and MySQL will be hosted on the same server.
So let’s recap some file locations first, as we will need them later on.
The 3PAR CLI was installed into
We begin by making some modifications to the MySQL installation.
http:///3par/
Part 3 of my System Reporter series will involve adding the Inserv system to System Reporter, as well as setting some basic options up, and going over the various tabs available to you.
As a recap from Part 1, we are building a System Reporter system in Linux. I have chosen to use RedHat Enterprise Linux 5.8, along with MySQL for the database backend. Both System Reporter and MySQL will be hosted on the same server.
So let’s recap some file locations first, as we will need them later on.
The 3PAR CLI was installed into
/opt/3PAR/inform_cli_3.1.1
. You should have 2 files copied from the System Reporter CD, onto your system. They are sampleloop-.i386.rpm
and sysrptwebsrv-.i386.rpm
. At the time of writing, the current versions were 2.9-2 for sampleloop and 2.9-2 for sysrptwebsrv, but make sure to check with your 3PAR representative for the most recent versions.We begin by making some modifications to the MySQL installation.
- Open /etc/my.cnf with your editor of choice (mine is vi )
- Comment out the socket= line, and add the line below underneath:
socket=/var/run/mysqld/mysqld.sock
- Above [mysqld_safe], add the following line:
max_allowed_packet=32M
- Save the file, and then restart mysql
-
/etc/init.d/mysqld stop
-
/etc/init.d/mysqld start
-
- Comment out the socket= line, and add the line below underneath:
- Check to make sure the new socket file exists
-
ls –al /var/run/mysqld/mysqld.sock
-
- Connect to your MySQL database
-
mysql –u root –p
- when prompted, enter the password you defined for the root user
- Create the inservstats database:
-
create database inservstats;
-
- Create the cliuser and webuser users
-
create user cliuser identified by ‘3psrcli’;
-
create user webuser identified by ‘3parweb’;
-
- Grant privileges to the System Reporter users, by issuing the below commands:
-
use inservstats
-
grant all on * to cliuser;
-
grant select on * to webuser;
-
- Quit out of the database:
-
exit
-
-
Installing the SampleLoop applications
With the database and users created, we are able to start installing the software. Before we start, make sure to check to ensure the 32 bit package of GD is installed, by issuingyum –y install gd.i386. You should get a prompt back saying it’s installed and the latest version, otherwise it will install the missing package(s).
- Install the sampleloop package, which you copied from the System Reporter CD earlier
-
rpm –ivh sampleloop-
(substiture ver with your version).i386.rpm
-
- Edit the
/etc/sampleloop.conf
configuration file, by opening it with your favorite editor. You will need to perform the following edits:- Change the line “set Sysdb::cli” to match your installed CLI location, mine was /opt/3PAR/inform_cli_3.1.1/bin/cli
- Change the line “set Sysdb::smtpserver” to your local mail server address
- Change the line “set Sysdb:smtporig” to the FROM email address System Reporter should use when sending you emails.
- Change the “set Sysdb::smtpuser” and “set Sysdb:smtppasswd” to their respective user and password values, if your mail server requires you to login to send mail. If these are not needed, simply comment them out by putting a # in front of the lines.
- Change the line “set Sysdb::dbhost” to the IP address of your MySQL server
- Change the line “set Sysdb::dbname” to the database name you created above. In my example, we used “inservstats”
- Now we will need to create the password file used by the sampleloop
mechanism to access the CLI. Open/Create the file
“/etc/sampleloop_dbpwfile”
- On the first line, enter the username and password for the cli user, separated by a single space.
- ie. “cliuser 3psrcli”
- Save the file, and exit out of the editor.
- On the first line, enter the username and password for the cli user, separated by a single space.
- You are now ready to startup the SampleLoop processes.
- run the below script:
-
/etc/init.d/sampleloop startup
-
- If this fails to start, check the log located in
/var/log/sampleloop/sampleloop.log
for hints on what went wrong. It’s usually a password mistyped.
- run the below script:
- If everything starts successfully, add sampleloop to the default startup runlevels
-
chkconfig --add sampleloop
-
Installing the System Reporter Webserver Files
Now we have the database and users created, sampleloop applications installed, and SampleLoop up and running. The next step is to install the sysrptwebsrv RPM package. This package is found on the System Reporter CD, and should be copied on to your Linux system.- To install the packages, run the below:
-
rpm -ivh sysrptwebsrv-2.9-2.i386.rpm
- Ensure it was installed successfully.
-
- We now need to setup two config.tcl files for the webserver.
-
- The first is at
/var/www/cgi-bin/3par-rpts/config.tcl
. Open this file in your favorite editor, and make the below changes:- Change the line “set Sysdb::cli” to match your installed CLI location, mine was /opt/3PAR/inform_cli_3.1.1/bin/cli
- Change the line “set Sysdb::dbhost” to the IP address of your MySQL server
- Change the line “set Sysdb::dbname” to the database name you created above. In my example, we used “inservstats”
- Change the line “set Sysdb::dbuser” to webuser
- Change the line “set Sysdb::dbpasswd” to the password you set for webuser, in my example it was 3parweb.
- Change the line “set Sysdb::smtpserver” to your local mail server address
- Change the line “set Sysdb:smtporig” to the FROM email address System Reporter should use when sending you emails.
- Change the “set Sysdb::smtpuser” and “set Sysdb:smtppasswd” to their respective user and password values, if your mail server requires you to login to send mail. If these are not needed, simply comment them out by putting a # in front of the lines.
- The second file is located at
/var/www/cgi-bin/3par-policy/config.tcl
. Open this file in your favorite editor, and make the below changes: -
- Change the line “set Sysdb::cli” to match your installed CLI location, mine was /opt/3PAR/inform_cli_3.1.1/bin/cli
- Change the line “set Sysdb::dbhost” to the IP address of your MySQL server
- Change the line “set Sysdb::dbname” to the database name you created above. In my example, we used “inservstats”
- Change the line “set Sysdb::dbuser” to cliuser
- Change the line “set Sysdb::dbpasswd” to the password you set for cliuser, in my example it was 3psrcli.
- The first is at
Test your System Reporter setup
You should now have a working System Reporter configuration. You can access System Reporter by going to:http://
Part 3 of my System Reporter series will involve adding the Inserv system to System Reporter, as well as setting some basic options up, and going over the various tabs available to you.