468x60 Ads

Showing posts with label Tools. Show all posts
Showing posts with label Tools. Show all posts

Friday, September 28, 2012

Installing Cacti on Solaris 10 (PART-2)


Install Cacti:

You can download latest version of cacti from http://cactiusers.org/  website
 Eg: cacti-plugin-0.8.7g-PA-v2.9.tar

Unzip file and rename it to cacti.
Copy cacti folder into /htdocs directory

Eg:

Change appropriate access permissions
Setup databases for cacti:
  1. Create the MySQL database:
  1. Import the default cacti database:
  1. Optional: Create a MySQL username and password for Cacti.
mysql> GRANT ALL ON cacti.* TO cactiuser@localhost IDENTIFIED BY 'somepassword';
mysql> flush privileges;
  1. Edit include/config.php and specify the database type, name, host, user and password for your Cacti configuration.
$database_type = "mysql";
$database_default = "cacti";
$database_hostname = "localhost";
$database_username = "cactiuser";
$database_password = "cacti";
  1. Set the appropriate permissions on cacti's directories for graph and log. You should execute these commands from inside cacti's directory to change the permissions.
  1. Add a line to your /etc/crontab file similar to: for 5 minute cron intervals
If you are going to edit crontab using command shell:(solaris 10)

bash-3.2# crontab –e
0,5,10,15,20,25,30,35,40,45,50,55 * * * *   /usr/local/php/bin/php /usr/local/apache2/htdocs/cacti/poller.php --force >/dev/null 2>&1

(for wethermap):(solaris 10)

0,5,10,15,20,25,30,35,40,45,50,55 * * * *  /usr/local/php/bin/php  /var/apache2/htdocs/cacti/plugins/weathermap/weathermap-cacti-rebuild.php



01:Go to your browser and your local host or your cacti installed matching IP 

 http://172.16.0.1/cacti
or
 http://127.0.0.1/cacti
 02: Select new install if you are installing cacti at first time:
03:If you setup and install all necessary packages that need to run Cacti in this window it will indicate all the paths in green color:
if it's indicated in red color please check the paths and correct them or check in you install all the necessary plugging and running them perfectly. 


04: Login by default username and password admin:admin:

05: It will force you to change default password for admin login:




We can use Plugin Architecture (PIA) for installing additional useful plugins with Cacti.
There are two ways of install the Plugin Architecture. The first way is by using the patch files.

A patch file contains the difference between the original files and the “new” files, which makes them very small as they only contain exactly what we need to make the changes.

The other way is by using the pre-patched full files. These files are the full install of the necessary files.

Copy the files from the “files-0.8.7g” directory to your Cacti install directory, overriding any files if you are prompted.

Edit “include/config.php” and specify the database type, name, host, user and password for your Cacti configuration.

$database_type = "mysql";
$database_default = "cacti";
$database_hostname = "localhost";
$database_username = "cactiuser";
$database_password = "cactiuser";
 
/* load up old style plugins here */
$plugins = array();
//$plugins[] = 'thold';
 
/*
   Edit this to point to the default URL of your Cacti install
   ex: if your cacti install as at http://serverip/cacti/ this
   would be set to /cacti/
*/
$url_path = "/cacti/";
 
/* Default session name - Session name must contain alpha characters */
#$cacti_session_name = "Cacti";

Installing Plugins:

You can download plugin and add them under the folder plugins and add the plugin name in include/config.php  
Eg:
$plugins = array();
$plugins[] = 'thold';
$plugins[] = 'watermark'; 
$plugins[] = 'realtime';


then you can manage plugins through cacti.


To provide access to Plugin Management go to User Management and select the user in question. The Realm Permission tab will shows like this






Finally you can install/unstill/active/inactive those plugins: