linux php 7 安装

安装依赖
sudo yum install openssl openssl-devel libxml2* curl curl-devel libpng-devel libpng gcc gcc-c++ freetype-devel glib2-devel cairo-devel libxslt-devel*

./configure --prefix=/usr/local/php
--with-curl
--with-freetype-dir
--with-gd
--with-gettext
--with-iconv-dir
--with-kerberos
--with-libdir=lib64
--with-libxml-dir
--with-mysqli
--with-openssl
--with-pcre-regex
--with-pdo-mysql
--with-pdo-sqlite
--with-pear
--with-png-dir
--with-xmlrpc
--with-xsl
--with-zlib
--enable-fpm
--enable-bcmath
--enable-libxml
--enable-inline-optimization
--enable-gd-native-ttf
--enable-mbregex
--enable-mbstring
--enable-opcache
--enable-pcntl
--enable-shmop
--enable-soap
--enable-sockets
--enable-sysvsem
--enable-xml
--enable-zip
--enable-tokenizer
--enable-maintainer-zts 【这个是为了以后能安装多线程扩展,所以如果不需要可以不用安装】

问题:
Cannot find OpenSSL's <evp.h>
解决
sudo yum install openssl openssl-devel

问题
xml2-config not found. Please check your libxml2 installation
解决
sudo yum install libxml2*

问题
Please reinstall the libcurl distribution - easy.h should be in /include/curl/
解决
sudo yum install curl curl-devel

问题
configure: error: png.h not found.
解决
yum install libpng-devel libpng

问题
configure: error: freetype-config not found
解决
yum install gcc gcc-c++ freetype-devel glib2-devel cairo-devel

问题
configure: error: xslt-config not found
解决
yum install libxslt-devel* -y

posted @ 2017-08-26 17:25  cvcvcv  阅读(129)  评论(0编辑  收藏  举报