cacti监控
一、 使用RPM包配置LANP
1、 安装并配置apache、mariadb
1)
安装apache和mariadb数据库
[root@centos01 ~]# rm -rf /etc/yum.repos.d/CentOS-*
[root@centos01 ~]# mount /dev/cdrom /mnt/
mount: /dev/sr0 写保护,将以只读方式挂载
[root@centos01 ~]# yum -y install httpd mariadb mariadb-server
2)
安装php依赖工具
[root@centos01 ~]# yum -y install zlib freetype libjpeg fontconfig gd libxml2-devel php-gd
3)
安装php
[root@centos01 ~]# yum -y install php php-mysql
4)
修改php主配置文件
[root@centos01 ~]# vim /etc/php.ini
879 date.timezone = Asia/Shanghai
5)
创建php测试文件
[root@centos01 ~]# vim /var/www/html/index.php
6)
修改apache配置文件
[root@centos01 ~]# vim /etc/httpd/conf/httpd.conf
163
164 DirectoryIndex index.html index.php
165
7)
启动apache服务
[root@centos01 ~]# systemctl start httpd
[root@centos01 ~]# systemctl enable httpd
8)
启动mariadb服务
[root@centos01 ~]# systemctl start mariadb
[root@centos01 ~]# systemctl enable mariadb
9)
Mariadb数据库设置密码
[root@centos01 ~]# mysqladmin -uroot password
New password:
Confirm new password:
10)
客户端访问
2、 安装snmp和rrdtool工具
1)
安装snmp
[root@centos01 ~]# yum -y install net-snmp-utils net-snmp
2)
设置开机自动启动
[root@centos01 ~]# systemctl enable snmpd
3)
安装rrdtoo依赖工具
[root@centos01 ~]# yum -y install cairo-devel zlib-devel libxml2 libxml2-devel glib2 glib2-devel libpng libpng-devel freetype freetype-devel libart_lgpl pango pango-devel perl-CPAN
4)
安装rrdtool工具
[root@centos01 ~]# tar zxvf rrdtool-1.7.2.tar.gz -C /usr/src/
[r