首页 > 代码库 > cacti详细安装配置
cacti详细安装配置
首先搭建LAMP环境
1:安装apache
安装apache前先要安装apr,apr-util pcre(一些老版本不需要)
wget http://mirrors.tuna.tsinghua.edu.cn/apache//httpd/httpd-2.4.27.tar.gz
tar -zxvfhttpd-2.4.27.tar.gz
cd httpd-2.4.27
./configure --prefix=/usr/local/apache2 --with-apr=/usr/local/apr --with-apr-util=/usr/local/apr-util --with-pcre=/usr/local/pcre
make && make install
2:安装mysql
mysql安装这里就不细说了,可以看我之前的博客有mysql源码安装步骤。
3:php安装
wget http://cn2.php.net/get/php-5.5.38.tar.gz/from/this/mirror
tar -zxvf php-5.5.38.tar.gz
cd php-5.5.38
./configure --prefix=/usr/local/php5/ --with-config-file-path=/usr/local/php5/etc/ --with-apxs2=/usr/local/apache2/bin/apxs --with-mysql=/usr/local/mysql/ --enable-sockets
make && make install
cp cp php.ini-development /usr/local/php5/etc/php.ini
LAMP环境搭建wanc
cacti安装 需要这三个主程序 cacti rrdtool snmp
1:安装rrdtool
安装前先要安装对应的lib库
yum install cairo-devel libxm12-devel pango pango-devel -y
wget http://oss.oetiker.ch/rrdtool/pub/rrdtool-1.4.6.tar.gz
tar -zxvf rrdtool-1.4.6.tar.gz
cd rrdtool-1.4.6
./configure --prefix=/usr/local/rrdtool
make && make install
2:安装snmp
yum install net-snmp net-snmp-libs net-snmp-utils
3:安装cacti
wget https://www.cacti.net/downloads/cacti-0.8.8a.tar.gz
tar zxvf cacti-0.8.8a.tar.gz
mv cacti-0.8.8a /usr/local/apache2/htdocs/cacti
chmod -R 777 cacti/rra
chmod -R 777 cacti/log
新建数据库
mysql -uroot -p
create database cacti;
grant all on cacti.* to cacti@"localhost" identified by ‘123‘;
导入数据库
mysql -ucacti -p123 cacti </usr/local/apache2/htdocs/cacti/cacti.sql
修改cacti配置文件
vi cacti/incalude/config.php
然后通过http://ip/cacti/ 访问
cacti详细安装配置