General:Installation

From Wiki_dbSQWare
Revision as of 22:37, 5 April 2014 by Expdbtools (talk | contribs)
Jump to: navigation, search

Install sources of all modules on focal point

Before install

You must install on an Unix/Linux platform only (CentOS or RedHat are good).
The unix user must have /bin/ksh as shell (no bash !).
Install a MySQL instance (>=5.1), create a database and a user for the repository.
Provide between 500 Mb and 1 Gb for 100 managed instances ...
Exemple of commands:

create database dbsqware_db;
grant all privileges on dbsqware_db.* to 'dbsqware_user'@'localhost' identified by 'dbSQWareMysPwd' with grant option;
grant all privileges on dbsqware_db.* to 'dbsqware_user'@'%' identified by 'dbSQWareMysPwd' with grant option;
flush privileges;

Install apache (>=2.2) with PHP 5.3 (with support of mysqli).

Prepare archive file of all modules

You must install on an Unix/Linux platform only.
Create a unix user (dbsqware) in dba group with /bin/ksh as shell (no bash !).

su -
#Add unix group
groupadd dba
##To fix gid ...
groupadd -g 500 dba
#Add unix user
useradd -g dba -s /bin/ksh -d /home/dbsqware dbsqware
##To fix uid ...
useradd -u 501 -g dba -s /bin/ksh -d /home/dbsqware dbsqware
#Change owner
chown dbsqware:dba /home/dbsqware
#Add password to user
passwd dbsqware

Download dbSQWare™ archive from Download the latest stable versions

#Move tgz of lastest full version
su - dbsqware
cp ~/downloads/dbSQWare_full_*.tgz $HOME/.

Extract archive of all modules

su - dbsqware
#gunzip and extract archive of all modules
cd $HOME
gunzip -c dbSQWare_full_*.tgz |tar -xvf -

#Delete archive file
rm -f $HOME/dbSQWare_full_*.tgz

You must have:

$ ls -l
total 16
lrwxrwxrwx  1 dbsqware dba   24 20xx-04-05 18:12 generic -> SQWareProduction/generic
drwxr-x--- 13 dbsqware dba 4096 20xx-04-05 18:11 SQWareCentral
drwxr-x--- 10 dbsqware dba 4096 20xx-04-05 18:11 SQWareProduction
drwxr-x--- 11 dbsqware dba 4096 20xx-04-05 18:11 SQWareRepository
drwxr-x--- 10 dbsqware dba 4096 20xx-04-05 18:11 SQWareWeb

Modules configuration

SQWareRepository

If you want use the full capability of dbSQWare, you have to install it.
If you don't install SQWareRepository you can't use SQWareCentral nor SQWareWeb.
Make all actions with dbsqware unix user.

Configure SQWareRepository credentials

Create custom configuration file:

grep '^export gvsqw_' $HOME/dbSQWare/SQWareProduction/generic/etc/sqwgen_DbRefVar.cfg \
> $HOME/dbSQWare/SQWareProduction/generic/etc_cust/sqwgen_DbRefVar.cfg

Put custom parameters:

cat $HOME/dbSQWare/SQWareProduction/generic/etc_cust/sqwgen_DbRefVar.cfg
export gvsqw_DbRefPort='3306'
export gvsqw_DbRefHost='SQWareRepositoryHost'
export gvsqw_DbRefDatabase='dbsqware_db'
export gvsqw_DbRefUser='dbsqware_user'
export gvsqw_DbRefPass='dbSQWareMysPwd'

Install SQWareRepository

Install MySQL schema for SQWareRepository:

$HOME/dbSQWare/SQWareCentral/menu/sqwctl_InstallFullRepository.ksh

SQWareCentral

It's the focal point of dbSQWare.
You must install SQWareRepository before installing SQWareCentral.

SQWareCentral environnement

Put variable gvsqw_SQWareCentralPath into your .profile and source of SQWareCentral environnement.

$ cat /home/dbsqware/.profile
export gvsqw_Env='PRD'
export gvsqw_SQWareCentralPath=$HOME/dbSQWare/SQWareCentral
export gvsqw_SQWareProductionPath=$HOME/dbSQWare/SQWareProduction
. $gvsqw_SQWareCentralPath/etc/.profile

Reload your .profile:

. $HOME/.profile

Customize variables for your own environnement !
To customize variables contain in $HOME/dbSQWare/SQWareProduction/generic/etc/sqwgen_GlobalVar.cfg,
put them into $HOME/dbSQWare/SQWareProduction/generic/etc_cust/sqwgen_GlobalVar.cfg.
In general case, you just have to customize gvsqw_GlobalMail (email adress to send report).
For help on sqwgen_GlobalVar.cfg

SQWareCentral automation

You can put in place some jobs in crontab to automate glogal tasks. Take in example the file $SQWareCentralPath/etc/CrontabRef.cfg:

###########################
## mm(0-59) hh(0-23) dd(1-31) MM(0-12) DAY(0-sunday, 1-monday, ...) command
## Generic cron for SQWareCentral
############
# Generate all ref files (RefFileInstances,RefFileDb,RefFileCMDB,...)
00 02,08    * * * ksh -c '. ~/.profile 2>&1 >/dev/null;$gvsqw_SQWareCentralPath/bin/sqwctl_GenRef_AllFiles.ksh 2>&1 >$HOME/admin/SQWareCentral/logs/sqwctl_GenRef_AllFiles.log'
# Check indicators
00 07       * * * ksh -c '. ~/.profile 2>&1 >/dev/null;$gvsqw_SQWareCentralPath/bin/sqwctl_CheckIndicators.ksh 2>&1 >$HOME/admin/SQWareCentral/logs/sqwctl_CheckIndicators.log'
# Gather indicators
00 03       * * * ksh -c '. ~/.profile 2>&1 >/dev/null;$gvsqw_SQWareCentralPath/bin/sqwctl_GatherIndicators.ksh 2>&1 >$HOME/admin/SQWareCentral/logs/sqwctl_GatherIndicators.log'
# Retry gather indicators if not exists
00 09,12,17 * * * ksh -c '. ~/.profile 2>&1 >/dev/null;$gvsqw_SQWareCentralPath/bin/sqwctl_GatherIndicators.ksh Repind 2>&1 >$HOME/admin/SQWareCentral/logs/sqwctl_GatherIndicators_Repind.log'
# Check started instances Oracle
00 06       * * * ksh -c '. ~/.profile 2>&1 >/dev/null;$gvsqw_SQWareCentralPath/bin/sqwctl_TrtAuto.ksh -T oracle -A sqwora_StartedInstancesOn.ksh -F GenLstUniqueOn -Exec 2>&1 >$HOME/admin/SQWareCentral/logs/StartedInstancesOracle.log'

SQWareWeb

You must install on an Unix/Linux platform only.
SQWareWeb works with apache >=2.2, PHP 5.3 with mysqli support, install these.

SQWareWeb core

Copy SQWareWeb from the focal point ~/dbSQWare/SQWareWeb in your web environnement ~/SQWareWeb.
Make a link to current version (change this link to upgrade version).

cd ~/SQWareWeb
ln -s v1.2 prod

Configure your httpd.conf (change ~ by your directory):

<Directory "~/SQWareWeb/prod">
   Options Indexes FollowSymLinks
   AllowOverride all
   Order allow,deny
   Allow from all
</Directory>
DocumentRoot ~/SQWareWeb/prod

Customize SQWareWeb menu and icon:

#Put the default configuration in place
cp -rp ~/SQWareWeb/custom_ref/* ~/SQWareWeb/custom/.

#Customize your icon in ~/SQWareWeb/custom/images/client.png

#Customize your home page
vi ~/SQWareWeb/custom/index.html

#Customize menu to show/hide RDBMS (put ; on beginning of the line)
vi ~/SQWareWeb/custom/menu.ini


SQWareWeb for Oracle

Install an Oracle client and relink or compile PHP to recognize it.

Configure connection string to SQWareRepository in :

  • ~/SQWareWeb/custom/menu.ini
  • ~/SQWareWeb/custom/oracle/common.ini

The user can only have 'select' right on SQWareRepository.

SQWareWeb for Sybase

Install an Sybase client and relink or compile PHP to recognize it.

Configure connection string to SQWareRepository in :

  • ~/SQWareWeb/custom/menu.ini
  • ~/SQWareWeb/custom/sybase/common.ini

The user can only have 'select' right on SQWareRepository.

SQWareWeb for Mssql

Install an Mssql client and relink or compile PHP to recognize it.

Configure connection string to SQWareRepository in :

  • ~/SQWareWeb/custom/menu.ini
  • ~/SQWareWeb/custom/mssql/common.ini

The user can only have 'select' right on SQWareRepository.

SQWareWeb for Mysql

Install an Mysql client and relink or compile PHP to recognize it.

Configure connection string to SQWareRepository in :

  • ~/SQWareWeb/custom/menu.ini
  • ~/SQWareWeb/custom/mysql/common.ini

The user can only have 'select' right on SQWareRepository.

SQWareWeb for Ingres

Install an MySql client and relink or compile PHP to recognize it.

Configure connection string to SQWareRepository in :

  • ~/SQWareWeb/custom/menu.ini
  • ~/SQWareWeb/custom/ingres/common.ini

The user can only have 'select' right on SQWareRepository.


SQWareProduction

You have to configure this module on the focal point and deploy it with SQWareCentral command on all your hosts.

SQWareProduction for Oracle

You have to customize SQWareProduction for Oracle on the focal point $HOME/dbSQWare/SQWareProduction/oracle/*.

Variables customization

Customize if necessary variables contain in $HOME/dbSQWare/SQWareProduction/oracle/etc/sqwora_GlobalVar.cfg,
put them into $HOME/dbSQWare/SQWareProduction/oracle/etc_cust/sqwora_GlobalVar.cfg.
For help on sqwora_GlobalVar.cfg

Deployement

After that, you can deploy SQWareProduction for Oracle on all your hosts.
Attention, you must have install rsync on all your hosts.
SQWareProduction for Oracle will be deploy in ~$gvsqw_UserUnique/SQWareProduction/oracle

#Use SQWareCentral
depl_ora

To be able to deploy SQWareProduction, you must set up the SSH public key of user which you have installed SQWareCentral into ~/.ssh/authorized_keys of $gvsqw_UserUnique on all Oracle hosts.

Users customization

You must install on an Unix/Linux platform only.
The unix user must have /bin/ksh as shell. User must also have access to a MySQL client (to load indicators).
Put these lines in .profile of user that own instance (change ~$gvsqw_UserUnique).

export gvsqw_OraBin=~$gvsqw_UserUnique/SQWareProduction/oracle/bin
lvsqw_IsTerminal=$(tty 2>&1 >/dev/null;echo $?)
if [ "$lvsqw_IsTerminal" = "0" ] && [ -r $gvsqw_OraBin/../etc/.profile_confort ]
then
   . $gvsqw_OraBin/../etc/.profile_confort
fi
Test your environnement

To test your new environnement:

#reload your profile
. ~/.profile
#to go in SQWareProduction scripts
bin
#to see your customizations
cetc

To check if connection to SQWareRepository is OK for SQWareProduction:

#to go in SQWareProduction scripts
bin
#gather indicators
./sqwora_GatherIndicators.ksh -I $ORACLE_SID

The command should gather indicator and insert it in SQWareRepository.

SQWareProduction for Sybase

You have to customize SQWareProduction for Sybase on the focal point $HOME/dbSQWare/SQWareProduction/sybase/*.

Variables customization

Customize if necessary variables contain in $HOME/dbSQWare/SQWareProduction/sybase/etc/sqwsyb_GlobalVar.cfg,
put them into $HOME/dbSQWare/SQWareProduction/sybase/etc_cust/sqwsyb_GlobalVar.cfg.
For help on sqwsyb_GlobalVar.cfg

Deployement

After that, you can deploy SQWareProduction for Sybase on all your hosts.
Attention, you must have install rsync on all your hosts.
SQWareProduction for Sybase will be deploy in ~$gvsqw_UserUnique/SQWareProduction/sybase

#Use SQWareCentral
depl_syb

To be able to deploy SQWareProduction, you must set up the SSH public key of user which you have installed SQWareCentral into ~/.ssh/authorized_keys of $gvsqw_UserUnique on all Sybase hosts.

Users customization

You must install on an Unix/Linux platform only.
The unix user must have /bin/ksh as shell. User must also have access to a MySQL client (to load indicators).
Put these lines in .profile of user that own instance (change ~$gvsqw_UserUnique).

export gvsqw_SybBin=~$gvsqw_UserUnique/SQWareProduction/sybase/bin
lvsqw_IsTerminal=$(tty 2>&1 >/dev/null;echo $?)
if [ "$lvsqw_IsTerminal" = "0" ] && [ -r $gvsqw_SybBin/../etc/.profile_confort ]
then
   . $gvsqw_SybBin/../etc/.profile_confort
fi
Test your environnement

To test your new environnement:

#reload your profile
. ~/.profile
#to go in SQWareProduction scripts
bin
#to see your customizations
cetc

To check if connection to SQWareRepository is OK for SQWareProduction:

#to go in SQWareProduction scripts
bin
#gather indicators
./sqwsyb_GatherIndicators.ksh -S $DSQUERY

The command should gather indicator and insert it in SQWareRepository.

SQWareProduction for Mssql

You have to customize SQWareProduction for Mssql on the focal point $HOME/dbSQWare/SQWareProduction/mssql/*.

Variables customization

Customize if necessary variables contain in $HOME/dbSQWare/SQWareProduction/mssql/etc/sqwmsq_GlobalVar.cfg,
put them into $HOME/dbSQWare/SQWareProduction/mssql/etc_cust/sqwmsq_GlobalVar.cfg.
For help on sqwmsq_GlobalVar.cfg

Deployement

After that, you can deploy SQWareProduction for Mssql on all your hosts.
Attention, you must have install rsync on all your hosts.
SQWareProduction for Mssql will be deploy in ~$gvsqw_UserUnique/SQWareProduction/mssql

#Use SQWareCentral
depl_msq

To be able to deploy SQWareProduction, you must set up the SSH public key of user which you have installed SQWareCentral into ~/.ssh/authorized_keys of $gvsqw_UserUnique on all Mssql hosts.

Users customization

You must install on an Unix/Linux platform only.
The unix user must have /bin/ksh as shell. User must also have access to a MySQL client (to load indicators).
Put these lines in .profile of user that own instance (change ~$gvsqw_UserUnique).

export gvsqw_MsqBin=~$gvsqw_UserUnique/SQWareProduction/mssql/bin
lvsqw_IsTerminal=$(tty 2>&1 >/dev/null;echo $?)
if [ "$lvsqw_IsTerminal" = "0" ] && [ -r $gvsqw_MsqBin/../etc/.profile_confort ]
then
   . $gvsqw_MsqBin/../etc/.profile_confort
fi
Test your environnement

To test your new environnement:

#reload your profile
. ~/.profile
#to go in SQWareProduction scripts
bin
#to see your customizations
cetc

To check if connection to SQWareRepository is OK for SQWareProduction:

#to go in SQWareProduction scripts
bin
#gather indicators
./sqwmsq_GatherIndicators.ksh -S $AliasFreeTds

The command should gather indicator and insert it in SQWareRepository.

SQWareProduction for Mysql

You have to customize SQWareProduction for Mysql on the focal point $HOME/dbSQWare/SQWareProduction/mysql/*.

Variables customization

Customize if necessary variables contain in $HOME/dbSQWare/SQWareProduction/mysql/etc/sqwmys_GlobalVar.cfg,
put them into $HOME/dbSQWare/SQWareProduction/mysql/etc_cust/sqwmys_GlobalVar.cfg.
For help on sqwmys_GlobalVar.cfg

Deployement

After that, you can deploy SQWareProduction for Mysql on all your hosts.
Attention, you must have install rsync on all your hosts.
SQWareProduction for Mysql will be deploy in ~$gvsqw_UserUnique/SQWareProduction/mysql

#Use SQWareCentral
depl_mys

To be able to deploy SQWareProduction, you must set up the SSH public key of user which you have installed SQWareCentral into ~/.ssh/authorized_keys of $gvsqw_UserUnique on all Mysql hosts.

Users customization

You must install on an Unix/Linux platform only.
The unix user must have /bin/ksh as shell. User must also have access to a MySQL client (to load indicators).
Put these lines in .profile of user that own instance (change ~$gvsqw_UserUnique).

export gvsqw_MysBin=~$gvsqw_UserUnique/SQWareProduction/mysql/bin
lvsqw_IsTerminal=$(tty 2>&1 >/dev/null;echo $?)
if [ "$lvsqw_IsTerminal" = "0" ] && [ -r $gvsqw_MysBin/../etc/.profile_confort ]
then
   . $gvsqw_MysBin/../etc/.profile_confort
fi
Test your environnement

To test your new environnement:

#reload your profile
. ~/.profile
#to go in SQWareProduction scripts
bin
#to see your customizations
cetc

To check if connection to SQWareRepository is OK for SQWareProduction:

#to go in SQWareProduction scripts
bin
#gather indicators
./sqwmys_GatherIndicators.ksh -I $MYSQL_SID

The command should gather indicator and insert it in SQWareRepository.

SQWareProduction for Ingres

You have to customize SQWareProduction for Ingres on the focal point $HOME/dbSQWare/SQWareProduction/ingres/*.

Variables customization

Customize if necessary variables contain in $HOME/dbSQWare/SQWareProduction/ingres/etc/sqwing_GlobalVar.cfg,
put them into $HOME/dbSQWare/SQWareProduction/ingres/etc_cust/sqwing_GlobalVar.cfg.
For help on sqwing_GlobalVar.cfg

Deployement

After that, you can deploy SQWareProduction for Ingres on all your hosts.
Attention, you must have install rsync on all your hosts.
SQWareProduction for Ingres will be deploy in ~$gvsqw_UserUnique/SQWareProduction/ingres

#Use SQWareCentral
depl_ing

To be able to deploy SQWareProduction, you must set up the SSH public key of user which you have installed SQWareCentral into ~/.ssh/authorized_keys of $gvsqw_UserUnique on all Ingres hosts.

Users customization

You must install on an Unix/Linux platform only.
The unix user must have /bin/ksh as shell. User must also have access to a MySQL client (to load indicators).
Put these lines in .profile of user that own instance (change ~$gvsqw_UserUnique).

export gvsqw_IngBin=~$gvsqw_UserUnique/SQWareProduction/ingres/bin
lvsqw_IsTerminal=$(tty 2>&1 >/dev/null;echo $?)
if [ "$lvsqw_IsTerminal" = "0" ] && [ -r $gvsqw_IngBin/../etc/.profile_confort ]
then
   . $gvsqw_IngBin/../etc/.profile_confort
fi
Test your environnement

To test your new environnement:

#reload your profile
. ~/.profile
#to go in SQWareProduction scripts
bin
#to see your customizations
cetc

To check if connection to SQWareRepository is OK for SQWareProduction:

#to go in SQWareProduction scripts
bin
#gather indicators
./sqwing_GatherIndicators.ksh -I $INGRES_SID

The command should gather indicator and insert it in SQWareRepository.