cacti監控伺服器部署

來源:互聯網
上載者:User

標籤:cacti   監控   

  Cacti是通過 snmpget來擷取資料,使用 RRDtool繪畫圖形,而且你完全可以不需要瞭解RRDtool複雜的參數。它提供了非常強大的資料和使用者管理功能,可以指定每一個使用者能查看樹狀結構、host以及任何一張圖,還可以與LDAP結合進行使用者驗證,同時也能自己增加模板,功能非常強大完善。

 一、安裝

  1安裝LAMP環境

  #yum install -y httpd php php-mysql php-snmp php-xml php-gd mysql mysql-server mysql-sevel

  #service httpd start

  #chkconfig httpd on

  #service mysqld start

  #chkconfig mysqld on

  #mysqladmin -u root password ‘password‘


  二、安裝配置net-snmp

   1安裝net-snmp組件

   #yum install -y net-snmp net-snmp-utils net-snmp-libs net-snmp-devel

   2設定檔

   #vim /etc/snmp/snmpd.conf

    access not ConfigGroup ""      any  noauth    exact systemview none none(改為)

    access  notConfigGroup ""      any  noauth    exact  all  none none

    view all    included  .1                               80


   三、安裝rrdtool

    #yum install -y rrdtool


   四、下載安裝cacti    

    #wget http://www.cacti.net/downloads/cacti-0.8.8b.tar.gz

    #tar -zxvf cacti-0.8.8b.tar.gz

    #mv cacti-0.8.8b /var/www/html/cacti

    #cd /var/www/html/cacti/


    五、設定資料庫

    1建立資料庫

     mysql>create database cacti;

    2建立使用者授權

     mysql> GRANT ALL ON cacti.* to [email protected] IDENTIFIED BY ‘cacti‘;

     mysql>flush privileges;

    3匯入資料庫

     #mysqldump -ucacti -p  cacti < cacti.sql


    六、修改設定檔

     #vim /var/www/html/cacti/include/config.php

      $database_type = "mysql";

      $database_default = "cacti";

      $database_hostname = "localhost";

      $database_username = "cacti";

      $database_password = "cacti";

      $database_port = "3306";

      $database_ssl = false;

      $url_path = "/cacti/";(取消注釋)

     #chown -R apache /var/www/html/cacti


     七、配置計劃任務

     #echo "*/5 * * * * root php /var/www/html/cacti/poller.php > /dev/null 2>&1" >> /etc/crontab

     #service crond restart


     八、完成安裝cacti

     http://ip/cacti


     用戶端只需要配置net-snmp的community與伺服器端一直即可,見步驟二




本文出自 “不萊梅樂隊” 部落格,謝絕轉載!

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.