Chinaunix首页 | 论坛 | 博客
  • 博客访问: 6073597
  • 博文数量: 2759
  • 博客积分: 1021
  • 博客等级: 中士
  • 技术积分: 4091
  • 用 户 组: 普通用户
  • 注册时间: 2012-03-11 14:14
文章分类

全部博文(2759)

文章存档

2019年(1)

2017年(84)

2016年(196)

2015年(204)

2014年(636)

2013年(1176)

2012年(463)

分类: 系统运维

2013-11-18 11:41:22

原文地址:Centos+Xampp+Cacti安装注意事项 作者:ghan

1、安装LAMPP注意版本及操作系统如果是centos需要修改如下:


vi /opt/lampp/lampp

osguess() {
 if test -f /etc/redhat-release
 then
  if egrep "9 " /etc/redhat-release > /dev/null
  then
   echo "rh9"
   return 0
  else

修改成:   

osguess() {
 if test -f /etc/redhat-release
 then
  if egrep "Red" /etc/redhat-release > /dev/null
  then
   echo "rh9"
   return 0
  else
          echo "linux"
   return 0
  fi
 elif test "$(uname)" = "Darwin"
 then
  echo "macosx"
  return 0


2、如果LAMPP需要使用其它端启动如:81端口
修改成: 修改成: 修改成: vi /opt/lampp/lampp
   vi /opt/lampp/lampp  

 if testport 81
 then
  $GETTEXT -s "fail."
  echo "XAMPP: " $($GETTEXT 'Another web server is already running.')
  return 1
 fi

3、修改httpd.conf配置
# vi /opt/lampp/etc/httpd.conf
Listen 81

4、注意CACTI服务器时间及物理时间是否同步,设定时区
# vi  d
/* 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 = "3308";
$database_ssl = false;
date_default_timezone_set('Asia/shanghai');

5、设置定时捕捉数据,注意建议不要修改捕捉数据时间:
# crontab -l# crontab -e

*/5  * * * *  /opt/lampp/bin/php /opt/lampp/htdocs/cacti/poller.php > /dev/null 2>&1
 
6、安 装net-snmp
#yum install net-snmp
7 、修改snmpd.conf文件
#       sec.name  source          community
#com2sec notConfigUser  default       public
com2sec notConfigUser  172.40.8.117       public

####
# Finally, grant the group read-only access to the systemview view.

#       group          context sec.model sec.level prefix read   write  notif
access  notConfigGroup ""      any       noauth    exact  all none none


##           incl/excl subtree                          mask
view all    included  .1                               80

阅读(890) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~