CentOS Deployment Cacti 1.X

Source: Internet
Author: User
Tags php mysql snmp centos

Cacti dependence php mysql cacti configure know errors

Cacti Dependence PHP

#/etc/php.ini
safe_mode = Off
date.timezone = "Asia/shanghai"
MySQL
[Mysqld]
Basedir =/opt/mysql_cacti/
datadir =/opt/mysql_cacti/data
bind-address= 0.0.0.0
port = 3333
user= MySQL
# server_id = ...
.. Socket =/opt/mysql_cacti/mysql.sock
max_heap_table_size=1567m
max_allowed_packet=16777216
join_ buffer_size=64m
tmp_table_size=64m
innodb_buffer_pool_size=7835m
innodb_doublewrite=0
innodb_additional_mem_pool_size=80m
innodb_flush_log_at_timeout=3
innodb_read_io_threads=32
Innodb_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.gz shell> tar xzf cacti-1.1.3.tar.gz- c/www/shell> ln-s/www/cacti-1.1.3//www/cacti shell> cd/www/cacti/shell> mysql-root-p mysql> Create D
Atabase 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.* T
O Cactiuser@localhost identified by ' Somepassword ';
mysql> flush Privileges; Mysql> exit #创建cacti帐号, give permission shell> chown-r cactiuser rra/log/#/etc/crontab */5 * * * * Cactiuser PHP/VAR/WWW/HT ml/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/C Acti/this
   would be set to/cacti/
*/
$url _path = "/cacti/";

/* Default session name-session name must contain alpha characters */
# $cacti _session_name = "cacti";

Restart Nginx php MySQL
Visit http://localhost/cacti

No error is required, and the installation is complete.

#更多内容详见官方手册
Http://docs.cacti.net/manual Know errors

1.

Error:your CACTI Database login account does not has access to the
MySQL TimeZone database. 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
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

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.