配置cacti环境

rpm -qa | grep "zlib" 检查是否安装 zlib-devel
rpm -qa | grep "libpng" 检查是否安装 libpng-devel
rpm -qa | grep "libjpeg" 检查是否安装 libjpeg-devel
rpm -qa | grep "freetype" 检查是否安装 libjpeg-devel

有则跳过
没有则使用安装光盘用rpm进行安装

GD安装
         root@localhost# cd /home/vaio/soft/
         root@localhost# tar -zxvf gd-2.0.35.tar.gz
         root@localhost# cd  gd-2.0.35
         root@localhost#  ./configure  --with-jpeg --with-zlib --with-freetype --with-png
         root@localhost# make
         root@localhost# make install
apache 安装
./configure --prefix=/usr/local/apache --enable-so  --enable-rewrite 

php 安装
./configure --prefix=/usr/local/php --with-gd --with-jpeg-dir --with-zlib --with-png-dir --with-freetype-dir  --enable-magic-quotes --with-mysql=/usr/local/mysql --with-apxs2=/usr/local/apache/bin/apxs --with-config-file-path=/usr/local/php/etc --enable-soap --enable-sockets --enable-mbstring=LANG --enable-bcmath  --with-mcrypt


rrdtool安装
         root@localhost# cd /home/vaio/soft/
         root@localhost# tar �Czxvf rrdtool-1.2.27.tar.gz 
         root@localhost# cd rrdtool-1.2.27
         root@localhost# ./configure --prefix= /usr/local/rrdtool


----------------------------------------------------------------------------
rrdtool  安装出错
* I found a copy of pkgconfig, but there is no cgilib.pc file around.
  You may want to set the PKG_CONFIG_PATH variable to point to its
  location.


* I could not find a working copy of libart-2.0. Check config.log for hints on why

安装 libcgi 
wget [url]http://people.ee.ethz.ch/~oetiker/webtools/rrdtool/pub/libs/cgilib-0.5.tar.gz[/url] 
tar zxvf cgilib-0.5.tar.gz 
cd cgilib-0.5 
make 

cp libcgi.a /usr/local/lib 
cp cgi.h /usr/include 

安装libart  可用yum安装
wget [url]http://people.ee.ethz.ch/~oetiker/webtools/rrdtool/pub/libs/libart_lgpl-2.3.17.tar.gz[/url]
tar zxvf libart_lgpl-2.3.17.tar.gz
cd libart_lgp-2.3.17
./configure 
make 

cp -r /libart_lgpl-2.3.17include/libart-2.0 /usr/include

------------------------------------------------------------------------------------------
gd 编译时出错

configure.ac:64: error: possibly undefined macro: AM_ICONV
      If this token and others are legitimate, please use m4_pattern_allow.
      See the Autoconf documentation


解决办法
编译加m4_pattern_allow参数
即:./configure --enable-m4_pattern_allow



php 出错

缺少 mcrypt  安装libmcrypt


启动 Apache 报错
cannot restore segment prot after reloc: Permission denied 

selinux的设置 
chcon -t texrel_shlib_t libphp5.so

你可能感兴趣的:(职场,监控,休闲)