复制代码
2、安装freetype
tar xzvf freetype-2.2.1.tar.gzcd freetype-2.2.1./configuremakemake install
复制代码
3、安装libpng
tar xzvf libpng-1.2.12.tar.gzcd libpng-1.2.12cp scripts/makefile.std makefilemake testmake install
复制代码
4、安装jpeg建立文件包:/usr/local/man/man1
tar xzvf jpegsrc.v6b.tar.gz./configure --enable-shared --enable-staticmakemake install
复制代码
注意,如果安装php5,必需安装libxml2
5、安装gd库
tar xzvf gd-2.0.18.tar.gz./configure --with-jpeg --with-png --with-zlib --with-freetypemakemake install
复制代码
二,更改apache的配置文件:让apache能解释php程序。1,查找addtype application/x-tar .tgz 行,在下面添加:
addtype application/x-httpd-php .phpaddtype application/x-httpd-php .php3addtype application/x-httpd-php .phtmladdtype application/x-httpd-php-source .phps
复制代码
2,找到下面一行在后面添加:index.php,表示网站的默认页也允许为index.php
directoryindex index.html index.html.var index.php
复制代码
