centos部署cacti 1.X

來源:互聯網
上載者:User

cacti dependence php mysql cacti configure know errors

cacti dependence php

#/etc/php.inisafe_mode = Offdate.timezone = "Asia/Shanghai"
mysql
[mysqld]basedir = /opt/mysql_cacti/datadir = /opt/mysql_cacti/databind-address= 0.0.0.0port = 3333user=mysql# server_id = .....socket = /opt/mysql_cacti/mysql.sockmax_heap_table_size=1567Mmax_allowed_packet=16777216join_buffer_size=64Mtmp_table_size=64Minnodb_buffer_pool_size=7835Minnodb_doublewrite=0innodb_additional_mem_pool_size=80Minnodb_flush_log_at_timeout=3innodb_read_io_threads=32innodb_write_io_threads=16
shell> yum install net-snmp net-snmp-libs net-snmp-utils rrdtool perl-devel perl-CPAN perl-YAML#安裝依賴shell> wget http://www.cacti.net/downloads/cacti-1.1.3.tar.gzshell> tar xzf cacti-1.1.3.tar.gz -C /www/shell> ln -s /www/cacti-1.1.3/ /www/cactishell> cd /www/cacti/shell> mysql -root -pmysql> create database cacti;Query OK, 1 row affected (0.00 sec)mysql> show databases;+--------------------+| Database           |+--------------------+| information_schema || cacti              || mysql              || performance_schema |+--------------------+4 rows in set (0.00 sec)#建立資料庫mysql> source cacti.sql#匯入資料mysql> GRANT ALL ON cacti.* TO cactiuser@localhost IDENTIFIED BY 'somepassword';mysql> flush privileges;mysql> exit#建立cacti帳號,賦予許可權shell> chown -R cactiuser rra/ log/#/etc/crontab*/5 * * * * cactiuser php /var/www/html/cacti/poller.php > /dev/null 2>&1#將每5分鐘執行一次的資料擷取指令碼加入crontab
cacti configure

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 = "127.0.0.1";$database_username = "cactiuser";$database_password = "cacti";$database_port     = '3333';#修改資料庫連接配置/* load up old style plugins here */$plugins = array();//$plugins[] = 'thold';/*   Edit this to point to the default URL of your Cacti install   ex: if your cacti install as at http://serverip/cacti/ this   would be set to /cacti/*/$url_path = "/cacti/";/* Default session name - Session name must contain alpha characters */#$cacti_session_name = "Cacti";

重啟nginx php mysql
訪問 http://localhost/cacti

無錯誤即可,到此安裝完畢

#更多內容詳見官方手冊
http://docs.cacti.net/manual know errors

1.

ERROR:Your Cacti database login account does not have access to the
MySQL TimeZone database. Please provide the Cacti database account
“select” access to the “time_zone_name” table in the “mysql” database,
and populate MySQL’s TimeZone information before proceeding.

mysql> GRANT SELECT ON mysql.time_zone_name TO cactiuser@localhost IDENTIFIED BY 'cacti'

2.

ERROR: Your MySQL TimeZone database is not populated. Please populate
this database before proceeding.

mysql_tzinfo_to_sql /usr/share/zoneinfo/ | mysql -u root -p mysql

聯繫我們

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