标签:linu ado 添加 分享图片 基于 firewalld otc included pre
Cacti 简介systemctl stop firewalld.service
setenforce 0
yum -y install httpd
yum -y install mariadb mariadb-server
yum -y install php php-mysql
yum -y install zlib freetype libjpeg fontconfig gd libxml2 php-gd
yum -y install net-snmp net-snmp-utils #安装 snmp 协议
yum -y install rrdtool rrdtool-devel #安装 rrdtool 绘图软件
cd /var/www/html/
vim index.php
<?php
phpinfo();
?>
systemctl start httpd.service
tar zxvf cacti-0.8.8g.tar.gz
mv cacti-0.8.8g.tar.gz /var/www/html/cacti
useradd -M -s /sbin/nologin cacti #创建管理 cacti 用户
chown -R cacti.cacti /var/www/html/cacti/ #更改属主属组
vim /etc/my.cnf
[mysqld]
default-storage-engine=MyISAM #添加默认引擎
systemctl restart mariadb #重启服务
vim /var/www/html/cacti/cacti.sql
:.,$s/TYPE=MyISAM/engine=InnoDB/ #全文替换
systemctl start mariadb.service #开启服务
mysql -uroot -p #进入数据库
create database cacti default character set utf8; #创建 cacti 数据库
grant all on cacti.* to ‘cacti‘@‘localhost‘ identified by ‘abc123‘; #添加权限
FLUSH PRIVILEGES; #刷新权限
cd /var/www/html/cacti/
mysql -u cacti -p cacti < cacti.sql
vim /var/www/html/cacti/include/config.php
$database_type = "mysql";
$database_default = "cacti"; #修改数据库名称
$database_hostname = "localhost";
$database_username = "cacti"; #修改授权用户
$database_password = "abc123"; #修改授权密码
systemctl stop firewalld.service
setenforce 0
yum -y install net-snmp net-snmp-utils #被控 Linux 需要安装 snmp 协议
vim /etc/snmp/snmpd.conf
com2sec notConfigUser 192.168.100.130 public #主控端地址
access notConfigGroup "" any noauth exact all none none
view all included .1 80
标签:linu ado 添加 分享图片 基于 firewalld otc included pre
原文地址:http://blog.51cto.com/13640803/2164157