企业级监控工具Cacti安装配置全过程亚洲城ca88唯一备用,Cacti监控系统的安装配置

Cacti
在乌Crane语中的意思是神明掌的意趣,Cacti是风度翩翩套基于PHP,MySQL,SNMP及RAV4ENCOREDTool开荒的网络流量监测图形分析工具。它经过
snmpget来获取数据,使用
ENVISIONCR-VDtool美术图形,而且你一丝一毫能够无需通晓ENCORE陆风X8Dtool复杂的参数。它提供了那些有力的数码和顾客管理成效,能够钦定每三个客商能查看树状结
构、host以至别的一张图,还足以与LDAP结合开展客商验证,同一时候也能和煦扩张模板,功效十一分苍劲康健。

1、cacti简介

底工音信:

1卡塔 尔(英语:State of Qatar)、cacti是用php语言达成的二个软件,它的尤为重要职能是用snmp服务获取数据,然后用rrdtool蕴蓄和换代数据,当顾客必要查阅数据的时候用rrdtool生成图表呈现给客商。因而,snmp和rrdtool是cacti的要紧。Snmp关系着数量的募集,rrdtool关系着多少存款和储蓄和图表的变动。

OS:RHEL 5.8

2卡塔 尔(阿拉伯语:قطر‎、mysql合营PHP程序存款和储蓄一些变量数据并对变量数据开展调用,如:主机名、主机ip、snmp团体名、端口号、模板消息等变量。

SOFT: apr-util-1.4.1.tar.bz2  cmake-2.8.6.tar.gz 
libmcrypt-2.5.8.tar.gz  php-5.4.36.tar.bz2

3卡塔 尔(阿拉伯语:قطر‎、snmp抓到数据不是积累在mysql中,而是存在rrdtool生成的rrd文件中(在cacti根目录的rra文件夹下卡塔尔。rrdtool对数据的改革和存储正是对rrd文件的处理,rrd文件是大大小小固定的档案文件(Round
罗布in Archive卡塔 尔(英语:State of Qatar),它能够存储的多少笔数在开创时就早就定义。 

            rrdtool-1.4.7.tar.tar    apr-1.4.6.tar.bz2   
cacti-0.8.8c.tar.gz      httpd-2.4.2.tar.bz2

2、软件包思索

            mysql-5.5.22.tar.gz    php-5.4.5.tar.bz2

————————————–分割线

cacti-0.8.8b.tar.gz
httpd-2.2.23.tar.gz
php-5.4.10.tar.gz
cmake-2.8.11.2.tar.gz
mysql-5.5.28.tar.gz
rrdtool-1.4.8.tar.gz
net-snmp-5.7.2.1.tar.gz
Python-2.7.6.tgz
libxml2-2.9.1.tar.gz
zlib-1.2.8.tar.gz
jpegsrc.v9a.tar.gz
libpng-1.6.12.tar.gz
freetype-2.5.3.tar.gz
libart_lgpl-2.3.21.tar.gz
gettext-0.19.2.tar.xz
libgd-2.1.0.tar.gz
curl-7.37.1.tar.gz

先是编写翻译安装LAMP平台,建议卸载掉对应rpm包,不然在各程序合营的时候可能会有毛病。

————————————–分割线

本田UR-VHEL6.4中使用Cacti+Spine监察和控制主机达成出殡和安葬邮件报告急察方
http://www.linuxidc.com/Linux/2013-11/92795.htm

XC90HEL6.4中选择Cacti+Spine监控长途主机
http://www.linuxidc.com/Linux/2013-11/92796.htm

CentOS
5.5完整安装Cacti+Spine
http://www.linuxidc.com/Linux/2011-12/49701.htm

CentOS 6下Cacti搭建文档
http://www.linuxidc.com/Linux/2013-06/86595.htm

ENVISIONHEL5.9下Cacti监察和控制安排详细明白
http://www.linuxidc.com/Linux/2013-06/85427.htm

CentOS 6.3 下Cacti 安装详细解释
http://www.linuxidc.com/Linux/2013-05/84279.htm

CentOS Linux下高速安装配置Cacti国语版
http://www.linuxidc.com/Linux/2013-03/81627.htm

3、apache安装配备

# tar zxvf httpd-2.2.23.tar.gz

# cd httpd-2.2.23

# ./configure –prefix=/usr/local/apache2 –enable-so

# make && make install

# cp /usr/local/apache2/bin/apachectl /etc/init.d/httpd 

4、mysql安装配置

# tar zxvf cmake-2.8.11.2.tar.gz

# cd cmake-2.8.11.2

# ./configure

# make && make install

# groupadd mysql

# useradd mysql

# tar zxvf mysql-5.5.28.tar.gz

# cd mysql-5.5.28

# cmake . -DCMAKE_INSTALL_PREFIX=/usr/local/mysql/ 
-DMYSQL_DATADIR=/usr/local/mysql/data 
-DWITH_INNOBASE_STORAGE_ENGINE=1  -DMYSQL_TCP_PORT=3306
-DEXTRA_CHARSETS=all -DDEFAULT_CHARSET=utf8
-DDEFAULT_COLLATION=utf8_general_ci
-DMYSQL_UNIX_ADDR=/usr/local/mysql/data/mysql.sock 
-DMYSQL_USER=mysql  -DWITH_DEBUG=0

# make && make install

# vim /root/.bashrc

PATH=/usr/local/mysql/bin:${PATH}

export PATH

# source /root/.bashrc

# cp support-files/my-medium.cnf /etc/my.cnf

# cp support-files/mysql.server /etc/init.d/mysqld

# chmod 755 /etc/init.d/mysqld

# chmod 755 /usr/local/src/mysql-5.5.28/scripts/mysql_install_db

# ./scripts/mysql_install_db –user=mysql –basedir=/usr/local/mysql
–datadir=/usr/local/mysql/data

# chown -R mysql.mysql /usr/local/mysql/data

# service mysqld start

# mysqladmin -uroot password 123456

# mysqladmin –user=root -p create cacti

# mysql -uroot -p cacti<cacti.sql

mysql>GRANT ALL ON cacti.* TO cactiuser@localhost IDENTIFIED BY
‘cactipassword’;

mysql>flush privileges;

 

5、GD安装配置

1)、安装libxml2

# tar zxvf Python-2.7.6.tgz
#相仿只可以是其大器晚成版本,不然编写翻译libxml2时会报错

# cd Python-2.7.6

# ./configure –prefix=/usr/local/python

# make && make install

# tar zxvf libxml2-2.9.1.tar.gz

# cd libxml2-2.9.1

# ./configure –prefix=/usr/local/libxml2

# make && make install

 

2)、安装zlib

# tar zxvf zlib-1.2.8.tar.gz

# cd zlib-1.2.8

# ./configure –prefix=/usr/local/zlib2

# make && make install

# yum install -y zlib-devel

 

3)、安装jpegsrc

# tar zxvf jpegsrc.v9a.tar.gz

# cd jpeg-9a

# ./configure –prefix=/usr/local/jpegsrc9

# make && make install

 

4)、安装libpng

