当前位置: 首页 > 图文教程 > 服务器 > Linux服务器 > UbuntuLinux系统架设cacti监控服务

Linux服务器
Linux下利用Squid构建高速的ProxyServer
在Linux操作系统上配置DNS服务器的日志
搭建性能比Squid高很多的Varnish服务器
Linux系统挂载AIXNFS服务器的配置方法
Linux上架设一台高容量POP3服务器
鸟哥的Linux学习笔记DNS服务器知识
部署Linux下OpenVZ虚拟化服务器
在RHEL5服务器上远程桌面(VNC)的配置
Samba服务器多系统用户共享目录设计方法
Linux攻略Samba服务的搭建与配置
Linux操作系统下配置DNS服务器的方法介绍
用Linux系统自身做一个L2TP的VPN服务器
Linux环境用Sendmail架设Mail服务器
细述Apachewebserver的安装与配置
linux环境下轻松搭建CVS服务器
UbuntuLinux通过SSh远程管理服务器
Linux操作系统下DHCP中继代理的实现方法
Ubuntu7.10Linux上构建全功能的服务器
Linux系统搭建Discuz论坛的方法
Ubuntub7.10Linux架设Samba服务

Linux服务器 中的 UbuntuLinux系统架设cacti监控服务


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2009-10-18   浏览: 46 ::
收藏到网摘: n/a

第一步:ubuntu系统和LAMP服务的安装
 
建议用ubuntuserver系统+LAMP服务来安装cacti软件,因为server版的系统+系统自带的LAMP服务会较稳定。
 
ubuntuserver在安装的过程中,选中安装LAMP服务。
 
如果用桌面版的ubuntu来安装的,或者安装的过程中没有安装LAMP服务,可以用下面的命令先架设LAMP服务器。
 
$sudoapt-getinstallapache2
 
$sudoapt-getinstallmysql-server
 
$sudoapt-getinstallphp5
 
第二步:相关组件的安装
 
$sudoapt-getinstallphp5-mysqlphp5-cgiphp5-cliphp5-snmpphp-pearsnmpsnmpd
 
$sudoapt-getinstallrrdtool
 
第三步:cacti程序的安装
 
http://www.cacti.net网站下载最新的cacti软件包,ubuntuserver可用wget命令下载。
 
$sudo-s
 
$mvcacti-version.tar.gz/var/www
 
$cd/var/www
 
$tarxzfcacti-version.tar.gz
 
$mvcacti-versioncacti
 
$rmcacti-version.tar.gz
 
$exit
 
第四步:相关的设置
 
$cd/var/www/cacti
 
$sudomysqladmin-uroot-pcreatecacti
 
$sudomysql-uroot-pcacti<cacti.sql
 
$sudomysql-uroot-pcacti
 
在这个上面你要注意一下。要是你真的不知道如何在命令下使用mysql那你要先用phpmyadmin新建一个数据库再导入数据。接着使用命令来修改mysql数据库的密码。
 
grantalloncacti.*tocactiuser@localhostidentifiedby'cacti';
 
flushprivileges;
 
setpasswordforcactiuser@localhost=password('cactiuser');
 
quit
 
编辑/var/www/cacti/include/config.php,修改数据库的密码为cactiuser
 
这个是根据你上面设置数据库的密码
 
$sudovi/var/www/cacti/include/config.php
 
$database_password="cactiuser";
 
添加cactiuser用户
 
$sudouseraddcactiuser-d/var/www/cacti-s/bin/false
 
$sudochown-Rcactiuser/var/www/cacti/rra/var/www/cacti/log
 
这个上面可能添加不行试试:
 
#sudochown-hRcactiuser/var/www/cacti/rra/var/www/cacti/log
 
编辑/etc/crontab,文件末尾加入下面的话
 
$sudovi/etc/crontab
 
*/5****cactiuserphp5/var/www/cacti/poller.php>/dev/null2>&1
 
下面这次如果你已建好的LAMP那就不要再次添加了。
 
编辑/etc/php5/apache2/php.ini,加入下面的话
 
$sudovi/etc/php5/apache2/php.ini
 
;extension=mysql.so
 
编辑/etc/php5/cli/php.ini,加入下面的话
 
$sudovi/etc/php5/cli/php.ini
 
;extension=mysql.so
 
编辑/etc/php5/cgi/php.ini,加入下面的话
 
$sudovi/etc/php5/cgi/php.ini
 
;extension=mysql.so
 
重启apache2服务
 
$sudo/etc/init.d/apache2restart
 
本机用http://localhost/cacti/访问,其它机子用http://cacti服务器IP/cacti访问,默认的用户名和密码都是admin
 
UserName:admin
 
Password:admin