cacti监控

文章描述:-2022年4月13日发(作者:明玉珍)Cacti监控整理By:perfect_linux需要安装的程序apachemysqlphprrdtool功能为cacti提供web服务为cacti存储数据信息作为cacti的解释器把数据绘画成图形下载地址/版本信息/2/downloads//2/rrdtool/downloa/cactiCacti的主程序/downloads/net-snm

-

cacti监控
2022年4月13日发
(作者:明玉珍)

Cacti监控整理

20110607

By:perfect_linux

需要安装的程序

apache

mysql

php

rrdtool

功能

为cacti提供web服务

为cacti存储数据信息

作为cacti的解释器

把数据绘画成图形

下载地址/版本信息

/

2

/downloads/

/

2

/rrdtool/downloa

/

cactiCacti的主程序/downloads/

net-snmp数据获取

一、安装Apache

#2

#cdhttpd-2.2.19

#./configure--prefix=/usr/local/apache--enable-so

#make&&makeinstall

#/usr/local/apache/bin/apachectlstart//启动Apache

#echo"/usr/local/apache/bin/apachectlstart">>/etc///加入开机启动

二、安装MySQL

./configure

--prefix=/usr/local/mysql

--datadir=/usr/local/mysql/data

--with-charset=utf8

--without-debug

--with-big-tables

--with-extra-charsers=complex

--with-unix-socket-path=/usr/local/mysql/tmp/

--enable-assembler

--with-plugins=partition

--without-debug

--with-client-ldflags=-all-static

--with-mysqld-ldflags=-all-static

--with-ssl--enable-local-infile

#make

#makeinstall

#groupaddmysql

#useradd-gmysqlmysql

#chown-Rmysql:mysql/usr/local/mysql

#chmod+w/usr/local/mysql/data

#cp/usr/local/mysql/support-files//etc/

#/usr/local/mysql/bin/mysql_install_db--user=mysql&//初始化mysql

#/usr/local/mysql/bin/mysqld_safe--uer=mysql&//启动mysql

#/usr/local/mysql/bin/mysqladmin-urootpassword123456//设置mysql管理员密

#echo"/usr/local/mysql/bin/mysqld_safe--user=mysql&">>/etc///

写入开机启动项

#echo"exportPATH=$PATH:/usr/local/mysql/bin">>/etc/profile//把mysql加入

环境变量

#source/etc/profile//使环境变量生效

三、安装PHP

安装PHP前需要的库文件

#yuminstalllibpnglibpng-devellibjpeglibjpeg-develfreetypefreetype-develgd

gd-devel

#2

#cdphp-5.3.6

#./configure--prefix=/usr/local/php--with-apxs2=/usr/local/apache/bin/apxs

--with-mysql=/usr/local/mysql--with-gd--with-freetype-dir--with-jpeg-dir

--with-png-dir--enable-sockets

#make&&makeinstall

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

#-dist/usr/local/php/lib/

将Apache、PHP二者整合

#cd/usr/local/apache/conf

#./

编辑Apache配置文件,在配置文件加入如下内容

AddTypeapplication/

然后将DirectoryIndex后的修改为

下面我们测试apache和php是否整合成功,在apache文档跟目录下新建一个小小的php

程序

#cd/usr/local/apache/htdocs/

#

#

在文件中写入下面三行

phpinfo();

?>

保存

#/usr/local/apache/bin/apachectlrestart

如图(说明apache与php整合成功)

四、rrdtool安装

Rrdtool安装需要cairo、libxml2、pango库文件支持

#yuminstallcairo-devellibxml2-develpangopango-devel

#

#cdrrdtool-1.4.5

#./configure--prefix=/usr/local/rrdtool

#make&&makeinstall

#ln-s/usr/local/rrdtool/bin/*/usr/local/bin/

五、net-snmp安装

#

#cdnet-snmp-5.5

#./configure--prefix=/usr/local/net-snmp

#make&&makeinstall

#/usr/local/net-snmp/share/snmp/

#ln-s/usr/local/net-snmp/bin/*/usr/local/bin/

#/usr/local/net-snmp/sbin/snmpd-c/usr/local/net-snmp/share/snmp///

启动net-snmp

#echo“/usr/local/net-snmp/sbin/snmpd-c

/usr/local/net-snmp/share/snmp/”>>/etc///加入开机启动

六、cacti安装

#

#mvcacti-0.8.7g/*/usr/local/apache/htdocs/

#mysql-uroot-p123456

#mysql>createdatabasecacti;//创建cacti数据库

#mysql>(host,user,password)values

('localhost','cacti',password('cacti123'));//建立用户cacti,密码cacti123

#mysql>flushprivileges;//重载MySQL授权表

