编译安装gd库:
1.#tarzxvfgd-2.0.35.tar.gz 编译安装Curl支持
1.#tarzxvfcurl-7.15.0.tar.gz 编译安装PHP
1.#tarzxvfphp-5.2.6.tar.gz 要改的有如下几处
1.一般都在#AddTypeapplication/x-tar.tgz下加一行:
#LoadModulephp5_modulemodules/libphp5.so
AddTypeapplication/x-httpd-php.php
1.如果你搜索其它地方没有以下这行:
LoadModulephp5_modulemodules/libphp5.so
请把上面的#号去掉,还有找到
DirectoryIndexindex.htmlindex.html.var
在后面加index.php让它把index.php做为默认页
1.保存httpd.conf文件.
启动apache
#/usr/local/apache2/bin/apachectlstart
如果没有出错,写一个测试页放到你网页目录下.访问就应该可以看到php的版本等信息了!
用ZendOptimizer加速PHP
1.#tarzxvfZendOptimizer-2.5.3-linux-glibc21-i386.tar.gz
2.#cdZendOptimizer-2.5.3-linux-glibc21-i386
3.#./install.sh
安装的时候注意输入正确的安装apache的路径等内容!
安装完毕,再看看phpinfo页面的zend选项就发现了!!
设置数据文件目录属性这一步相当重要,许多朋友第一次使用tar包安装Mysql的时候就因该目录权限问题导致Mysql无法启动。相当头大.
好了,至此mysql安装完毕.
这样构建Cacit运行的PHP+Mysql环境就基本上完成了。
下边开始安装Cacit所需要的rrdtools图形工具以及snmp工具
编译安装rrdtools
如果./configure时出现下面这个错误
表明系统有功能缺失,需安装libart_lgpl-devel.rpm这个包
如果还是提示听样的错误,有可能是找不到FreeType
把/usr/local/freetype2/lib/pkgconfig下的.pc文件拷贝到/usr/lib/pkgconfig下即可
如果makeinstall时出现[tclrrd.o]错误
就安装tcl-8.4.7-2.i386.rpm以及tcl-devel-8.4.7-2.i386.rpm这2个包
没有或者缺少的话都需要逐一安装上。
而且还很有可能会因rpm的依存关系无法顺利安装,须使用--nodeps参数。
以上所需的rpm安装包都能在RedHatAs4安装光盘上找到。
2.#cdgd-2.0.35
3.#./configure--prefix=/usr/local/gd2--with-zlib=/usr/local/zlib2/
--with-png=/usr/local/libpng2/--with-jpeg=/usr/local/jpeg6/
--with-freetype=/usr/local/freetype2/--with-libart=/usr/
local/libart/--with-gettext=/usr/local/gettext/--with-libxml=/usr/local/libxml2
4.#make&&makeinstall
2.#cdcurl-7.15.0
3.#./configure--prefix=/usr/local/curl
4.#make&&makeinstall
2.#cdphp-5.2.6
3.#./configure--prefix=/usr/local/php--with-apxs2=/usr/local/apache26/bin/apxs
--with-jpeg-dir=/usr/local/jpeg6/--with-png-dir=/usr/local/libpng2/--with-
gd=/usr/local/gd2/--with-freetype-dir=/usr/local/freetype2/--
with-zlib-dir=/usr/local/zlib2/--with-mysql=/usr/local/mysql--with-
curl=/usr/local/curl--with-gettext=/usr/local/gettext
4.#make&&makeinstall
5.#cpphp.ini-dist/usr/local/php/lib/php.ini(拷贝PHP配置文件至安装目录)
6.#vi/usr/local/apach26/conf/httpd.conf
(修改apache配置文件并加载PHP支持)
安装MYSQL#groupaddmysql
#useradd-gmysqlmysql
#tarzxvfmysql-5.1.24-rc.tar.gz
#cdmysql-5.1.24-rc
#./configure--prefix=/usr/local/mysql
--localstatedir=/data/mysql(指定数据文件目录)
--without-innodb--without-debug--with-extra-charsets=gbk
--with-extra-charsets=all--enable-assembler--with-pthread
--enable-thread-safe-client--with-client-ldflags=-all-static
#make&&makeinstall
#cp./support-files/mysql.server/etc/init.d/mysql(复制Mysql启动服务至系统)
#chmod777/etc/init.d/mysql (赐予可执行权限)
#chownmysql:mysql/data/mysql(设置数据文件目录属性)
#/usr/local/mysql/bin/mysql_install_db (初始化数据库)
#servicemysqlstart (启动Mysql)
#/usr/local/mysql/bin/mysqladmin-uroot-ppassword'xxxxx'(设置管理员密码xxx默认值为空)
#tarzxvfrrdtool-1.2.27.tar
#cdrrdtool-1.2.27
#./configure--prefix=/usr/local/rrdtool
#make&&makeinstall
configure:error:Pleasefixthelibraryissueslistedaboveandtryagain.
安装net-snmp、snmpwalk和snmpget命令
#rpm-qa|grepnet-snmp (查看系统中有否已经装有所需的软件)
net-snmp-5.0.9-2.30E.15
net-snmp-devel-5.0.9-2.30E.15
net-snmp-libs-5.0.9-2.30E.15
net-snmp-utils-5.0.9-2.30E.15
支持Cacti运作的PHP+RRDtool环境配置方法 -2
最新推荐文章于 2025-08-16 15:15:04 发布