In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-30 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article shows you how the Chinese version of Cacti is installed on Centos. The content is concise and easy to understand. It will definitely brighten your eyes. I hope you can get something through the detailed introduction of this article.
Installation of Cacti Chinese version on Centos
1. Basic installation
Cacti operates in a working environment such as apache+php+mysql+net-snmp toolset + rrdtool, so we have to do a basic working environment first.
Remember to install the expansion pack of rpm before installation. For installation methods, see my other article, "Advanced Management of rpm".
# yum-y install mysql mysql-server php-mysql httpd php
Complete a php,http,mysql environment above, and then install the package to be used
# yum-y install php-pdo lm_sensors net-snmp php-snmp net-snmp-utils perl-Net-Daemon perl-PlRPC perl-DBI rrdtool perl-rrdtool perl-DBD-MySQL
After installation, start the relevant programs, and set up boot boot
# chkconfig mysqld on # chkconfig httpd on # server mysqld start
two。 Database Settin
Prepare the database, and set permissions, install cacti.
# mysql-uroot-p mysql > create database cacti default character set utf8; mysql > GRANT SELECT, INSERT, UPDATE, DELETE, INDEX, ALTER, CREATE, LOCK TABLES, CREATE TEMPORARY TABLES, DROP, REFERENCES ON cacti.* TO cacti@localhost IDENTIFIED BY 'passwd'; mysql > flush privileges; mysql >\ Q
3. Download and install
Download cacti in Chinese and extract it to / var/www/cacti. Enter the cacti directory after that. Import the data structure of cacti
Download address: cacti-0.8.7e-cn-utf8.tar.gz
# cd / var/www/cacti # mysql-u cacti-p cacti
< cacti.sql 修改配置文件 #vim /var/www/cacti/include/config.php $database_type = "mysql"; $database_default = "cacti"; $database_hostname = "localhost"; $database_username = "cacti"; $database_password = "passwd"; $database_port = "3306"; 添加cacti用户 $useradd cacti -d /var/www/cacti -s /bin/false $chown -R cacti /var/www/cacti/rra /var/www/cacti/log 这个上面可能添加不行试试: #chown -hR cacti /var/www/cacti/rra /var/www/cacti/log 4. 配置httpd服务器的配置文件 #vim /etc/httpd/conf.d/cacti.conf Alias /cacti /var/www/cacti DirectoryIndex index.php AllowOverride all order deny,allow deny from all allow from all AddType application/x-httpd-php .php php_flag magic_quotes_gpc on php_flag track_vars on 重起httpd的服务,让上面的修改生效 #/etc/init.d/httpd restart 5.测试安装是否正常 打开下面的url. http://server.ip.or.name/cacti 打开网站,点next.选择new install,使用一路回车法.***完成 ***的用户名为: admin 密码为: admin 6.收尾 让系统每5分钟收集,需要 crontab -e */5 * * * * cacti php /var/www/cacti/poller.php &>/ dev/null
You can also run by hand: / var/www/cacti/poller.php
seven. The solution to the abnormal display of fonts in graphics
Download and install cjkuni-fonts Chinese font, font name ukai.ttf, download address http://ftp.tw.debian.org/debian/pool/main/t/ttf-arphic-ukai/ttf-arphic-ukai_0.1.20060928.orig.tar.gz
# tar zxvf ttf-arphic-ukai_0.1.20060928.orig.tar.gz # cd ttf-arphic-ukai-0.1.20060928/ # cp ukai.ttf / usr/share/fonts/ukai.ttf
After the installation is complete, pay attention to change the following two required changes in Settings. General-> RRDTool application version is changed to 1.2.x, default is 1.0.x. If you don't change it, the image may not be displayed properly. Path-> RRDTool default font path to the file path of the ukai.ttf installed above, such as / usr/share/fonts/ukai.ttf
8, snmp file settings of the monitored host
The monitored host needs to be configured with snmp. (thank you for the reminder of the netizen Garden)
# vi / etc/snmp/snmpd.conf
Change
Com2sec notConfigUser default public
Change to
Com2sec notConfigUser 127.0.0.1 public
2. Change
Access notConfigGroup "" any noauth exact systemview none none
Change to
Access notConfigGroup "" any noauth exact all none none
3 、
# view all included. 1 80
Remove the previous # comment. Save exit
The above places are very important, pay attention, or you won't get the data.
9. Test whether the snmp is normal
# snmpwalk-c public-v 2c localhost#snmpwalk-v 1-c public localhost IP-MIB::ipAdEntIfIndex 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
You can also use the snmpd-f-Le command to see if there is anything wrong
The above is how the Chinese version of Cacti is installed on Centos. Have you learned the knowledge or skills? If you want to learn more skills or enrich your knowledge reserve, you are welcome to follow the industry information channel.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.