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