#mysql>grantalloncacti.*tocacti@'localhost'identifiedby'cacti123';//把数据库cacti

授权于用户cacti

#cd/usr/local/apache/htdocs/

#mysql-ucacti-pcacti123cacti

导入完数据库我们还需要修改一下网站的配置文件,以保网站与数据库能正常连接

#viinclude/

修改完网站配置文件后我们打开浏览器,然后访问http://localhost/install/

Cacti默认登录用户和密码为admin,第一次成功登录后程序会要求重新设置cacti的admin

密码

为监控对象生成文件

#/usr/local/bin/php/usr/local/apache/htdocs/

设置cacti数据采集轮询时间

#crontab–e,加入如下内容,让cacti每五分钟采集一次数据

*/5****envLAG=C/usr/local/bin/php/usr/local/apache/htdocs/

-

cacti监控

发布时间:2022-04-13 02:14:21
文章版权声明:除非注明,否则均为IT技术网-学习WEB前端开发等IT技术的网络平台原创文章,转载或复制请以超链接形式并注明出处。

发表评论

评论列表 (有 9 条评论,113人围观)
中草药名称大全V铁粉2 minutes ago Google Chrome 93.0.4577.82 Windows 10 x64
密码cacti123#mysql>flushprivileges;//重载MySQL授权表#mysql>grantalloncacti.*tocacti@'localhost'identifiedby'cacti123';//把数据库cacti授权于用户cacti#cd/usr/local/apache/htdocs/#mysql-ucacti-pcacti123cacti
平安证券交易软件下载V铁粉18 minutes ago Google Chrome 93.0.4577.82 Windows 10 x64
password('cacti123'));//建立用户cacti
永远追随V铁粉3 minutes ago Google Chrome 93.0.4577.82 Windows 10 x64
-2022年4月13日发(作者:明玉珍)Cacti监控整理20110607By
保荐人考试V铁粉10 minutes ago Google Chrome 93.0.4577.82 Windows 10 x64
安装Apache#2#cdhttpd-2.2.19#./configure--prefix=/usr/local/apache--enable-so#make&&makeinstall#/usr/local/apache/bin/apachectlstart//启动Apache#echo"/usr/local/apache/bin/apachectlstart">>/etc///加入开机启动二
reallinkV铁粉2 minutes ago Google Chrome 93.0.4577.82 Windows 10 x64
安装MySQL./configure--prefix=/usr/local/mysql--datadir=/usr/local/mysql/data--with-charset=utf8--without-debug--with-big-tables--with-extra-charsers=complex--with-unix-socket-path=/usr/local/mysql/tmp/--enable-assembler--with-plugins=partition--without-debug--with-client-ldflags=-all-static--with-mysqld-ldflags=-all-static--with-ssl--enable-local-infile#make#makeinstall#groupaddmysql#useradd-gmysqlmysql#chown-Rmysql
寿宁教育网V铁粉20 minutes ago Google Chrome 93.0.4577.82 Windows 10 x64
安装PHP安装PHP前需要的库文件#yuminstalllibpnglibpng-devellibjpeglibjpeg-develfreetypefreetype-develgdgd-devel#2#cdphp-5.3.6#./configure--prefix=/usr/local/php--with-apxs2=/usr/local/apache/bin/apxs--with-mysql=/usr/local/mysql--with-gd--with-freetype-dir--with-jpeg-dir--with-png-dir--enable-sockets#make&&makeinstall#ln-s/usr/local/php/bin/*/usr/local/bin/#-dist/usr/local/php/lib/将Apache
安装PHP安装PHP前需要的库文件#yuminstalllibpnglibpng-devellibjpeglibjpeg-develfreetypefreetype-develgdgd-devel#2#cdphp-5.3.6#./configure--prefix=/usr/local/php--with-apxs2=/usr/local/apache/bin/apxs--with-mysql=/usr/local/mysql--with-gd--with-freetype-dir--with-jpeg-dir--with-png-dir--enable-sockets#make&&makeinstall#ln-s/usr/local/php/bin/*/usr/local/bin/#-dist/usr/local/php/lib/将Apache
流水的女人V铁粉11 minutes ago Google Chrome 93.0.4577.82 Windows 10 x64
安装MySQL./configure--prefix=/usr/local/mysql--datadir=/usr/local/mysql/data--with-charset=utf8--without-debug--with-big-tables--with-extra-charsers=complex--with-unix-socket-path=/usr/local/mysql/tmp/--enable-assembler--with-plugins=partition--without-debug--with-client-ldflags=-all-static--with-mysqld-ldflags=-all-static--with-ssl--enable-local-infile#make#makeinstall#groupaddmysql#useradd-gmysqlmysql#chown-Rmysql

最近发表

随便看看

热门文章

标签列表