Cacti監視軟體的安裝

來源:互聯網
上載者:User

標籤:cacti安裝   webseven   系統監控   

Install and Configure Cacti

1.Required Packages for RPM-based Operating Systems

yum -y install cairo-devel libxml2-devel pango-devel php-mysql mysql-devel php-snmp php-xml net-snmp-utils net-snmp

2.install rrdtool

[[email protected] ~]# cd rrdtool-1.4.7

[[email protected] rrdtool-1.4.7]# ./configure --prefix=/usr/local/rrdtool

[[email protected] rrdtool-1.4.7]# make && make install

[[email protected] rrdtool-1.4.7]# ln -s /usr/local/rrdtool/bin/* /usr/local/bin/

3.Create cacti os user 

shell>mkdir /home/cacti

shell> useradd -r -s /sbin/nolog -h /home/cacti cacit

shell>chown cacti:cacti /home/cacti

4.Extract the distribution tarball. Untar to the DOCUMENT_ROOT of your web server

shell> tar -xzvf cacti.tar.gz

5.Create the MySQL database:

shell> mysqladmin --user=root create cacti

6.Import the default cacti database:

shell> mysql cacti < cacti.sql

7.Optional: Create a MySQL username and password for Cacti.

shell> mysql --user=root mysql

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

mysql> flush privileges

8.Edit “include/config.php” and specify the database type, name, host, user and password for your Cacti configuration.

$database_type = "mysql";

$database_default = "cacti";

$database_hostname = "localhost";

$database_username = "cactiuser";

$database_password = "cacti";

$url_path = "/";

9.Configure the privileges of rra and log:

shell> chown -R cacti:cacti rra/ log/

10.Configure snmp.conf

修改com2sec notConfigUser default public為:

com2sec notConfigUser 10.0.1.0/24(根據實際情況修改) public

修改access notConfigGroup ""      any       noauth    exact systemview none none,為

access notConfigGroup ""      any       noauth    exact all    none none

修改#view all    included .1 80為

view all    included .1 80

重啟snmp服務:service snmpd restart

執行命令驗證:snmpwalk -v 2c -c public your_remote_ip if 

11.Configure httpd.conf

cat /etc/httpd/conf.d/cacti.conf

Listen 8888

NameVirtualHost *:8888


<VirtualHost *:8888>

  DocumentRoot /usr/local/cacti

ServerName *

ErrorLog /usr/local/cacti/log/mycacti_err.log

CustomLog logs/mycacti.log common

</VirtualHost>

啟動httpd服務:service httpd restart

12.Add a line to your ”/etc/crontab” file similar to1):

crontab -e -u cacti

*/5 * * * * /usr/bin/php /user/local/cacti/poller.php > /dev/null 2>&1

13.訪問http://ip:7777/,至此Cacti安裝完成.



本文出自 “webseven” 部落格,請務必保留此出處http://webseven.blog.51cto.com/4388012/1537434

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在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.