# Install cacti source v2.7
1 yum install mysql-server mysql php-mysql php-pear php-common php-gd php-devel php php-mbstring php-cli php-snmp php-pear-Net-SMTP php-mysql httpd
2 service mysqld restart
3 chkconfig mysqld on
4 service httpd restart
5 chkconfig httpdd on
6 chkconfig httpd on
7 ls
8 vi install.log
9 mysqladmin -u root -p -e123456
10 mysqladmin -u root password 123456
11 mysql -u root -p -e 'create database cacti'
12 mysql -u root -p
13 yum install net-snmp-utils php-snmp net-snmp-libs
14 vim /etc/snmp/snmpd.conf
#com2sec notConfigUser default public
com2sec local localhost public
#group notConfigGroup v1 notConfigUser
#group notConfigGroup v2c notConfigUser
group MyRWGroup v1 local
group MyRWGroup v2c local
group MyRWGroup usm local
####
# Third, create a view for us to let the group have rights to:
#view systemview included .1.3.6.1.2.1.1
#view systemview included .1.3.6.1.2.1.25.1.1
view all included .1 80
#access notConfigGroup "" any noauth exact systemview none none
access MyRWGroup "" any noauth exact all all none
15 /etc/init.d/snmpd start
16 chkconfig snmpd on
17 snmpwalk -v 1 -c public localhost IP-MIB::ipAdEntIfIndex
18 wget http://download.fedora.redhat.com/pub/epel/RPM-GPG-KEY-EPEL
19 rpm --import RPM-GPG-KEY-EPEL
20 vi /etc/yum.repos.d/epel.repo
[epel]
name=EPEL RPM Repository for Red Hat Enterprise Linux
baseurl=http://download.fedora.redhat.com/pub/epel/$releasever/$basearch/
gpgcheck=1
enabled=0
21 yum --enablerepo=epel install cacti
22 rpm -ql cacti | grep cacti.sql
23 mysql -u cacti -p cacti < /usr/share/doc/cacti-0.8.7f/cacti.sql
24 vi /etc/cacti/db.php
* make sure these values refect your actual database/host/user/password */
$database_type = "mysql";
$database_default = "cacti";
$database_hostname = "localhost";
$database_username = "cacti";
$database_password = "123456";
$database_port = "3306";
/* Default session name - Session name must contain alpha
characters */
#$cacti_session_name = "Cacti";
25 vi /etc/httpd/conf.d/cacti.conf
# Cacti: An rrd based graphing tool
#
Alias /cacti /usr/share/cacti
<Directory /usr/share/cacti/>
Order Deny,Allow
Deny from all
Allow from all
</Directory>
26 vi /etc/cron.d/cacti
*/5 * * * * cacti /usr/bin/php /usr/share/cacti/poller.php > /dev/null 2>&1
27 service httpd restart
28 useradd cacti
29 cd /usr/share/cacti/
30 sudo chown -R cacti:cacti rra/ log/
# Install cacti-plugin-architecture
31 wget http://mirror.cactiusers.org/downloads/plugins/cacti-plugin-0.8.7f-PA-v2.7.tar.gz
32 tar -zxvf cacti-plugin-0.8.7f-PA-v2.7.tar.gz
33 cp -R cacti-plugin-arch/* ./
# Use phpmyadmin import db pa.sql
40 tar -zxvf phpMyAdmin-2.11.10-english.tar.gz
41 mv phpMyAdmin-2.11.10-english phpmyadmin
42 ls
43 vim pa.sql
# run patch
45 sudo patch -p1 -N < cacti-plugin-0.8.7f-PA-v2.7.diff
# change db information
46 vim /usr/share/cacti/include/global.php
# Install plugin weathermap
49 tar -zxvf php-weathermap-0.97a.zip
50 unzip -u php-weathermap-0.97a.zip
53 cp -rf weathermap/ /usr/share/cacti/plugins/
# change web path
54 vim /usr/share/cacti/include/global.php
/ => /cacti/
55 cd /usr/share/cacti/plugins/weathermap/
57 history > /tmp/install_cacti_all_cmd
Không có nhận xét nào:
Đăng nhận xét