# tar zxvf httpd-2.2.6.tar.gz # cd httpd-2.2.6 # ./configure --prefix=/usr/local/apache26 --enable-module=so --with-mpm=worker --enable-module=rewrite # make && make install 第二步安装 PHP+GD 等所需的支持插件
编译安装libxml
# tar zxvf libxml2-2.6.32.tar.gz # cd libxml2-2.6.32.tar.gz # ./configure --prefix=/usr/local/libxml2/ # make && make install 编译安装zlib
# tar zxvf zlib-1.2.3.tar.gz # cd zlib-1.2.3 #./configure --prefix=/usr/local/zlib2/ # make && make install 编译安装jpeg支持
# tar -zxf jpegsrc.v6b.tar.gz # cd jpeg-6b/ # ./configure --prefix=/usr/local/jpeg6 # make # make install-lib # make install ( 该版本的 jpeg 在实际安装过程中,make install 的时候会出现好几个找不到目录,或目录不存在的 error 。只需按照提示人手创建缺失目录,然后再令其 make install 直到无任何错误提示且顺利完成为止。 )
编译安装 libpng
# tar zxvf libpng-1.2.18.tar.gz # cd libpng-1.2.18.tar.gz #cp scripts/makefile.gcmmx makefile #./configure --disable-shared --prefix=/usr/local/libpng2/ # make && make install 编译安装 freetype
# tar zxvf freetype-2.1.9.tar.gz # cd freetype-2.1.9 #./configure --disable-shared --prefix=/usr/local/freetype2/ # make && make install 编译安装 libart_lgpl
# tar zxvf libart_lgpl-2.3.17.tar.gz # cd ibart_lgpl-2.3.17 #./configure --disable-shared --prefix=/usr/local/libart/ # make && make install 编译安装 gettext
# tar zxvf gettext-0.16.1.tar.gz # cd gettext-0.16.1 # ./configure --prefix=/usr/local/gettext/ # make && make install 编译安装 gd 库 :
# tar zxvf gd-2.0.35.tar.gz # cd gd-2.0.35 # ./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 # make && make install 编译安装 Curl 支持
# tar zxvf curl-7.15.0.tar.gz # cd curl-7.15.0 # ./configure --prefix=/usr/local/curl # make && make install 编译安装 PHP
# tar zxvf php-5.2.6.tar.gz # cd php-5.2.6 # ./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 # make && make install # cp php.ini-dist /usr/local/php/lib/php.ini ( 拷贝 PHP 配置文件至安装目录 ) # vi /usr/local/apach26/conf/httpd.conf ( 修改 apache 配置文件并加载 PHP 支持 ) 要改的有如下几处
安装MYSQL# groupadd mysql # useradd -g mysql mysql # tar zxvf mysql-5.1.24-rc.tar.gz # cd mysql-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 && make install
com2secnotConfigUser default public 改为:com2secnotConfigUser 127.0.0.1 public access notConfigGroup "" any noauth exact systemview none none 改为:accessnotConfigGroup""anynoauthexact all none none
#view all included .1 80 将前面的 # 注释 去掉。 保存退出 :wq 重新启动 snmp 服务 # service snmpd restart 安装 / 配置 cacti
com2secnotConfigUser default public 改为:com2secnotConfigUser 192.168.3.2(server1 地址) public access notConfigGroup "" any noauth exact systemview none none 改为:accessnotConfigGroup""anynoauthexact all none none
#view all included .1 80 将前面的 # 注释 去掉。 保存退出 :wq 重新启动 snmp 服务