去掉注释
LoadModule rewrite_module libexec/apache2/mod_rewrite.so
LoadModule php5_module libexec/apache2/libphp5.so
Include /private/etc/apache2/extra/httpd-vhosts.conf
User _www 改 User liuman
./configure --prefix=/usr/local/freetype
make
sudo make install
#编译freetype过程中以下harfbuss没有则安装
# external zlib: yes (pkg-config)
# bzip2: yes (autoconf test)
# libpng: yes (pkg-config)
# harfbuzz: no (pkg-config)
brew install harfbuzz
进入到php/ext/gd/
make clean
#重新编译GD之前一定要make clean就是因为忘记了这个找个半天错误。
phpize
./configure --with-php-config=/usr/local/php/bin/php-config --with-freetype-dir=/usr/local/freetype
make
sudo make install
./configure --prefix=/usr/local/jpeg
make
sudo make install
进入到php/ext/gd/
make clean
phpize
./configure --with-php-config=/usr/local/php/bin/php-config --with-jpeg-dir=/usr/local/jpeg --with-freetype-dir=/usr/local/freetype
make
sudo make install
./configure --prefix=/usr/local/xml2-config
make
make install
php编译安装
./configure --prefix=/usr/local/php --with-apxs2=/usr/local/apache/bin/apxs --with-mysqli=mysqlnd --with-pdo-mysql=mysqlnd --with-libxml-dir=/usr/local/xml2-config
make
make install