# tar zxvf libpng-1.6.12.tar.gz

# cd libpng-1.6.12

# ./configure –prefix=/usr/local/libpng2

# make && make install

 

5)、安装freetype

# tar zxvf freetype-2.5.3.tar.gz

# cd freetype-2.5.3

# ./configure –prefix=/usr/local/freetype2

# make && make install

 

6)、安装libart_lgpl

# tar zxvf libart_lgpl-2.3.21.tar.gz

# cd libart_lgpl-2.3.21

# ./configure –prefix=/usr/local/libart

# make && make install

 

7)、安装gettext

# xz -d gettext-0.19.2.tar.xz

# tar xvf gettext-0.19.2.tar

# cd gettext-0.19.2

# ./configure –prefix=/usr/local/gettext

# make && make install

 

8)、安装GD

# tar zxvf libgd-2.1.0.tar.gz

# cd libgd-2.1.0

 

9)、安装curl

# tar zxvf curl-7.37.1.tar.gz

# cd curl-7.37.1

# ./configure –prefix=/usr/local/curl

# make && make install

 

6、php安装配备

# yum install -y libxml2-devel freetype-devel

# tar zxvf php-5.4.10.tar.gz

# cd php-5.4.10

# ./configure –prefix=/usr/local/php
–with-apxs2=/usr/local/apache2/bin/apxs
–with-jpeg-dir=/usr/local/jpeg9/ –with-png-dir=/usr/local/libpng2/
–with-gd –with-freetype-dir=/usr/local/freetype2/
–with-zlib-dir=/usr/local/zlib2/ –with-mysql=/usr/local/mysql
–with-curl=/usr/local/curl –with-gettext=/usr/local/gettext
–enable-sockets

# make && make install

# cp php.ini-development /usr/local/php/lib/php.ini

# ln -s /usr/local/php/bin/php /usr/bin

# vim /usr/local/apache2/conf/httpd.conf

