`

apache2+PHP4.4.1+Mysql4.1.18+GD2+ZendOptimizer (原创)

阅读更多
apache2+PHP4.4.1+Mysql4.1.18+GD2+ZendOptimizer



安装前准备
所有软件目录:/soft/lapm
工作目录:    /soft/dotmp
安装后的程序工作目录: /httpd

package list:

freetype-2.1.10.tar.gz
gd-2.0.33.tar.gz
httpd-2.0.54.tar.gz
jpegsrc.v6b.tar.gz
libpng-1.2.8-config.tar.gz
mysql-4.1.18.tar.gz
php-4.4.1.tar.gz
ZendOptimizer-2.6.0-Linux_glibc21-i386.tar.gz
zlib-1.2.3.tar.gz


1. 安装zlib (安装libpng和gd前需要先安装zlib)
# tar zxvf zlib-1.2.3.tar.gz
# cd  zlib-1.2.3
# ./configure
# make
# make install

2. 安装libpng
# tar zxvf libpng-1.2.8-config.tar.gz
# cd libpng-1.2.8-config
# ./configure
# make
# make install

3. 安装freetype
# tar zxvf freetype-2.1.10.tar.gz
# cd freetype-2.1.10
# ./configure --prefix=/httpd/freetype
# make
# make install

4. 安装jpeg
# tar zxvf jpegsrc.v6b.tar.gz
# cd jpeg-6b
# mkdir /httpd/jpeg
# mkdir /httpd/jpeg/bin
# mkdir /httpd/jpeg/lib
# mkdir /httpd/jpeg/include
# mkdir /httpd/jpeg/man
# mkdir /httpd/jpeg/man/man1
# ./configure --prefix=/httpd/jpeg --enable-shared --enable-static
#make
#make install

5. 安装gd
修改 freetype.h
#cd /httpd/freetype/include/freetype2/freetype/freetype.h
#vi freetyp.h
注释掉下面的
//#ifndef FT_FREETYPE_H
//#error "`ft2build.h' hasn't been included yet!"
//#error "Please always use macros to include FreeType header files."
//#error "Example:"
//#error "  #include <ft2build.h>"
//#error "  #include FT_FREETYPE_H"
//#endif
加入这一句
#include "/httpd/freetype/include/ft2build.h"

# tar zxvf gd-2.0.33.tar.gz
# cd gd-2.0.33
# ./configure --prefix=/httpd/gd --with-jpeg=/httpd/jpeg --with-freetype=/httpd/freetype --with-png --with-zlib
//编译过程中会看到如下信息
** Configuration summary for gd 2.0.33:

   Support for PNG library:          yes
   Support for JPEG library:         yes
   Support for Freetype 2.x library: yes
   Support for Fontconfig library:   no
   Support for Xpm library:          no
   Support for pthreads:             yes
//可以看到png 、 jpeg 、 freetype都已经安装上了
# make
# make install

6. 安装mysql
# tar zxvf mysql-4.0.24.tar.gz
# cd mysql-4.0.24
# ./configure --prefix=/httpd/mysql  --sysconfdir=/httpd/mysql --enable-assembler --with-unix-socket-path=/tmp/mysql.sock  --with-mysqld-user=mysql --with-mysqld-ldflags=-all-static --with-innodb  --with-extra-charsets=all --with-charset=gb2312  --with-collation=gb2312_chinese_ci --enable-thread-safe-client
# groupadd mysql
# useradd mysql -g mysql
#make
#make install
#cp support-files/my-medium.cnf /etc/my.cnf
# ./scripts/mysql_install_db --user=mysql
# cd /httpd/mysql
# chown -R root .
# chown -R mysql var
# chown -R mysql var/.
# chown -R mysql var/mysql/.
# chgrp -R mysql .
#cp support-files/mysql.server /etc/
#chmod +x /etc/mysql.server
#chkconfig --del mysql
#chkconfig --add mysql
#/etc/mysql.server start  
# /httpd/mysql/bin/mysqld_safe --user=mysql &
# /httpd/mysql/bin/mysqladmin -u root password 'new-password'
或修改密码
mysql>;GRANT USAGE ON *.* TO root@"localhost" IDENTIFIED BY 'new-password';

7. 安装apache2
# tar zxvf httpd-2.0.33.tar.gz
# cd httpd-2.0.54
# ./configure --prefix=/httpd/apache --enable-so --enable-track-vars--enable-mods-shared=all --enable-cache --enable-disk-cache --enable-mem-cache --enable-rewrite --with-mpm=worker
# make
# make install
/*********************************************
svn的:
./configure --prefix=/httpd/apache --enable-so --enable-track-vars--enable-mods-shared=all --enable-cache --enable-disk-cache --enable-mem-cache --enable-rewrite --with-mpm=worker --enable-dav --enable-dav=share --enable-dav-fs  --with-apr=/usr/local/apr --with-apr-util=/usr/local/apr-util
**********************************************/

8. 安装php
# tar zxvf php-4.3.11.tar.gz
# cd php-4.3.11
# ./configure --prefix=/httpd/php4 --with-config-file-path=/httpd/apache/conf --with-apxs2=/httpd/apache/bin/apxs --with-gd=/httpd/gd --enable-gd --enable-gd-native-ttf --with-jpeg-dir=/httpd/jpeg --with-png --with-ttf --with-zlib --with-freetype-dir=/httpd/freetype --enable-magic-quotes --with-mysql=/httpd/mysql --with-mysql-sock=/tmp/mysql.sock --with-iconv --with-mbstring --enable-mbstring=all --enable-track-vars --enable-force-cgi-redirect --enable-short-tags --disable-debug --enable-safe-mode --enable-trans-sid --with-xml
# cp php.ini-dist /httpd/apache/conf/php.ini

/****************************************************
php5的:

./configure --prefix=/httpd/php5 --with-config-file-path=/httpd/apache/conf --with-apxs2=/httpd/apache/bin/apxs --with-gd=/httpd/gd --enable-gd --enable-gd-native-ttf --with-jpeg-dir=/httpd/jpeg --with-png --with-ttf --with-zlib --with-freetype-dir=/httpd/freetype --enable-magic-quotes --with-mysql=/usr/local/mysql --with-mysqli=/usr/local/mysql/bin/mysql_config --with-libxml-dir=/usr/local/libxml2 --with-expat-dir=/usr/lib --enable-soap  --with-xsl=/usr/local/libxslt --enable-xslt --enable-sqlite-utf8 --with-iconv --with-mbstring --enable-mbstring=all --enable-track-vars --enable-force-cgi-redirect --enable-short-tags --disable-debug --enable-safe-mode --enable-trans-sid --with-xml
****************************************************/

配置apache

ServerName 168.1.1.199 :80
AddType application/x-httpd-php .php
LoadModule php4_module modules/libphp4.so

9. 安装ZendOptimizer
# tar zxvf ZendOptimizer-2.5.7-Linux_glibc21-i386.tar.gz
# cd ZendOptimizer-2.5.7-Linux_glibc21-i386
# ./install.php
安装操作: [ok] ->; [EXIT] ->; [YES] ->; [/httpd/zend] ->; [/httpd/apache/conf] ->; [yes] ->; [/httpd/apache/bin/apachectl] ->; [OK] ->; [OK] ->; [NO]


安装svn

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics