Fulfil prerequisites ( Section 5.2.2, “Prerequisites for OpenSMART server”)
Create OS User and directory tree. Fill directory tree with needed files (Section 5.2.3, “Create an OpenSMART User”)
Configure Web server ( Section 5.2.6, “Web server configuration” )
Configure Database ( Section 5.2.7, “Database configuration” )
Configure OpenSMART ( Section 5.2.9, “Other Configuration on the server side”)
Perhaps Tune some OpenSMART settings ( Section 5.2.10, “Tune some OpenSMART settings”)
Perhaps Install OpenSMART documentation ( Section 5.2.11, “Install the documentation”)
For the server part of OpenSMART, you need:
An unixoid OS (I think, it IS possible to run the OpenSMART server with Windows, but we haven't (yet) tested it and we haven't documented some installation steps therefor)
A database. You can choose between MySQL (tested), Oracle (tested), PostgreSQL (tested) DB2 (tested), and every other database with a Perl DBI module for. But for these we haven't described anything about installation.
A complete Perl installation (>= 5.005)
The Perl DBI module for your database. You can find it at CPAN.
The Perl CGI
module (but I think, that is part of the standard Perl
distribution)
The Perl
CGI::Ajax module (new GUI is based on Ajax)
The Perl
Template-Toolkit module. You can find it at
CPAN.
The Perl
Chart::Lines module (used for drawing report charts.
You can find it at
CPAN.
(Very) nice to have are:
The Perl
Data::Dumper - Module (
CPAN). You need this
just for debugging, not for normal running.
The Perl
Log::Log4perl - Module (
CPAN or at
http://log4perl.sourceforge.net)
If you use
Log::Log4perl and you want to log to a file (and
normaly, this is what you want!), you need
Log::Dispatch::File,
too. You can find it at
CPAN.
OpenSMART needs a XML-Parser. We deliver
XML::Simple::PurePerl, but for a busy
production system we recommend strongly
XML::Simple or
XML::Simple::SAX as
XML-Parser. You can find both at
CPAN.
Decide where to go from here.
Each prerequisite is available in debian stable, too. Just install (apt-get install xxx):
apache2 (The Apache Webserver)
mysql-server-4.1 (MySQL database)
libmysqlclient14 (MySQL client)
perl (Perl itself)
libxml-simple--perl (XML::Simple)
libchart-perl (Generating Images for reporting)
libdbi-perl (Perl DBI module)
libtemplate-perl
liblog-log4perl (Log::Log4perl)
liblog-dispatcher (The Log4perl-Dispatcher module)
Decide where to go from here.
You haven't to but we recommend to run OpenSMART as its own user (not root!) in its own home directory. Ask your system administrator to create an OpenSMART user id. For this chapter, we assume that the user id is 'osmart'.
The OpenSMART-Root-Directory: Mostly the home directory of the OpenSMART User
In this document we assume this directory (that CAN be
anywhere in the directory tree) to be
/home/osmart/.
/home/osmart/etc : Configuration files for
OpenSMART
/home/osmart/bin : Scripts and executables for
OpenSMART
/home/osmart/cgi-bin : cgi-scripts for
OpenSMART. These are symlinks to the bin-directory.
/home/osmart/log log files for OpenSMART
/home/osmart/lib : Here are the Perl modules
which are not installed to the system libraries, e.g. the
OpenSMART::* - modules and some foreign "Perl
only" libraries, which will be provided with
OpenSMART.
/home/osmart/lib/OpenSMART : Here are the
OpenSMART-modules.
Take a nightly build, a CVS snapshot or the server release file, untar it anywhere and run as osmart-user:
osmart@pculi:~/tmp$ /usr/bin/perl source/server/install_server ~osmart
Caution: Use the correct absolute path to your perl installation.
install_server takes your
#OSMART_ROOT#-directory as argument, creates
all the necessary directories and copies all needed files to the
right place with the right rights.
You have to configure your web server to run cgi-scripts in
/home/osmart/cgi-bin/ (if you have OpenSMART
installed in /home/osmart/). In this chapter
this is exemplary explained for Apache 1.3 and Apache 2.0.
This paragraph describes the setup for a virtual host on a apache-1.3/2.0 installation. If you don't want a own virtual host on your web server, you haven't to, but then you have to adopt these parameters.
Choose a name for your virtual OpenSMART-Host and put
it in your DNS or /etc/hosts. In this
example we use the name opensmart.company.com, that the
OpenSMART user id is osmart and that the home directory (and
the #OSMART_ROOT#) is
/home/osmart.
Put this configuration file in your Apache
configuration directory (that is: the directory where your
httpd.conf lives.)
# osmart.apache.conf
<VirtualHost osmart.company.com>
ServerName osmart.company.com
ErrorLog /var/log/apache/osmart-error.log
CustomLog /var/log/apache/osmart-access.log common
DocumentRoot /home/osmart/htdocs
ScriptAlias /cgi-bin /home/osmart/cgi-bin/
<Directory /home/osmart/cgi-bin>
Options +ExecCGI +FollowSymlinks
Order allow,deny
Allow from all
</Directory>
<Directory /home/osmart/htdocs/deployment>
Order allow,deny
Allow from all
Header set Cache-Control no-cache
Options +Indexes
</Directory>
<Directory /home/osmart/htdocs/conf>
Order allow,deny
Allow from all
Header set Cache-Control no-cache
Options +Indexes
</Directory>
</VirtualHost>
To customise the different entries, look at the apache manual
Put a line like include
osmart.apache.conf in your
httpd.conf (e.g. as the last line)
Maybe you have to load
mod_headers in your
httpd.conf.
Restart your Apache
This paragraph describes the setup for a secured OpenSMART environment. This is the usal setup for an medium-sized, multi user / cusomer environment.
How does it work:
You have a security provider (in our example it is Apache
with Basic-Auth), which does the real authentification dialog
with a user. When a user passed the security of our webserver,
each request have the variable called
REMOTE_USER in its header. This variable is
parsed by the OpenSMART frontend which maps these authenticated
user to a local user defined in OpenSMART.
By default, the following users are created:
OpenSMART administrator (userid:
admin)
This is the super user with all rights and privileges
of the whole system. This user is in the
operator group
Default password of shipped htaccess: admin_change
OpenSMART manager (userid:
manager)
This is the super user with all rights and privileges
of the whole system. This user is in the
manager group
Default password of shipped htaccess: manager_change
OpenSMART operator (userid:
operator)
operator have full permissions to view to the monitoring/reporting frontend, but can't do changes in config frontend and is not able to deploy new OpenSMART versions
Default password of shipped htaccess: operator_change
OpenSMART customer (userid:
customer)
customer have only the ability to view a lite version of the monitorgui with exactly one default filter
Default password of shipped htaccess: customer_change
![]() | Important |
|---|---|
the |
New users can be added config frontend in menue . The permissions of the default users can be changed there, too.
The following steps have to be done:
configure your virtual host in your apache configuration like this
# osmart.apache.conf
<VirtualHost osmart.company.com>
ServerName osmart.company.com
ErrorLog /var/log/apache/osmart-error.log
CustomLog /var/log/apache/osmart-access.log common
DocumentRoot /home/osmart/htdocs
ScriptAlias /cgi-bin /home/osmart/cgi-bin/
<Directory /home/osmart/cgi-bin>
Options +ExecCGI +FollowSymlinks
Order allow,deny
Allow from all
</Directory>
<Directory /home/osmart/htdocs/deployment>
Order allow,deny
Allow from all
Header set Cache-Control no-cache
Options +Indexes
</Directory>
<Directory /home/osmart/htdocs/conf>
Order allow,deny
Allow from all
Header set Cache-Control no-cache
Options +Indexes
</Directory>
<Files monitorgui.cgi>
AuthType Basic
AuthName "authentication for monitorgui is required"
AuthUserFile /home/osmart/etc/htpasswd
Require valid-user
</Files>
<Files sla-reporting.cgi>
AuthType Basic
AuthName "authentication for reporting is required"
AuthUserFile /home/osmart/etc/htpasswd
Require valid-user
</Files>
<Files deploygui.cgi>
AuthType Basic
AuthName "authentication for deploygui is required"
AuthUserFile /home/osmart/etc/htpasswd
Require valid-user
</Files>
<Files configgui.cgi>
AuthType Basic
AuthName "authentication for configgui is required"
AuthUserFile /home/osmart/etc/htpasswd
Require valid-user
</Files>
</VirtualHost>
Put a line like include
osmart.apache.conf in your
httpd.conf (e.g. as the last line)
Maybe you have to load
mod_headers or/and
mod_perl in your
httpd.conf
![]() | Tip |
|---|---|
to improve performance and reduce CPU utilisation use mod_perl. How to configure OpenSMART with mod_perl can be found at Configure mod_perl for OpenSMART |
Restart your Apache
![]() | Note |
|---|---|
If your setup is not working proberbly or you get error
messages from OpenSMART look at |
You can use different databases with OpenSMART. You have to configure just one for use with OpenSMART !
create a database and a database user for OpenSMART. In this text, we assume "osmart" as user id.
Start your database frontend as database user
"osmart" and run the
createdb_xxx.sql for your database in it. You can
find these scripts in
/home/osmart/install (if you have OpenSMART
installed in /home/osmart/).
Edit
/home/osmart/etc/opensmart.db.config (if you have
OpenSMART installed in /home/osmart/).
Add your database driver, database user id and database
password.
A complete description for MySQL can you find here: Section 12.1.2, “MySQL and OpenSMART”.
A complete description for PostgreSQL can you find here: Section 12.1.1, “PostgreSQL and OpenSMART”.
A complete description for Oracle as backend can you find here: Section 12.1.3, “Oracle and OpenSMART”.
A complete description for DB2 as backend can be found here: Section 12.1.4, “DB2 and OpenSMART”.
Decide where to go from here.
The binaries are installed by
install_server. Just make
/home/osmart/htdocs/deployment/ available through your
web server as
"http://opensmart.company.com/deployment/".
Decide where to go from here.
Look in Section 3.11, “Logging with Log4perl ” for examples.
If your OpenSMART-installation is running as CGI scripts, you can run them inside mod_perl, too. mod_perl is just available for apache.
First, install mod_perl like described on mod_perl homepage.
Just monitorgui.cgi,
deploymentcgi.pl and
collectorcgi.pl support mod_perl. To configure this,
add something like
<Files monitorgui.cgi> SetHandler perl-script PerlHandler ModPerl::Registry Options ExecCGI PerlOptions +ParseHeaders +GlobalRequest </Files> <Files deploymentcgi.pl> SetHandler perl-script PerlHandler ModPerl::Registry Options ExecCGI PerlOptions +ParseHeaders +GlobalRequest </Files> <Files collectorcgi.pl> SetHandler perl-script PerlHandler ModPerl::Registry Options ExecCGI PerlOptions +ParseHeaders +GlobalRequest </Files> PerlSwitches -T PerlRequire /home/osmart/cgi-bin/startup_opensmart.pl
to your apache config file.
The startup_opensmart.pl has to look
like this:
use lib qw(/home/osmart/lib /home/osmart/etc); 1;
After that, restart Apache and try it out!
With OpenSMART 1.1 you are able to map Apache's user
(authenticated with "Basic Auth", for example) with a
default monitor filter. To do this, look at the
#OSMART_ROOT#/etc/gui.user.mapping.example and edit
that it fits your configured username in your .htaccess. After
that, copy the
#OSMART_ROOT#/etc/gui.user.mapping.example to
#OSMART_ROOT#/etc/gui.user.mapping and try
the monitorgui with the configured username/password.
Take a nightly build, a CVS snapshot or the server release file, untar it anywhere and run as osmart-user:
osmart@pculi:~/tmp$ /usr/bin/perl documentation/install_docs ~osmart
install_docs takes your
#OSMART_ROOT#-directory as argument, creates
all the necessary directories and copies all needed files to the
right place with the right rights.