在#AddType application/x-tar.tgz后追加:AddType application/x-httpd-php
.php

在#LoadModule foo_module modules/mod_foo.so后追加:LoadModule
php5_module  modules/libphp5.so

在DirectoryIndexindex.html后边扩张index.php

越来越多实际情况见请继续阅读下风度翩翩页的优异内容
http://www.linuxidc.com/Linux/2014-09/106582p2.htm

亚洲城ca88唯一备用 1

1.install apr and apr-util:

2.tar xf apr-1.4.6.tar.bz2 

cd apr-1.4.6

./buildconf

./configure –prefix=/usr/local/apr

make

make install

 

tar xf apr-util-1.4.1.tar.bz2

 

cd apr-util-1.4.1 

./configure –prefix=/usr/local/apr-util –with-apr=/usr/local/apr

make

make install

3.install apache:

 yum -y install pcre-devel

tar xf httpd-2.4.2.tar.bz2 

cd httpd-2.4.2

./configure –prefix=/usr/local/apache –sysconfdir=/etc/httpd
–enable-so –enable-suexec –enable-ssl –enable-rewrite
–enable-rewrite –with-zlib –with-pcre –with-apr=/usr/local/apr
–with-apr-util=/usr/local/apr-util –enable-modules=most
–enable-modules-shared=most –enable-mpms-shared=all 

make

make install

 

echo “PATH=\$PATH:/usr/local/apache/bin” >> /etc/profile

export PATH=$PATH:/usr/local/apache/bin

echo “MANPATH  /usr/local/apache/man ” >> /etc/man.config

ln -sv /usr/local/apache/include /usr/include/httpd

4.install cmake:

tar xf cmake-2.8.8.tar.gz

cd cmake-2.8.8

./bootstrap

make

make install

5.install mysql

groupadd -r mysql

useradd -g mysql -r -d /data/mysql mysql

tar xf mysql-5.5.22a.tar.gz

cd mysql-5.5.22a

cmake . -DCMAKE_INSTALL_PREFIX=/usr/local/mysql
-DMYSQL_DATADIR=/data/mysql -DSYSCONFDIR=/etc
-DWITH_INNOBASE_STORAGE_ENGINE=1 -DWITH_ARCHIVE_STORAGE_ENGINE=1
-DWITH_FEDERATED_STORAGE_ENGINE=1  -DWITH_READLINE=1
-DWITH_SSL=system -DWITH_ZLIB=system -DWITH_LIBWRAP=0
-DDEFAULT_CHARSET=utf8 -DDEFAULT_COLLATION=utf8_general_ci
-DENABLE_PROFILING=1 

make

make install

 

6.cd /usr/local/mysql

chown -R :mysql .

mkdir -pv /data/mysql

chown -R mysql:mysql /data/

cp /usr/local/mysql/support-files/my-large.cnf /etc/my.cnf

cp /usr/local/mysql/support-files/mysql.server /etc/rc.d/init.d/mysqld

chmod +x /etc/rc.d/init.d/mysqld

chkconfig –add mysqld

scripts/mysql_install_db –user=mysql –datadir=/data/mysql

sed -i ‘/\[mysqld\]/a \datadir = /data/mysql’ /etc/my.cnf

sed -i ‘s/thread_concurrency = 8/thread_concurrency = 2/g’ /etc/my.cnf

echo “PATH=$PATH:/usr/local/mysql/bin” >> /etc/profile

export PATH=$PATH:/usr/local/mysql/bin

echo “MATHPATH /usr/local/mysql/man” >> /etc/man.config

ln -sv /usr/local/mysql/include /usr/include/mysql

echo ” /usr/local/mysql/lib ” >> /etc/ld.so.conf.d/mysql.conf

ldconfig

service  mysqld start

6.install php

安装php从前有不小可能率会需求安装libmcrypt,笔者一向在chinaunix下载的源码
编写翻译安装就可以,然后编写翻译PHP时加上 –with-mcrypt=DITiggo

tar xf  php-5.4.4.tar.bz2

cd  php-5.4.4

./configure –prefix=/usr/local/php –with-mysql=/usr/local/mysql
–with-openssl –with-mysqli=/usr/local/mysql/bin/mysql_config
–enable-mbstring –with-freetype-dir –with-jpeg-dir –with-png-dir
–with-zlib –with-libxml-dir=/usr –enable-xml 
–with-apxs2=/usr/local/apache/bin/apxs –with-mcrypt 
–with-config-file-path=/etc –with-config-file-scan-dir=/etc/php.d
–with-bz2 –enable-sockets 

make

make install 

cp php-5.4.4/php.ini-production /etc/php.ini

echo “AddType application/x-httpd-php  .php ” >>
/etc/httpd/httpd.conf

echo “AddType application/x-httpd-php-source  .phps” >>
/etc/httpd/httpd.conf

sed -i ‘s/DirectoryIndex index.html/DirectoryIndex index.php
index.html/g’ /etc/httpd/httpd.conf

地方装有操作无不当执行完之后能够建个测验php页测量试验下是还是不是OK,假若没难点,开端装cacti部分:

 1.本人为cacti直接创立的设想主机:

第意气风发改善httpd.conf增加:include /etc/httpd/extra/httpd-vhosts.conf

下一场改革http-vhosts.conf:

<VirtualHost *:80>
    DocumentRoot “/usr/local/apache/htdocs/cacti
    ServerName cacti.linuxidc.com
    ErrorLog “logs/cacti-error_log”
    CustomLog “logs/cacti-access_log” common
</VirtualHost>

2.安装rrdtool:

tar xf rrdtool-1.4.7.tar.gz

cd rrdtool-1.4.7

./configure –prefix=/usr/local/rrdtool

make

make install

echo “MANPATH  /usr/local/rrdtool/share/man” >> /etc/man.config

echo “PATH=$PATH:/usr/local/rrdtool/bin ” >> /etc/profile

export PATH=$PATH:/usr/local/rrdtool/bin

ln -sv /usr/local/rrdtool/include /usr/include/rrdtool

echo “/usr/local/rrdtool/lib” >> /etc/ld.so.conf.d/rrdtool.conf

ldconfig

3.yum安装net-snmp、net-snmp-util并安装自动运营,此处不给详细命令了

4.安装cacti

为cacti创设数据库,并初阶化所供给表:

1.mysqladmin create cacti      //当时的密码为mysql的密码

2.cd /usr/local/apache/htdocs/cacti 

3.mysql cacti < cacti.sql

创立mysql客商,使用cacti能访谈其cacti数据库

mysql -e “GRANT ALL ON cacti.* TO cactiuser@localhost IDENTIFIED BY
‘cactiuser'”;

1.//创设了客商cactiuser 密码也为cactiuser 

2.mysqladmin -p flush-privileges 

3.mysql -ucactiuser -p          //验证一下是或不是精确 

紧接着成立系统客商cactiuser,以之运转cacti的数量获得和日志记录等专门的学业

1.useradd cactiuser 

2.chown -R cactiuser:cactiuser /usr/local/apache/htdocs/cacti/{log,rra}

以cactiuser客商的身份,每5钟获取三次数据:

1.echo ‘*/5 * * * *  /usr/local/php/bin/php
/usr/local/apache/htdocs/cacti/poller.php &> /dev/null’ >
/var/spool/cron/cactiuser 

修改php时区:

1.vim /etc/php.ini

2.date.timezone = Asia/Shanghai 

编排cacti的布置文件include/config.php启用并更改如下行:
//$url_path = “/cacti/”;
大家这边将之更改为:
$url_path = “/”;

日后在浏览器中展开
密码第叁回输入的时候,会让校订密码,客商默以为admin 密码为admin

亚洲城ca88唯一备用 2

————————————–分割线

路虎极光HEL6.4中动用Cacti+Spine监察和控制主机完结发送邮件报告急察方
http://www.linuxidc.com/Linux/2013-11/92795.htm

陆风X8HEL6.4中应用Cacti+Spine监察和控制长途主机
http://www.linuxidc.com/Linux/2013-11/92796.htm

CentOS
5.5完整安装Cacti+Spine
http://www.linuxidc.com/Linux/2011-12/49701.htm

CentOS 6下Cacti搭建文书档案
http://www.linuxidc.com/Linux/2013-06/86595.htm

LX570HEL5.9下Cacti监察和控制陈设详细解释
http://www.linuxidc.com/Linux/2013-06/85427.htm

CentOS 6.3 下Cacti 安装安详严整
http://www.linuxidc.com/Linux/2013-05/84279.htm

CentOS Linux下高速安装配备Cacti华语版
http://www.linuxidc.com/Linux/2013-03/81627.htm

————————————–分割线

Cacti
的事必躬亲介绍
:请点这里
Cacti
的下载地址
:请点这里

本文永恒更新链接地址:http://www.linuxidc.com/Linux/2015-01/111212.htm

亚洲城ca88唯一备用 3

相关文章