Installing Cacti on Linux
=================================
1.Mysql source code installation
shell> groupadd mysql
shell> useradd -g mysql mysql
shell> gunzip < mysql-VERSION.tar.gz | tar -xvf -
shell> cd mysql-VERSION
shell> ./configure --prefix=/usr/local/mysql
shell> make
shell> make install
shell> cp support-files/my-medium.cnf /etc/my.cnf
shell> cd /usr/local/mysql
shell> bin/mysql_install_db --user=mysql
shell> chown -R root .
shell> chown -R mysql var
shell> chgrp -R mysql .
shell> bin/mysqld_safe --user=mysql &
cp ./support-files/mysql.server /etc/init.d/mysql (In mysql scurce code directory)
chmod +x /etc/init.d/mysql
cd /etc/rc3.d and rc5.d
ln -s ../init.d/mysql S86mysql
ln -s ../init.d/mysql K86mysql (Note: the number in filename doesn't conflict with other scripts)
2.
Apache installation
./configure --prefix=/www --enable-so
make && make install
cp /www/bin/apachectl /etc/init.d/httpd
cd /etc/rc3.d and rc5.d
ln -s ../init.d/httpd S87httpd
ln -s ../init.d/httpd K87httpd
or
chkconfig --add httpd
chkconfig --level 35 httpd on
3.
PHP Installation
./configure --prefix=/www/php --with-apxs2=/www/bin/apxs --with-config-file-path=/www/php --enable-sockets --with-mysql=/usr/local/mysql --with-zlib-dir=/usr/include --with-gd
make && make install
cp php.ini-dist /www/php/php.ini
vi /www/conf/httpd.conf
加入:
###############for php and cacti###################
AddType application/x-tar .tgz
AddType application/x-httpd-php .php
AddType image/x-icon .ico
DirectoryIndex index.php index.html index.html.var
#######################over########################
/etc/init.d/httpd restart
4.
Mysql setting
/usr/local/mysql/bin/mysql -u root -p
mysql> set password for root@localhost=password('cactipw');
mysql> Query OK, 0 rows affected (0.00 sec)
mysql> create database cacti;
mysql> grant all on cacti.* to root;
mysql> grant all on cacti.* to root@localhost;
mysql> grant all on cacti.* to cactiuser;
mysql> grant all on cacti.* to cactiuser@localhost;
mysql> set password for cactiuser@localhost=password('cactipw');
mysql> flush privileges; (See cacti docs/INSTALL)
mysql> exit
5、rrdtool installation
download:
http://people.ee.ethz.ch/~oetike ... dtool-1.0.50.tar.gz
then
./configure
make && make install
6、net-snmp installation
Download the latest version and install it.
7、cacti installation
cp cacti-0.8.6g.tar.gz /www/htdocs
tar xzvf cacti-0.8.6g.tar.gz
mv cacti-0.8.6g cacti
cd cacti
/usr/local/mysql/bin/mysql –u root –psccmrtg cacti < cacti.sql
chown –R cactiuser rra/ log/
or
chown -R cactiuser /www/htdocs/cacti
vi /www/htdocs/cacti/include/config.php
$database_type = “mysql”;
$database_default = “cacti”;
$database_hostname = “localhost”;
$database_username = “cactiuser”;
$database_password = “cactipw”;
useradd cactiuser
passwd cactiuser
su - cactiuser
Crontab –u cactiuser –e
*/5 * * * * /www/php/bin/php /www/htdocs/cacti/poller.php > /dev/null 2>&1
/etc/init.d/crond restart
Logon to internet and perform below command in shell window:
wget http://www.cacti.net/downloads/p ... g_parse_error.patch
wget http://www.cacti.net/downloads/p ... operties_zoom.patch
wget http://www.cacti.net/downloads/p ... ver_snmp_auth.patch
wget http://www.cacti.net/downloads/p ... _file_loading.patch
patch -p1 -N < short_open_tag_parse_error.patch
patch -p1 -N < graph_properties_zoom.patch
patch -p1 -N < script_server_snmp_auth.patch
patch -p1 -N < mib_file_loading.patch
cactid installation
./configure --with-mysql=/usr/local/mysql/include
make && make install
modify cactid.conf and copy it to /usr/local/cactid/
ln -s /tmp/mysql.sock /var/lib/mysql/mysql.sock
or
cd /var/lib
ln -s /tmp mysql
8. threshold installation.(Add email or syslog alert function)
thold-0.2.5.zip
cd thold-0.2.5
./install.sh /www/htdocs/cacti/ cactiuser cactipw
You'd better add /usr/local/mysql/bin to $PATH.
9. Cacti settings
http://IP/cacti
10. other plugins installation
Monitor, Report,...
If you want to migrate cacti to another host, just use mysqldump to export cacti configuration, use source command in mysql to inport config, then copy /log and /rra to new host.
分享到:
相关推荐
用php语言实现的一个软件,用snmp服务获取数据,用rrdtool存储和更新数据以及绘图,用mysql配合PHP程序存储一些变量数据并对变量数据进行调用。
linux系统iostat监控cacti插件
linux之Cacti 构建流量与性能监测系统
CentOS系统下Cacti中文版安装配置
Cacti+PHP+Mysql+HTTP+Snmp 网络&系统监控
cacti 配置与应用手册 操作系统 - Linux - cacti 配置与应用手册.zip
在linux系统下安装监控软件,时时监控系统运行质量。
cacti 配置与应用手册 操作系统 - Linux - cacti 配置与应用手册_加水印.zip
Cacti for Linux/Unix安装方法 在文件夹include下的config.php中可配置你的数据库信息。 $database_type = "mysql"; //数据库类型 $database_default = "cacti"; //数据库名称 $database_hostname = "localhost...
基于Linux实现cacti监控应用研究.pdf
cacti_suse_64_sp4所有都是源码包安装说明:是全程采用源码包安装,适用于所有LINUX系统的安装,包括解决乱码,图出不来,以及安装过程配置客户端被监控的对应内容都有详细说明
2.Linux操作系统CentOS6.5安装.mp4 3.Linux必备命令讲解.mp4 4.Linux权限管理及网络设置.mp4 5.Linux初学常见问题答疑.mp4 6.Linux构建NTP及DHCP服务器构建.mp4 7.Linux下NFS及Vsftp虚拟用户讲解.mp4 8.Linux下...
cacti监控windows、linux系统24核cpu的模板
适用于linux系统流量监控软件,是目前cacti最新版,需先安装apache+mysql+php等组件,感谢大家支持!
linux+cacti+syslog-ng+snare实现日志集中管理
cacti是一个基于web的监控工具,通过配置snmp进行连接。应用于linux及windows系统。对各种程序、系统资源进行监控。
linux系统流量监控软件,cacti最新版,希望提供给有需要的人,感谢大家支持!
Linux下用的最多的是MRTG的性能监视,MRTG...网络管理工作站,采用Linux(或Freebsd)操作系统,并且安装Net-SNMP工具,使用RRDTOOL采集数据,存储数据,并用Cacti调用rrdtool显示出来。 CACTI采用PHP编写,基于B/S结构。
cacti的整个制作过程,可以监控window系统以及linux系统