新环境编译安装CentOS 7 php7
2017-10-21 09:39
330 查看
安装php
下载地址:wget http://cn2.php.net/distributions/php-7.0.12.tar.bz2和nginx一样需要解压: tar -xvf 下载的文件
当然 php也需要安装缺少的文件,在这里进行编译安装产看缺少哪些文件
./configure –prefix=/usr/local/php70 –with-mysqli –with-pdo-mysql –with-iconv-dir –with-freetype-dir –with-jpeg-dir –with-png-dir –with-zlib –with-libxml-dir –enable-simplexml –enable-xml –disable-rpath –enable-bcmath –enable-soap –enable-zip –with-curl –enable-fpm –with-fpm-user=nobody –with-fpm-group=nobody –enable-mbstring –enable-sockets –with-mcrypt –with-gd –enable-gd-native-ttf –with-openssl –with-mhash –enable-opcache
下面是php报错解决方法:
报错 Cannot find OpenSSL’s evp.h
执行 yum install openssl openssl-devel
报错 Please reinstall the libcurl distribution
执行 yum -y install curl-devel
jpeglib.h not found
执行 yum install libjpeg.x86_64 libpng.x86_64 freetype.x86_64 libjpeg-devel.x86_64 libpng-devel.x86_64 freetype-devel.x86_64 -y
和执行 yum install libjpeg-devel
错误:checking for BZip2 in default path… not found configure: error: Please reinstall the BZip2 distribution 这是bzip2软件包没有安装
执行 yum install bzip2-devel.x86_64 -y
错误:configure: error: xpm.h not found.
执行 yum install libXpm-devel
错误: Unable to locate gmp.h
执行 yum install gmp-devel
错误: Unable to locate gmp.h
执行 yum install gmp-devel
错误:Unable to detect ICU prefix or /usr//bin/icu-config failed. Please verify ICU install prefix and make sure icu-config works
执行 yum install -y icu libicu libicu-devel
错误:mcrypt.h not found. Please reinstall libmcrypt.
执行 yum install php-mcrypt libmcrypt libmcrypt-devel
错误:mcrypt.h not found. Please reinstall libmcrypt.
执行 yum install php-mcrypt libmcrypt libmcrypt-devel
错误: configure: error: Cannot find libpq-fe.h. Please specify correct PostgreSQL installation path
执行 yum install postgresql-devel
错误: configure: error: xslt-config not found. Please reinstall the libxslt >= 1.1.0 distribution
执行 yum install libxslt-devel
configure: error: png.h not found.
yum install libpng libpng-devel.
error: Cannot find libpq-fe.h. Please specify correct PostgreSQL installation path
yum -y install postgresql-devel
error: Please reinstall the libcurl distribution -easy.h should be in curl-dir/include/curl/
yum install curl curl-devel
error: mcrypt.h not found. Please reinstall libmcrypt.
yum install php-mcrypt libmcrypt libmcrypt-devel
之后进行安装 使用 make && make install (这个可能时间会长一点)
安装成功后查看是否有php-fpm 使用whereis php-fpm
如果没有找到就安装失败了,找到了就启动。
相关文章推荐
- centos下单独编译安装php的pdo_mysql模块
- Linux+php+apache+oracle环境搭建之CentOS下源码编译安装PHP
- Nginx 1.5.2 + PHP 5.5.1 + MySQL 5.6.10 在 CentOS编译安装
- 编译安装LNMP Centos 6.5 x64 + Nginx1.6.0 + PHP5.5.13 + Mysql5.6.19
- centos7 源码编译PHP前的依赖安装
- Ubuntu14.04 & CentOS6.5 编译安装Apache & PHP5.6
- 64位centos上nginx,php编译安装遇configure: error: Cannot find libmysqlclient under /usr 错误解决
- centos7 编译安装php5.6.27
- CentOS5.5上编译安装 PHP 5.3.6
- centos的PHP编译安装模块的基本步骤
- 【PHP升级】CentOS6.3编译安装 PHP5.4.38
- CentOS单独编译安装PHP gd库扩展
- CentOS 7 编译安装PHP 5.6
- CentOS 在编译php 的时候可能出现的错误以及需要安装的类库
- CentOS 6.5下编译安装httpd+mysql+php+phpMyAdmin
- CentOS 编译 nginx+php+mysql 安装手记
- CentOS 7 64bit系统上编译安装PHP 5.6.13
- Centos编译安装 LAMP (apache-2.4.7 + mysql-5.5.35 + php 5.5.8)+ Redis
- centos7搭建lnmp编译安装php【一】
- Centos下升级php5.2到php5.4全记录(编译安装)