本文共 943 字,大约阅读时间需要 3 分钟。
1、首先安装GD库和GD库关联程序 ,用来处理和生成图片
yum install \libjpeg-devel \libpng-devel \freetype-devel \zlib-devel \gettext-devel \libXpm-devel \libxml2-devel \fontconfig-devel \openssl-devel \bzip2-devel2、安装gd库3、编译gd库4、解压PHP压缩包,并配置PHP,编译
./configure \--prefix=/usr/local/php \--with-apxs2=/usr/local/apache/bin/apxs \--with-gd \--with-mysql=/usr/local/mysql \--with-config-file-path=/etc \--enable-sqlite-utf8 \--with-zlib-dir \--with-libxml-dir \--with-freetype-dir \--with-jpeg-dir \--with-png-dir \--with-ttf \--with-iconv \--with-openssl \--with-gettext \--enable-mbstring \--enable-gd-native-ttf \--enable-gd-jis-conv \--enable-static \--enable-zend-multibyte \--enable-inline-optimization \--enable-sockets \--enable-soap \--enable-ftp \--disable-ipv65、编辑Apache配置文件,让其支持PHP vim /usr/local/apache/conf/httpd.conf
6、更改Apache首页,cd /usr/local/apache/htdocs/ 编辑index.php 重启服务
转载于:https://blog.51cto.com/13640803/2121991