环境是个空环境,一次都没安装过:
禁用SeLinux
#selinux可能会致使编译安装失败,我们先禁用它。
setenforce 0 #临时禁用,不需要重启
yum安装必要工具
#安装编译工具gcc gcc-c++make automake autoconf kernel-devel,安装PHP所需依赖,如libxml2-devel openssl-devel curl-devel libjpeg-devel libpng-devel等。
yum -y install gcc gcc-c++ kernel-devel ntp vim-enhanced flex bison autoconf make automake bzip2-devel ncurses-devel zlib-devel libjpeg-devel libpng-devel libtiff-devel freetype-devel libXpm-devel gettext-devel pam-devel libtool libtool-ltdl openssl openssl-devel fontconfig-devel libxml2-devel curl-devel libicu libicu-devel libmcrypt libmcrypt-devel libmhash libmhash-devel pcre-devel libtool-libs gd file patch mlocate diffutils readline-devel glibc-devel glib2-devel libcap-devel
下载所需源码 ,下载的源码包统一放在 /usr/local/src/ 目录下。