一:安装系统环境:
yum
install
-y apr* autoconf automake bison
bzip2
bzip2
* cloog-ppl compat*
cpp curl curl-devel fontconfig fontconfig-devel freetype freetype*
freetype-devel gcc gcc-c++ gtk+-devel gd gettext gettext-devel glibc kernel
kernel-headers keyutils keyutils-libs-devel krb5-devel libcom_err-devel libpng
libpng* libpng-devel libjpeg* libsepol-devel libselinux-devel libstdc++-devel
libtool* libgomp libxml2 libxml2-devel libXpm* libX* libtiff libtiff*
make
mpfr
ncurses* ntp openssl nasm nasm* openssl-devel patch pcre-devel perl php-common
php-gd policycoreutils ppl telnet t1lib t1lib* wget zlib-devel
cmake-3.0.2.
tar
.gz MySQL编译工具
libgd-2.1.0.
tar
.gz gd库安装包
libvpx-v1.3.0.
tar
.bz2 gd库需要
openssl-1.0.1j.
tar
.gz nginx扩展
t1lib-5.1.2.
tar
.gz php扩展
zlib-1.2.8.
tar
.gz nginx扩展
freetype-2.5.4.
tar
.gz gd库需要
libmcrypt-2.5.8.
tar
.gz php扩展
mysql-5.6.21.
tar
.gz
pcre-8.36.
tar
.gz 支持nginx伪静态
tiff-4.0.3.
tar
.gz gd库需要
jpegsrc.v9a.
tar
.gz gd库需要
libpng-1.6.7.
tar
.gz gd库需要
nginx-1.6.2.
tar
.gz
php-5.6.3.
tar
.gz
yasm-1.3.0.
tar
.gz php扩展
2:编译过程:
cmake . -DCMAKE_INSTALL_PREFIX=/usr/local/mysql -DMYSQL_UNIX_ADDR=/usr/local/mysql/mysql.sock -DDEFAULT_CHARSET=utf8 -DDEFAULT_COLLATION=utf8_general_ci -DEXTRA_CHARSETS=all -DWITH_INNOBASE_STORAGE_ENGINE=1 -DWITH_ARCHIVE_STORAGE_ENGINE=1 -DWITH_BLACKHOLE_STORAGE_ENGINE=1 -DMYSQL_DATADIR=/usr/local/mysql/data
3.php 5.6.21编译:
./configure --prefix=/usr/local/php--with-config-file-path=/usr/local/php/etc--with-config-file-scan-dir=/usr/local/php/etc/conf.d --enable-fpm--with-fpm-user=www --with-fpm-group=www --with-pear --with-curl --with-gd--with-jpeg-dir --with-png-dir --with-freetype-dir --with-iconv --with-mcrypt--with-mhash --with-zlib --with-xmlrpc --with-xsl --with-openssl --with-mysql--with-mysqli --with-pdo-mysql --disable-debug --enable-zip --enable-sockets--enable-soap --enable-mbstring --enable-magic-quotes --enable-inline-optimization--enable-memory-limit --enable-xml --enable-ftp --enable-exif --enable-wddx--enable-bcmath --enable-calendar --enable-sqlite-utf8 --enable-shmop--enable-dba --enable-sysvsem --enable-sysvshm --enable-sysvmsg
本文出自 “Linux” 博客,谢绝转载!