1. Install Apache Web Server with PHP support in Ubuntu Server
root@ovick:/# apt-get install apache2 apache2-mpm-prefork apache2-utils
root@ovick:/# apt-get install libapache2-mod-php5 php5-cli php5-common php5-cgi php5-gd
2. Install Mysql Server with php Support
root@ovick:/# apt-get install mysql-server mysql-client libmysqlclient-dev
root@ovick:/# apt-get install php5-mysql phpmyadmin
Other Dependencies Installation
root@ovick:/# apt-get install make gcc g++ build-essential
root@ovick:/# apt-get install cgilib libttf-dev libttf2 libpngwriter0-dev libpng12-dev libfreetype6-dev libart-2.0-dev snmp snmpd
edit the snmp community name and rights
ex: snmpd.conf
#####################################################
# sec.name source community
com2sec local localhost public
com2sec mynetwork 192.168.4.0/29 public
####
# Second, map the security names into group names:
# sec.model sec.name
group MyRWGroup v1 local
group MyRWGroup v2c local
group MyRWGroup usm local
group MyROGroup v1 mynetwork
group MyROGroup v2c mynetwork
group MyROGroup usm mynetwork
# Third, create a view for us to let the groups have rights to:
# incl/excl subtree mask
view all included .1 80
####
# Finally, grant the 2 groups access to the 1 view with different
# write permissions:
# context sec.model sec.level match read write notif
access MyROGroup "" any noauth exact all none none
access MyRWGroup "" any noauth exact all all none
access MyGroup "" any noauth exact all all none
# System contact information
syslocation Ubuntu-ku
syscontact System Ovick
################################################
setelah edit snmpd.conf renstart service nya
root@ovick:/# /etc/init.d/snmpd restart
Untuk mengetes snmp nya :
root@ovick:/# snmpwalk -v1 -c public localhost
3. Install RRD Tool From Source Download rddtool yang terbaru
root@ovick:/# cd /usr/local/bin
root@ovick:/# wget http://oss.oetiker.ch/rrdtool/pub/rrdtool.tar.gz
root@ovick:/# tar xfvz rrdtool.tar.gz
root@ovick:/# rm rrdtool.tar.gz
root@ovick:/# cd rrdtool-1.2.23
root@ovick:/# ./configure
root@ovick:/# make
root@ovick:/# make install
3. Installing Cacti From Source
root@ovick:/# cd /var/www/
root@ovick:/# wget http://www.cacti.net/downloads/cacti-0.8.6j.tar.gz
root@ovick:/# tar xzvf cacti-0.8.6j.tar.gz
Buat direktori cacti and pindahkan isi smua isi derektori cacti-0.8.6j ke direktori cacti
root@ovick:/#mv cacti-0.8.6j cacti
4.Created the user and group
root@ovick:/# groupadd cacti
root@ovick:/# useradd -g cacti cacti
Now you need to make sure that you have the correct permissions for inside cacti folders and files
root@ovick:/# cd /var/www/cacti
root@ovick:/# chown -R cacti:cacti rra/ log/5. Create the cacti db in phpmyadmin
http://YOURIP/phpmyadmin
login using root account
set root password on phpmyadmin if you have already
Privileges>Root>edit privileges>change password
Do this for all 3 root accts listed (I do middle last because that’s the one that will lock you out after setting it)
Create cacti user
Privileges>add new user
user name: cacti
host: localhost
password: cacti
database for user: create database with same name and grant all privileges > Go
then I give the user grant access to it too
privileges>cacti>edit privileges>database specific privileges>Add privileges on the following database: cacti>Go
check the “grant box” (make sure all others are still checked)
root@ovick:/# mysql –p –u root cacti < cacti.sql
root@ovick:/# mysql –p –u root
root@ovick:/# mysql> flush privileges;
root@ovick:/# mysql> exit
Now you need to Edit /var/www/cacti/include/config.php and specify the MySQL user, password and database for your Cacti configuration.
root@ovick:/# vi /var/www/cacti/include/config.php
$database_default = “cacti”;
$database_hostname = “localhost”;
$database_username = “cacti”;
$database_password = “cacti”;
Enter a valid username for cacti, this user will also be used in the next step for data gathering.
Now we need to add the crontab for poller
crontab -e
Add the following line ans save you can chnage the time whenever you want.
*/5 * * * * php /var/www/cacti/poller.php > /dev/null 2>&1
Point your web browser to http://your-server-ip/cacti/ this will start with the following screen here click next
Enter admin admin for login
Change admin password
System settings
Change snmp community to your company’s community name save
Paths:
RRDTool Default Font Path
/usr/local/bin/rrdtool/src/DejaVuSansMono-Roman.ttf
I always force one entry for the graphing by using the cron command, use this:
php /var/www/cacti/poller.php > /dev/null 2>&1
(if not you will have red X on boxes where graphs should be (in IE7, blank in Firefox)
If they are red X’s wait for a bit until the first line gets mapped (every 5 min)
If you still have red X's check your RRDTool path, it must point to the bin, not the path.
then go to graphs.
Update your cacti:
root@ubuntu-ku:/# cd /vaw/www/cacti
root@ovick:/var/www/cacti-0# wget http://www.cacti.net/downloads/patches/0.8.6j/ping_php_version4_snmpgetnext.patch
root@ubuntu-ku:/var/www/cacti-0# wget http://www.cacti.net/downloads/patches/0.8.6j/tree_console_missing_hosts.patch
root@ubuntu-ku:/var/www/cacti-0# wget http://www.cacti.net/downloads/patches/0.8.6j/thumbnail_graphs_not_working.patch
root@ubuntu-ku:/var/www/cacti-0# wget http://www.cacti.net/downloads/patches/0.8.6j/graph_debug_lockup_fix.patch
root@ubuntu-ku:/var/www/cacti-0# wget http://www.cacti.net/downloads/patches/0.8.6j/snmpwalk_fix.patch
root@ubuntu-ku:/var/www/cacti-0# patch -p1 -N < ping_php_version4_snmpgetnext.patch
root@ubuntu-ku:/var/www/cacti-0# patch -p1 -N < tree_console_missing_hosts.patch
root@ubuntu-ku:/var/www/cacti-0# patch -p1 -N < thumbnail_graphs_not_working.patch
root@ubuntu-ku:/var/www/cacti-0# patch -p1 -N <>
6. Try to open full path url http://cactiserver/cacti/
All done with following those step carefully.
Singkat cerita, cacti saya sudah dapat berjalan dengan mengikuti langkah-langkah tersebut di atas.
Selamat mencoba, Good Luck
Reference :
1. http://www.cacti.net/downloads/docs/html/unix_configure_cacti.html