`
lilisalo
  • 浏览: 1111522 次
文章分类
社区版块
存档分类
最新评论

centos 64位 + apache + php + gd 库安装

 
阅读更多

centos64位 和32位安装有一些不同

安装apache

安装mysql

需要用到的包

zlib-1.2.3.tar.gz

libiconv-1.11.tar.gz

freetype-2.3.5.tar.gz

libpng-1.2.20.tar.gz

jpegsrc.v6b.tar.gz

gd-2.0.35.tar.gz

ibxml2-sources-2.6.30.tar.gz

gettext

1. zlib

tar zxvf zlib-1.2.3.tar.gz

cd zlib-1.2.3

CFLAGS="-O3 -fPIC" ./configure

2. libiconv

2.libiconv

tar zxvf libiconv-1.11.tar.gz
cd libiconv-1.11/
CFLAGS="-O3 -fPIC" ./configure --prefix=/usr/local/webserver/lib/libiconv
make && make install

3. freetype

tar zxvf freetype-2.3.5.tar.gz
cd freetype-2.3.5/
CFLAGS="-O3 -fPIC" ./configure --prefix=/usr/local/webserver/lib/freetype
make && make install

4. tar zxvf libpng-1.2.20.tar.gz
cd libpng-1.2.20/
CFLAGS="-O3 -fPIC" ./configure
make && make install
cd ../

5 jpeg

tar zxvf jpegsrc.v6b.tar.gz
cd jpeg-6b/
CFLAGS="-O3 -fPIC" ./configure --enable-static --enable-shared
make && make install
cd ../

6 gettext

tar

cd

CFLAGS="-O3 -fPIC" ./configure

7

tar zxvf gd-2.0.35.tar.gz
cd gd-2.0.35/
CFLAGS="-O3 -fPIC" ./configure --prefix=/usr/local/webserver/lib/gd --with-freetype=/usr/local/webserver/lib/freetype --with-jpeg --with-png
--enable-m4_pattern_allow
make
make install
cd ../

8. libxml2

tar zxvf libxml2-sources-2.6.30.tar.gz
cd libxml2-2.6.30/
CFLAGS="-O3 -fPIC" ./configure --prefix=/usr/local/webserver/lib/libxml
make && make install
cd ../

安装php

./configure --prefix=/usr/local/php --with-mysql=/usr/local/mysql --with-config-file-path=/usr/local/php/etc --with-apxs2=/usr/local/apache/bin/apxs --with-gd=/usr/local/webserver/lib/gd --enable-gd-native-ttf --enable-gd-jis-conv --with-iconv-dir=/usr/local/webserver/lib/libiconv --with-freetype-dir=/usr/local/webserver/lib/freetype --with-jpeg-dir=/usr/local --with-png-dir=/usr/local --with-zlib --with-libxml-dir=/usr/local/webserver/lib/libxml --enable-xml

添加php到apache

AddType application/x-httpd-php .php
AddType application/x-httpd-php .php .phtml .php3 .inc

重启apache

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics