[HOWTO] install cacti-0.8.7e on Suse11.2-200912

If you figure out how to do something interesting/cool in Cacti and want to share it with the community, please post your experience here.

Moderators: Developers, Moderators

Post Reply
chuaijd
Posts: 1
Joined: Sun Dec 27, 2009 9:56 pm

[HOWTO] install cacti-0.8.7e on Suse11.2-200912

Post by chuaijd »

preinstall these software packets gcc/gcc-c++/patch/make,can use yast2.


groupadd mysql
useradd -g mysql -d /usr/local/mysql/data -M mysql

tar -zxvf mysql-5.1.40.tar.gz
cd mysql-5.1.40
./configure --prefix=/usr/local/mysql --sysconfdir=/etc --localstatedir=/usr/local/mysql/data --enable-assembler --with-mysqld-ldflags=-all-static --with-charset=utf8 --with-extra-charsets=all
make
make install

cp support-files/my-small.cnf /etc/my.cnf
chown root /etc/my.cnf
chgrp root /etc/my.cnf
chmod 644 /etc/my.cnf
vi /etc/my.cnf
[mysqld]
user = mysql

/usr/local/mysql/bin/mysql_install_db
chown -R mysql:mysql /usr/local/mysql/data

/usr/local/mysql/bin/mysqld_safe --user=mysql &
/usr/local/mysql/bin/mysqladmin version

/usr/local/mysql/bin/mysql -u root
DELETE FROM mysql.user WHERE User = '';
FLUSH PRIVILEGES;
SELECT Host, User FROM mysql.user;
SET PASSWORD FOR 'root'@'localhost' = PASSWORD('xxx');
SET PASSWORD FOR 'root'@'host_name' = PASSWORD('xxx');
quit

/usr/local/mysql/bin/mysqladmin -u root -p shutdown
/usr/local/mysql/bin/mysqld_safe --user=mysql &

cd /usr/local/src/mysql-5.1.40/
cp support-files/mysql.server /etc/init.d/mysql
chmod 755 /etc/init.d/mysql
chkconfig --add mysql
chkconfig --level 35 mysql on



groupadd www
useradd -g www apache2
tar -jxvf httpd-2.2.14.tar.bz2
cd httpd-2.2.14/
./configure --prefix=/usr/local/apache2 --enable-so --with-included-apr
make
make install

vi /usr/local/apache2/conf/httpd.conf

chown -R apache2:www /opt/www
chmod -R 775 /opt/www

/usr/local/apache2/bin/apachectl start
/usr/local/apache2/bin/apachectl stop

cp /usr/local/apache2/bin/apachectl /etc/init.d
chmod 755 /etc/init.d/apachectl
chkconfig --add apachectl
chkconfig --level 35 apachectl on



tar -jxvf php-5.3.0.tar.bz2
cd php-5.3.0/
./configure --prefix=/usr/local/php --with-apxs2=/usr/local/apache2/bin/apxs --with-mysql=/usr/local/mysql --enable-sockets
make
make install

cd /usr/local/src/php-5.3.0/
cp ./php.ini-production /usr/local/php/lib/php.ini






cd /opt/www/
tar -zxvf cacti-0.8.7e.tar.gz
ln -s cacti-0.8.7e cacti
groupadd cacti
useradd -g cacti -G www cactiuser
/usr/local/mysql/bin/mysql -u root -p
create database cactidb;
grant all on cactidb.* to root;
grant all on cactidb.* to root@localhost;
grant all on cactidb.* to cactiuser;
grant all on cactidb.* to cactiuser@localhost;
set password for cactiuser@localhost=password('xxx');
exit

mkdir /usr/local/src/cactiplugin
cd /usr/local/src/cactiplugin
wget http://mirror.cactiusers.org/downloads/ ... A-v2.5.zip
unzip cacti-plugin-0.8.7e-PA-v2.5.zip
cp -R ./* /opt/www/cacti/
cd /opt/www/cacti/
/usr/local/mysql/bin/mysql -ucactiuser -p cactidb < pa.sql
patch -p1 -N --dry-run < cacti-plugin-0.8.7e-PA-v2.5.diff
patch -p1 -N < cacti-plugin-0.8.7e-PA-v2.5.diff
vim include/global.php
$config['url_path'] = '/cacti/';

/usr/local/mysql/bin/mysql -u root -p cactidb<cacti.sql

chown -R cactiuser:cacti /opt/www/cacti*
cd include
vi config.php
$database_defaut = “cactidb”;
$database_hostname = “localhost”;
$database_username = “cactiuser”;
$database_password = “cactipw”;

crontab -u cactiuser -e
*/5 * * * * cactiuser /usr/local/php/bin/php /opt/www/cacti/poller.php > /dev/null 2>&1


~user internet browser, URL:http://ip-address/cacti
~install cacti
~modify user "admin", check "Plugin Management"


cd /opt/www/cacti/plugins
wget http://mirror.cactiusers.org/downloads/ ... 0.5.tar.gz
tar zxvf settings-0.5.tar.gz
wget http://mirror.cactiusers.org/downloads/ ... 4.1.tar.gz
tar zxvf thold-0.4.1.tar.gz
wget http://cactiusers.org/downloads/monitor-0.8.2.tar.gz
tar zxvf monitor-0.8.2.tar.gz
chown -R cactiuser:cacti /opt/www/cacti/plugins

vim ../include/global.php
~Append after $plugins = array();
$plugins[] = 'thold';
$plugins[] = 'settings';
$plugins[] = 'monitor';

~Monitor Plugins
~Console->Settings->Misc,checkon "Show Icon Legend","View" choose "Tiles"
~Device->checkon "Monitor Host"
~modify user "admin", check "View Monitoring "

~Thold Plugins
~Console->Settings->Mail/DNS, test email config
~Console->Settings->Alerting/Thold
~Templates->Threshold Templates
~Create->New Graphs,Auto-create thresholds,Management->Thresholds

hope usefull to ones who need
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest