Cacti 0.8.8h One-click installation package

Source: Internet
Author: User
Tags rrdtool snmp syslog rsyslog

Cacti 0.8.8h One-click installation script

This script integrates all the latest cacti versions and the latest common plugins

Includes latest plugins such as thold settings syslog clog Monitor

RRDtool supports Chinese fonts and Chinese titles

Default installation is rrdtool1.3 version

In the script, a watermark-rrdtool RPM file has been installed locally via Yum. Can be deleted according to demand

RRDtool Modify Watermark Tutorial


Note: The Thold template in this tutorial is currently not referenced properly and is looking for a workaround


# cacti 0.8.8h  One-click installation Script # make by fenei# e-mail : [email  protected]# date : 13-sep-2016#  url:http://babyfenei.blog.51cto.com/443861/1852324#   Need Chinese font, please modify Settings-paths-rrdtool default font to the actual position of the font (/USR/SHARE/FONTS/SIMSUN.TTC) #  Enable the Realtime feature   need to modify  settings-Misc-Cache Directory  for  /var/www/html/cache/#  Enable the Spine query feature   need to modify  settings-Paths-Spine Poller File Path  for  /usr/local/spine/ bin/spine#!/bin/bashchkconfig iptables offservice iptables stopsed -i  ' S/SELINUX =enforcing/selinux=disabled/g '  /etc/selinux/config/usr/sbin/setenforce 0yum install -y  wgetmkdir -p /usr/src/cacti\cp -fr -r * /usr/src/cacti/ cd /usr/ src/cacti/ #  installation apacheyum install -y httpdchkconfig httpd onservice  httpd start#  installation MYSQLYUM&NBSp;install -y mysql-server  mysql mysql-develchkconfig mysqld onservice  mysqld start#  CREATE database user name password mysqladmin -u root password [email protected] @123!yum install -y php php-gd rrdtool php-mysql php-cli php-ldap  php-snmp php-mbstring php-mcrypt rsyslog-mysql  ntpdate   Openssh-clients gcc gcc-c++ make automake patch libtool net-snmp-devel  openssl-devel  gettext  ruby  mkfontscale fontconfigservice  httpd restart#  Installing Fonts cp simsun.ttc /usr/share/fonts/mkfontscalefc-cache -f -v#   Update RRDtool, this step can skip cd rrdtool/yum localinstall -y *  cd /usr/src/cacti/  #  installation snmpyum install -y net-snmp-utils yum install -y  Tftp-serverchkconfig xinetd onservice xinetd startchkconfig snmpd onservice snmpd restart#  installation cacticd /usr/src/cacti/ cacti/tar zxvf cacti*.tar.gzmv -f cacti*/* /var/www/html/#  Creating realtime  Cache Folder Cd /usr/src/cacti/ mkdir  /var/www/html/cache/chown -r apache:apache  /var/www/html/#  add cacti Chinese title font support sed -i  ' $i  setlocale (lc_ctype, "ZH_CN. UTF-8 ");  /var/www/html/lib/functions.php#  Modify the suffix of the specified cacti Web site in the config.php file to/sed -i  ' s/^.*url_path.*$/$ url_path =  "\";/'  /var/www/html/include/config.phpsed -i  ' s/^.*date.timezone.*$/ date.timezone =  "Asia\/shanghai";/'  /etc/php.iniservice httpd restart#  Set database mysql -u root [email protected]@123! -e  ' create database  ' cacti '  DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci; ' mysql -u root [email protected]@123!  -e  "create user  ' cactiuser ' @ ' localhost '  IDENTIFIED BY  ' cactiuser ';" mysql -u root [email protected]@123!  -e  ' GRANT ALL PRIVILEGES  ON  ' cacti '  . * TO  ' cactiuser ' @ ' localhost '; ' mysql -u root [email protected]@123! -e  ' flush privileges; ' Mysql -u cactiuser -pcactiuser cacti --default-character-set=utf8 < /var /www/html/cacti.sqlecho  "*/5 * * * * root /usr/bin/php /var/www/html/ Poller.php > /dev/null 2>&1 " > /etc/cron.d/cacti#  Sync time Command \cp - fr /usr/share/zoneinfo/asia/shanghai /etc/localtimeecho  "*/5 * * * *  Root /usr/sbin/ntpdate time.windows.com > /dev/null 2>&1 " > / etc/cron.d/ntpservice crond restart#  installation Spinecd /usr/src/cacti/spine/tar zxvf cacti-spine*.tar.gzcd cacti-spine*./configure make &&  make installcp /usr/local/spine/etc/spine.conf.dist  /usr/local/spine/etc/spine.conf#   If the picture does not appear, and run/usr/local/spine/bin/spine  error, copy the spine configuration file to/etc directory cp  /usr/local/spine/etc/ spine.conf /etc/ /usr/local/spine/bin/spinecd /usr/src/cacti/#  Installing plug-ins mkdir  /var/ www/html/plugins/settings/tar zxvf settings*.tgzmv settings*/* /var/www/html/plugins/ settings/chown -r apache:apache /var/www/html/plugins/settings/mkdir  /var/www/html/ plugins/aggregate/tar zxvf aggregate*.tgz mv aggregate*/* /var/www/html/plugins/ Aggregate/chown -r apache:apache /var/www/html/plugins/aggregate/mkdir  /var/www/html /plugins/syslog/tar zxvf syslog*.tgzmv syslog*/* /var/www/html/plugins/syslog/chown - r apache:apache /var/www/html/plugins/syslog/mkdir  /var/www/html/plugins/clog/tar zxvf clog*.tgz mv  Clog*/* /var/www/html/plugins/clog/chown -r apache:apache /var/www/html/plugins/clog/mkdir   /var/www/html/plugins/thold/tar zxvf thold*.tgzmv thold*/* /var/www/html/ Plugins/thold/chown -r apache:apache /var/www/html/plugins/thold/mkdir  /var/www/html /plugins/monitor/tar zxvf monitor*.tgz mv monitor*/* /var/www/html/plugins/monitor/ chown -r apache:apache /var/www/html/plugins/monitor/mkdir  /var/www/html/plugins/ Realtime/tar zxvf realtime*.tgz mv realtime*/* /var/www/html/plugins/realtime/mkdir  -p /var/www/html/plugins/realtime/cachechown -r apache:apache /var/www/html/plugins/ realtime/service httpd restart#  Installation syslog Support yum install -y  rsyslog-mysql#   Create a new syslog database and give permissions Mysql -uroot [email protected]@123! -e  ' create database syslog; ' mysql -uroot [email protected]@123! -e  "Grant all on syslog.* to  [email protected] IDENTIFIED BY  ' Cactiuser '; " mysql -uroot [email protected]@123! -e  ' flush privileges; ' mysql -uroot [email protected]@123! syslog --default-character-set=utf8 <  /var/www/html/plugins/syslog/syslog.sql#  Change the syslog configuration using a separate database sed -i  ' s/$use _cacti_db =  true;/$use _cacti_db = false;/'  /var/www/html/plugins/syslog/config.php#  Enable syslog before modifying Rsyslog partial parameter echo  ' *.* @ @localhost: 514 '  >> /etc/rsyslog.confecho  ' $ Modload imudp '  >> /etc/rsyslog.confecho  ' $ModLoad  imklog '  >> / etc/rsyslog.confecho  ' $ModLoad  imuxsock '  >> /etc/rsyslog.confecho  ' $ModLoad immark '  >> /etc/rsyslog.confecho  ' $ModLoad  imtcp '  >> /etc/ rsyslog.confecho  ' $UDPServerRun  514 '  >> /etc/rsyslog.confecho  ' $ModLoad   Ommysql '  >> /etc/rsyslog.confecho  ' $template  cacti_syslog, "insert into  Syslog_incoming (facility, priority, date, time, host, message)  values  (% syslogfacility%, %syslogpriority%,  ' "'" '%timereported:::d ate-mysql% ' "'" ' "',  '" ' "'%timereported::: date-mysql% ' "'" ' "',  '" ' "'" '%hostname% ' "'" ',  ' "'" '%msg% ' "'" ' ",  sql '  >> /etc/ rsyslog.confecho  ' *.*    >localhost,syslog,cactiuser,cactiuser;cacti_syslog '   >> /etc/rsyslog.confecho  ' *.*   /var/log/file.log '  >> /etc/ rsyslog.confchkconfig rsyslog onservice rsyslog restart#  installation Complete, modify the content as needed echo  " If you need a Chinese font, please modify Settings-paths-rrdtool&nbsP;default font   need to modify   Enable realtime feature for font physical location (/USR/SHARE/FONTS/SIMSUN.TTC) "echo " settings-misc-cache directory  for  /var/www/html/cache/"echo " Enable the spine query function   need to modify   settings-paths-spine poller file path  for  /usr/local/spine/bin/spine "

Attached: one-click installation package

CACTI0.8.8H One-click installation package


This article is from the "www.fenei.com" blog, make sure to keep this source http://babyfenei.blog.51cto.com/443861/1852324

Cacti 0.8.8h One-click installation package

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.