Cacti/nagios/ntop整合之一:搭建LAMP平台

2. 检查/etc/httpd/conf/httpd.conf 是否有 LoadModule  status_module  modules/mod_status.so
3. 启动httpd/mysqld/snmpd,设置为自动启动chkconfig xxx on
4.设置mysqlroot帐户密码: mysqladmin -u root -p password 123456
5. 测试phpmysql
vim /var/www/html/index.php
<?php
$link=mysql_connect("localhost","root","123456");
if(!$link) echo "MYSQL FAILD!";
else echo "MYSQL OK!";

phpinfo();
?>
     保存退出,访问首页测试是否显示phpinfo
  6. 安装snmpudp161162端口)
yum install net-snmp net-snmp-libs  net-snmp-utils  net-snmp-devel
修改snmp的主配置文件/etc/snmp/snmpd.conf
1 )、查找以下字段:
      sec.name              source          community
com2sec notConfigUser  default       public
"comunity" 字段改为你要设置的密码 . 比如 "public".                                             
“default” 改为你想哪台机器可以看到你的 snmp 信息 , 10.10.10.10
服务端改为 127.0.0.1
2 )、查找以下字段:
# 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  roview rwview none
access  notConfigGroup ""      any       noauth    exact  all none none

7. 创建cacti所用的数据库并授权
     这里的
创建的数据库名为cactidb,创建了cactier的用户,密码为123456,授权允许从localhost,127.0.0.1,192.168.0.0网段访问
mysql> create database cactidb;
mysql> GRANT all privileges ON cactidb.* TO
cactier@localhost IDENTIFIED BY '123456';
mysql> GRANT all privileges ON cactidb.* TO
[email protected] IDENTIFIED BY '123456';
mysql> GRANT all privileges ON cactidb.* TO
[email protected] IDENTIFIED BY '123456';
mysql> flush privileges; 

你可能感兴趣的:(Install,职场,nagios,休闲)