Cacti Chinese version installation on centos

Source: Internet
Author: User
Tags rrdtool snmp snmpwalk

Recently, someone asked me where to download the cacti Chinese version and how to install it. Here I will explain it to you:Cacti Chinese VersionInCentosInstall On

1. Basic installation

Cacti runs in a working environment such as Apache + PHP + MySQL + net-snmp tool set + rrdtool. Therefore, we need to create a basic working environment first.

Note: Install the RPM extension package before installation. For the installation method, see my other article "Advanced RPM management"

  1. # Yum-y install MySQL mysql-server PHP-mysql httpd PHP
  2.  

Complete the above PHP, HTTP, MySQL environment, and then install the package to be used

  1. # Yum-y install PHP-PDO lm_sensors net-snmp PHP-SNMP net-snmp-utils Perl-net-daemon Perl-plrpc Perl-DBI rrdtool Perl-DBD-MySQL
  2.  

After installation, start related programs and set startup

  1. # Chkconfig mysqld on
  2.  
  3. # Chkconfig httpd on
  4.  
  5. # Server mysqld start
  6.  

2. Database settings

Prepare the database, Set permissions, and install cacti.

  1. # Mysql-uroot-P
  2.  
  3. Mysql> Create Database cacti default Character Set utf8;
  4.  
  5. Mysql> grant select, insert, update, delete, index, alter, create, lock tables, create temporary tables, drop, references on cacti. * To [email protected] identified by 'passwd ';
  6.  
  7. Mysql> flush privileges;
  8.  
  9. Mysql> \ q
  10.  

    3. Download and install

    Download the Chinese cacti and decompress it to/var/www/cacti. Then enter the cacti directory. Import the cacti data structure.

    : Cacti-0.8.7e-cn-utf8.tar.gz

    1. # Cd/var/www/cacti
    2.  
    3. # Mysql-u cacti-P cacti <cacti. SQL
    4.  

    Modify configuration file

    1. # Vim/var/www/cacti/include/config. php
    2.  
    3. $ Database_type = "MySQL ";
    4.  
    5. $ Database_default = "cacti ";
    6.  
    7. $ Database_hostname = "localhost ";
    8.  
    9. $ Database_username = "cacti ";
    10.  
    11. $ Database_password = "passwd ";
    12.  
    13. $ Database_port = "3306 ";
    14.  

    Add a cacti user

    1. $ Useradd cacti-D/var/www/cacti-S/bin/false
    2.  
    3. $ Chown-r cacti/var/www/cacti/RRA/var/www/cacti/log
    4.  

    The above may not work:

    1. # Chown-HR cacti/var/www/cacti/RRA/var/www/cacti/log
    2.  

    4. Configure the httpd server configuration file

    1. # Vim/etc/httpd/CONF. d/cacti. conf
    2.  
    3. Alias/cacti/var/www/cacti
    4.  
    5. Directoryindex index. php
    6.  
    7. AllowOverride all
    8.  
    9. Order deny, allow
    10.  
    11. Deny from all
    12.  
    13. Allow from all
    14.  
    15. Addtype application/X-httpd-PHP. php
    16.  
    17. Php_flag magic_quotes_gpc on
    18.  
    19. Php_flag track_vars on
    20.  

    Restart the HTTPd service to make the above modification take effect.

    1. #/Etc/init. d/httpd restart
    2.  

     5. test whether the installation is normal.

    Open the following URL.

    Http://server.ip.or.name/cacti

    Open the website, click Next, select new install, and press Enter.

    The Last User Name is admin and the password is admin.

    6. Final

    The system collects data every five minutes.

    1. Crontab-e
    2.  
    3. */5 * cacti PHP/var/www/cacti/poller. php &>/dev/null
    4.  

    You can also run it once manually:/var/www/cacti/poller. php

    7. Solution to abnormal font display in the image

    Download and install the cjkuni-fonts Chinese font, Ukai. TTF, http://ftp.tw.debian.org/debian/pool/main/t/ttf-arphic-ukai/ttf-arphic-ukai_0.1.20060928.orig.tar.gz

    1. # Tar zxvf ttf-arphic-ukai_0.1.20060928.orig.tar.gz
    2.  
    3. # Cd ttf-arphic-ukai-0.1.20060928/
    4.  
    5. # Cp Ukai. TTF/usr/share/fonts/Ukai. TTF
    6.  

    After the installation is complete, note the following two required changes in "Settings. general-> rrdtool application version changed to 1.2.x. The default value is 1.0.x. the image may not be displayed normally. path-> the default font path of rrdtool is changed to the Ukai installed above. TTF file path, such as/usr/share/fonts/Ukai. TTF

    8. SNMP file settings of the monitored host

    SNMP needs to be configured for the monitored host. (Thank you for your reminder)

    1. # Vi/etc/snmp/snmpd. conf
    2.  

    Change

    1. Com2sec notconfiguser default public

    Change

    1. Com2sec notconfiguser 127.0.0.1 public

    2. Change

    1. Access notconfiggroup "" any noauth exact systemview none
    2.  

    Change

    1. Access notconfiggroup "" any noauth exact all none
    2.  

    3,

    1. # View all supported ded. 1 80
    2.  

    Remove the # comment above. Save and exit

    The above are very important. Please note that you will not be able to get the data.

    9. Test whether SNMP is normal

    1. # Snmpwalk-C public-V 2C localhost
    2.  
    1. # Snmpwalk-V 1-C public localhost IP-MIB: ipadentifindex
    2.  
    3. IP-MIB: ipadentifindex.61.xxx. XXX. XXX = integer: 2 IP-MIB: ipadentifindex.127.0.0.1 = integer: 1 IP-MIB: ipadentifindex.172.xxx. XXX. XXX = integer: 3
    4.  

    You can also run the snmpd-F-Le command to check whether any errors have occurred.

    Through the above article, everyone should learn how to install cacti on centos. I hope this article will help you!

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.