一、下载软件
[root@node1 opt]# wget http://www.cacti.net/downloads/cacti-0.8.8f.tar.gz
--12:33:54-- http://www.cacti.net/downloads/cacti-0.8.8f.tar.gz
Resolving www.cacti.net... 209.242.232.5, 173.225.179.10
Connecting to www.cacti.net|209.242.232.5|:80... connected.
HTTP request sent, awaiting response... 302 Found
Location: http://120.52.72.44:80/www.cacti.net/c3pr90ntcsf0/downloads/cacti-0.8.8f.tar.gz [following]
--12:34:05-- http://120.52.72.44/www.cacti.net/c3pr90ntcsf0/downloads/cacti-0.8.8f.tar.gz
Connecting to 120.52.72.44:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 2594409 (2.5M) [application/x-gzip]
Saving to: `cacti-0.8.8f.tar.gz'
100%[========================================================================================>] 2,594,409 13.1K/s in 2m 51s
12:37:00 (14.8 KB/s) - `cacti-0.8.8f.tar.gz' saved [2594409/2594409]
[root@node1 opt]# wget http://oss.oetiker.ch/rrdtool/pub/rrdtool-1.4.7.tar.gz
--12:38:24-- http://oss.oetiker.ch/rrdtool/pub/rrdtool-1.4.7.tar.gz
Resolving oss.oetiker.ch... 213.144.138.195, 2001:1620:202d::c3
Connecting to oss.oetiker.ch|213.144.138.195|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1349040 (1.3M) [application/x-tar]
Saving to: `rrdtool-1.4.7.tar.gz'
100%[=============================================================================>] 1,349,040 104K/s in 13s
12:38:44 (100 KB/s) - `rrdtool-1.4.7.tar.gz' saved [1349040/1349040]
二、安装依赖包
[root@node1 opt]# yum install net-snmp net-snmp-devel net-snmp-libs net-snmp-utils
Total download size: 193 k
Is this ok [y/N]: y
Downloading Packages:
net-snmp-utils-5.3.2.2-25.el5_11.x86_64.rpm | 193 kB 00:00
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Installing : net-snmp-utils [1/1]
Installed: net-snmp-utils.x86_64 1:5.3.2.2-25.el5_11
Complete!
[root@node1 opt]# chkconfig --level 35 snmpd on
[root@test ~]# service snmpd start
[root@test ~]# vi /etc/snmp/snmpd.conf
修改62行内容如下:
#this edit by gaojingsong
access notConfigGroup "" any noauth exact all none none
# -----------------------------------------------------------------------------
# Here is a commented out example configuration that allows less
# restrictive access.
# YOU SHOULD CHANGE THE "COMMUNITY" TOKEN BELOW TO A NEW KEYWORD ONLY
# KNOWN AT YOUR SITE. YOU *MUST* CHANGE THE NETWORK TOKEN BELOW TO
# SOMETHING REFLECTING YOUR LOCAL NETWORK ADDRESS SPACE.
## sec.name source community
#com2sec local localhost COMMUNITY
#com2sec mynetwork NETWORK/24 COMMUNITY
## group.name sec.model sec.name
#group MyRWGroup any local
#group MyROGroup any mynetwork
#
#group MyRWGroup any otherv3user
#...
修改85行内容如下:
## incl/excl subtree mask
view all included .1 80
三、安装rrdtool
(1)检查并安装相关依赖包
[root@test ~]# yum install cairo-devel libxml2-devel pango-devel pango libpng-devel freetype freetype-devel libart_lgpl-devel pear pear-devel
Running Transaction
Updating : glib2 [ 1/19]
Installing : fontconfig-devel [ 2/19]
Installing : libXrender-devel [ 3/19]
Updating : pango [ 4/19]
Installing : glib2-devel [ 5/19]
Installing : libXft-devel [ 6/19]
Installing : cairo-devel [ 7/19]
Installing : libXext-devel [ 8/19]
Installing : pango-devel [ 9/19]
Installing : cairo-devel [10/19]
Installing : libart_lgpl-devel [11/19]
Installing : libart_lgpl-devel [12/19]
Updating : glib2 [13/19]
Updating : pango [14/19]
Installing : pango-devel [15/19]
Cleanup : pango [16/19]
Cleanup : glib2 [17/19]
Cleanup : pango [18/19]
Cleanup : glib2 [19/19]
Installed: cairo-devel.i386 0:1.2.4-5.el5 cairo-devel.x86_64 0:1.2.4-5.el5 libart_lgpl-devel.i386 0:2.3.17-4 libart_lgpl-devel.x86_64 0:2.3.17-4 pango-devel.i386 0:1.14.9-8.el5.centos.3 pango-devel.x86_64 0:1.14.9-8.el5.centos.3
Dependency Installed: fontconfig-devel.x86_64 0:2.4.1-7.el5 glib2-devel.x86_64 0:2.12.3-4.el5_3.1 libXext-devel.x86_64 0:1.0.1-2.1 libXft-devel.x86_64 0:2.1.10-1.1 libXrender-devel.x86_64 0:0.9.1-3.1
Updated: glib2.x86_64 0:2.12.3-4.el5_3.1 glib2.i386 0:2.12.3-4.el5_3.1 pango.x86_64 0:1.14.9-8.el5.centos.3 pango.i386 0:1.14.9-8.el5.centos.3
Complete!
[root@node1 opt]# mkdir /usr/local/rrdtool
[root@node1 opt]# mkdir /usr/local/rrdtool
[root@node1 opt]# tar -xzf rrdtool-1.4.7.tar.gz
[root@node1 opt]# cd rrdtool-1.4.7
[root@node1 rrdtool-1.4.7]# ./configure –-prefix=/usr/local/rrdtool
----------------------------------------------------------------
Config is DONE!
With MMAP IO: yes
Build rrd_getopt: no
Build rrd_graph: yes
Static programs: no
Perl Modules: perl_piped perl_shared
Perl Binary: /usr/bin/perl
Perl Version: 5.8.8
Perl Options: PREFIX=/usr/local/rrdtool LIB=/usr/local/rrdtool/lib/perl/5.8.8
Ruby Modules:
Ruby Binary: no
Ruby Options: sitedir=/usr/local/rrdtool/lib/ruby
Build Lua Bindings: no
Build Tcl Bindings: no
Build Python Bindings: no
Build rrdcgi: yes
Build librrd MT: yes
Use gettext: yes
With libDBI: no
With libwrap: yes
Libraries: -lxml2 -lglib-2.0 -lcairo -lcairo -lcairo -lm -lwrap -lcairo -lpng12 -lpangocairo-1.0 -lpango-1.0 -lcairo -lgobject-2.0 -lgmodule-2.0 -ldl -lglib-2.0
Type 'make' to compile the software and use 'make install' to
install everything to: /usr/local/rrdtool.
... that wishlist is NO JOKE. If you find RRDtool useful
make me happy. Go to http://tobi.oetiker.ch/wish and
place an order.
-- Tobi Oetiker <tobi@oetiker.ch>
[root@node1 rrdtool-1.4.7]# make
[root@node1 rrdtool-1.4.7]# make install
四、解压cacti放入apache目录,
记住修改/usr/local/apache2/htdocs/cacti/include中config和global中数据库信息
[root@node1 opt]# tar -xzf cacti-0.8.8f.tar.gz
[root@node1 opt]# mv cacti-0.8.8f /data1/html/cacti