freebsd下gd库的安装方法
Freebsd5.3+mysql+apache+php+gd安装指南
1. 安装freebsd5.3
ports装上
package要装以下几个包
freetype
jpeg
png
tiff
gtk
2. 安装mysql-4.0.16
tar zxvf mysql-4.0.16
cd mysql-4.0.16
mkdir /usr/local/mysql
pw groupadd mysql
pw useradd mysql –g mysql
./configure –prefix=/usr/local/mysql
make
make install
cd scripts
mysql_install_db
chown –R root /usr/local/mysql
chown –R mysql /usr/local/mysql
chgrp –R mysql /usr/local/mysql/var
3. 用ports安装gd库
cd /usr/ports/graphic/gd
make install
4. 安装apache
tar zxvf apache_1.3.29.tar.gz
cd apache_1.3.29
./configure --prefix=/usr/local/apache --enable-module=so –enable-shared=max
make
make install
5. 安装php 一定要用php4-STABLE-latest.tar最新版
./configure --prefix=/usr/local/php --with-mysql=/usr/local/mysql --enable-bcmath --with-zlib --with-png --with-gd --with-jpeg --enable-gd-native-ttf --with-ttf --with-freetype --enable-memory-limit --enable-zend-multibyte --disable-ipv6 --disable-path-info-check --with-iconv --with-pear --disable-debug --with-apxs=/usr/local/apache/bin/apxs
make
make install
cp php.ini-dist /usr/local/php/lib/php.ini
修改/usr/local/apache/conf/httpd.conf
查找
在此范围添加
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps
ok!静态编译完成,大家只要启动一下服务器
/usr/local/apache/bin/apachectl start
然后些个php测试页info.php:内容如下
<?php
phpinfo();
?>
正常的话,应该能看到php的信息了
http://your-ip/info.php 出现gd库enable表示已装上
qq:35907960发布人:yanyp 来自: