分类广告


推荐文章

  • 没有找到任何内容!
您当前的位置:中国站长下载网络编程PHP专区 → 文章内容

Linux+Apache1.3.12+PHP4.0RC1安装脚本1.2版

  • 作者:佚名    来源:不详    发布时间:2006-2-26 2:01:17
  • 字体大小:
Linux+Apache1.3.12+PHP4.0RC1安装脚本1.2版



关键词
PHP, LINUX



按照该脚本安装完后
,PHP将具有画JPEG和PNG格式图象,输出TTF字体的GD函数支持,当然在装之前要先装freetype,jpeg,zlib,libpng和gd库.

#please first install freetype,jpeg and gd

#



#
----where to download----

#http://www.apache.org/dist/apache_1.3.12.tar.gz

#http
://www.php.net/version4/downloads/php-4.0RC1.tar.gz



#
----version variables----

ver_apache=apache_1.3.12

ver_php
=php-4.0RC1



#
----src of modules----

module_src_php=src/modules/php4/libphp4.a



#
----php configuration in httpd.conf----

httpd_conf_php="AddType application/x-httpd-php .php"

httpd_conf_php_source="AddType application/x-httpd-php-source .phps"



#----preinstalled library----

freetype=/usr/local/freetype

jpeg
=/usr/local/jpeg

gd
=/usr/local



#
----installation directories----

apache=/usr/local/apache

php
=/usr/local/php



#
----how to test php----

howto_test_php="how to test php? write a file named phpinfo.php in ${apache}/htdocs/ whose

content is after apache started,type http://localhost/phpinfo.php in

browser,just search gd,if you can find words like gd Version 1.6.2 or higher with FreeType support

(linked with ttf library) which supports PNG,php supports gd(ttf)."




#----how to start or stop apache----

howto_start_apache="how to start apache? type ${apache}/bin/apachectl start."

howto_stop_apache="how to stop apache? type ${apache}/bin/apachectl stop."



#----untar----

tar xzvf ${ver_php}.tar.gz

tar xzvf $
{ver_apache}.tar.gz



#
----prepare to install----

cd $ver_apache

.
/configure

cd ..



#
----install php----

cd $ver_php

.
/configure --prefix=$php --with-apache=../$ver_apache --with-config-file-path=$php --enable-track-vars

--with-gd=$gd --with-jpeg-dir=$jpeg --with-ttf=$freetype

make

make install

cp php
.ini-dist $php/php.ini

cd ..



#
----install apache----

cd $ver_apache

.
/configure --prefix=$apache --activate-module=$module_src_php

make

make install

cd ..



#
----free----

rm -rf $ver_php

rm
-rf $ver_apache



#
----configuration infomation----

echo "------------------------------------------------------------------------"

echo "please make sure following lines exist in ${apache}/conf/httpd.conf:"

echo " $httpd_conf_php"

echo " $httpd_conf_php_source"

echo ""

echo $howto_test_php

echo ""

echo $howto_start_apache

echo $howto_stop_apache




<