免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 3540 | 回复: 3
打印 上一主题 下一主题

RHEL5+RRDTool-1.2.19+Cacti-0.8.6j [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2007-08-28 15:19 |只看该作者 |倒序浏览

RHEL5+Apache-2.2.4+MySQL-5.0.37+ PHP-5.2.1+ RRDTool-1.2.19+Cacti-0.8.6j

安装SNMP:
disk 2
rpm -ivh /media/Server/lm_sensors-2.10.0-3.1.i386.rpm
disk 3
rpm -ivh /media/Server/net-snmp*

rpm -qa|grep net-snmp
net-snmp-5.3.1-14.el5
net-snmp-perl-5.3.1-14.el5
net-snmp-libs-5.3.1-14.el5
net-snmp-utils-5.3.1-14.el5

# vi /etc/snmp/snmpd.conf
更改 1、com2sec notConfigUser default     public
     改为:com2sec notConfigUser   127.0.0.1     public
     2、access notConfigGroup ""     any     noauth   exact systemview none none
     改为:access notConfigGroup ""     any     noauth   exact all none none
     3、#view all   included .1       80
     将前面的 # 注释 去掉。
保存退出 :wq
# service snmpd restart
chkconfig --level 345 snmpd on

安装Apache
tar -zvxf httpd-2.2.4.tar.gz
cd httpd-2.2.4
./configure --prefix=/usr/local/apache --enable-so

make
make install

/usr/local/apache/bin/apachectl start


安装MYSQL
disk 1
rpm -ivh /media/Server/ncurses-5.5-24.20060715.i386.rpm
disk 2
rpm -ivh /media/Server/ncurses-devel-5.5-24.20060715.i386.rpm

groupadd mysql
useradd -g mysql -d /usr/local/mysql/data -M mysql
tar -zxvf mysql-5.0.37.tar.gz
cd mysql-5.0.37
./configure --prefix=/usr/local/mysql \              指定安装目录
--sysconfdir=/etc \                              配置文件的路径
--localstatedir=/usr/local/mysql/data \              数据库存放的路径
--enable-assembler \                            使用一些字符函数的汇编版本
--with-mysqld-ldflags=-all-static \                 以纯静态方式编译服务端
--with-charset=gb2312 \                         添加gb2312字符支持
--with-extra-charsets=all                         添加所有字符支持

make
make install
/usr/local/mysql/bin/mysql_install_db
chown -R mysql:mysql /usr/local/mysql/data
cp /usr/local/mysql/share/mysql/mysql.server /etc/rc.d/init.d/mysqld
chkconfig --add mysqld
cp /usr/local/mysql/share/mysql/my-medium.cnf /etc/my.cnf

service mysqld start
/usr/local/mysql/bin/mysqladmin -u root password leo

chkconfig --level 345 mysqld on


mkdir /usr/local/rrdtool
mkdir /usr/local/rrdbuild
BUILD_DIR=/usr/local/rrdbuild/
INSTALL_DIR=/usr/local/rrdtool/

* zlib
tar zxvf zlib-1.2.3.tar.gz
cd zlib-1.2.3
./configure --prefix=$BUILD_DIR/lb
make
make install

* libpng
tar zxvf libpng-1.2.10.tar.gz
cd libpng-1.2.10
CPPFLAGS="-I$BUILD_DIR/lb/include"
LDFLAGS="-L$BUILD_DIR/lb/lib"
./configure --disable-shared --prefix=$BUILD_DIR/lb
make
make install


* freetype
tar jxvf freetype-2.1.10.tar.bz2
cd freetype-2.1.10
./configure --disable-shared --prefix=$BUILD_DIR/lb
make
make install

* libart_lgpl
tar zxvf libart_lgpl-2.3.17.tar.gz
cd libart_lgpl-2.3.17
./configure --disable-shared --prefix=$BUILD_DIR/lb
make
make install

* 再次设置环境变量
IR=-I$BUILD_DIR/lb/include
CPPFLAGS="$IR $IR/libart-2.0 $IR/freetype2 $IR/libpng12"
LDFLAGS="-L$BUILD_DIR/lb/lib"

*RRDTool
tar zxvf rrdtool-1.2.19.tar.gz
cd rrdtool-1.2.19
./configure --prefix=$INSTALL_DIR --disable-python --disable-tcl
make
make install

* GD
tar zxvf gd-2.0.34.tar.gz
cd gd-2.0.34
./configure --prefix=/usr/local/gd --with-freetype=/usr/local/freetype --with-libpng=/usr/local/libpng
make
make install

安装libxml
tar zxvf libxml2-2.6.27.tar.gz
cd libxml2-2.6.27
./configure (xml默认安装就可以,不要指定路径了,因为安装时php可能找不到它,PHP5只支持libxml2-2.5.10以上版本)
make
make install


PHP:
tar zxvf php-5.2.1.tar.gz
cd php-5.2.1
./configure --with-apxs2=/usr/local/apache/bin/apxs --with-mysql=/usr/local/mysql/ --with-gd=/usr/local/gd --with-zlib=/usr/local/rrdbuild/lb/ --with-png=/usr/local/libpng --with-jpeg --with-freetype=/usr/local/freetype --enable-sockets

cp ./php.ini-dist /usr/local/lib/php.ini
修改httpd.conf
#vi /usr/local/apache/conf/httpd.conf
加载php模块,去掉注释“#”,如没有此行,请加上。
LoadModule php5_module        modules/libphp5.so
加上此两行
AddType application/x-httpd-php .php .phtml
AddType application/x-httpd-php-source .phps

DirectoryIndex index.html
在后面加上 index.php
如下:
DirectoryIndex index.html index.php
重启Apache生效

Cacti:
cd /usr/local/apache/htdocs
tar zxvf cacti-0.8.6j.tar.gz
mv cacti-0.8.6j cacti
cd cacti
/usr/local/mysql/bin/mysqladmin -uroot -p create cacti
/usr/local/mysql/bin/mysql -u root -p cacti
创建帐号:
mysql -uroot
grant all privileges on cacti.* to cactiuser@localhost identified by 'cacti';
flush privileges;
exit
useradd cactiuser
chown –R cactiuser rra/ log/
vi ./include/config.php
$database_type = “mysql”;
$database_default = “cacti”;
$database_hostname = “localhost”;
$database_username = “cactiuser”;
$database_password = “cacti”;
vi /etc/crontab
*/5 * * * * cactiuser /usr/local/bin/php /usr/local/apache/htdocs/cacti/poller.php >  /dev/null 2>&1

装完cacti后经常会预览不到图片,然而点击进去该空白图进去却是能正常显示的,原因在于cacti的设置问题,因为默认cacti是用rrdtool 1.0版本的,而我们安装的时候是用了rrdtool 1.2版,故需要作如下设置:
console->setting->General->RRDTool Utility Version 这里选择RRDTool 1.2.x显示即可正常。

最后在cacti的console->setting->Paths->RRDTool Default Font Path中填上中文的fonts,比如:/usr/share/fonts/zh_CN/TrueType/zysong.ttf。

这样在linux上能成功实现中文显示。

输入下面地址测试:
http://leo.gzidc.com/cacti/
默认的用户名和密码都是admin。


本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u/12367/showart_369680.html

论坛徽章:
0
2 [报告]
发表于 2009-03-24 03:54 |只看该作者
大哥,我按照你的教程一步一步做,但是在配置rrdtool 时出现错误:
./configure --prefix=$INSTALL_DIR --disable-python --disable-tcl

checking for FT_Init_FreeType in -lfreetype... yes
checking ft2build.h usability... yes
checking ft2build.h presence... yes
checking for ft2build.h... yes
configure: error: Please fix the library issues listed above and try again.

网上查询资料,我进行了以下3个步骤希望那个可以弥补这错误
1.
安装 libart_lgpl-devel 包

2.
cgilib-0.5, 做了以下操作
tar zxvf cgilib-0.5.tar.gz
cd cgilib-0.5
make
cp libcgi.a /usr/local/lib
cp cgi.h /usr/include

3.
配置上禁用 --disable-rrdcgi      
./configure --prefix=$INSTALL_DIR --disable-python --disable-tcl

但依然显示 "configure: error: Please fix the library issues listed above and try again."
实在没办法了,请大虾指点如何解决这问题

论坛徽章:
0
3 [报告]
发表于 2009-03-24 16:43 |只看该作者
原帖由 tnyu 于 2009-3-24 03:54 发表
大哥,我按照你的教程一步一步做,但是在配置rrdtool 时出现错误:
./configure --prefix=$INSTALL_DIR --disable-python --disable-tcl

checking for FT_Init_FreeType in -lfreetype... yes
checking ft ...



贴上完整的错误信息才好分析是哪里出的问题。
光凭"configure: error: Please fix the library issues listed above and try again."一句话是看不出来的

论坛徽章:
0
4 [报告]
发表于 2010-01-12 15:12 |只看该作者
是rrdtool找不到其他之前安装的几个软件,需要设置freetype等环境变量。。。
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP