首先是安装需要的扩展文件

yum -y install freetype-devel
yum -y install libpng-devel
yum -y install libjpeg-devel
yum -y install libcurl-devel
yum -y install libxml2-devel
yum -y install libXpm-devel
yum -y install openssl openssl-devel
yum -y install postgresql-devel

PHP当前最新版本是PHP7.3,今天在尝试安装的过程中报如下错误: system libzip must be upgraded to version >= 0.11, 根据提示我们可以清楚的知道是因为系统自带的libzip版本低了,这里我们需要安装最新的libzip

首先,卸载系统自带的libzip

yum -y remove libzip-devel
然后从官网下载并编译安装

wget https://libzip.org/download/libzip-1.3.2.tar.gz
tar xvf libzip-1.3..tar.gz
cd libzip-1.3.
./configure
make && make install

如果是下载1.5.*以上版本,则需要采用如下安装方式 提示需要cmake 3.1 以及以后版本

yum -y install cmake wget https://libzip.org/download/libzip-1.5.1.tar.gz
tar -zxvf libzip-1.5..tar.gz
cd libzip-1.5.
mkdir build
cd build
cmake ..
make && make install

下面是配置编译文件,可以根据需要添加减少扩展。

./configure --prefix=/application/php-7.3. --with-pgsql=shared --with-pdo-pgsql=shared --enable-mysqlnd --with-mysqli=mysqlnd --with-pdo-mysql=mysqlnd --with-gd --with-png-dir=/usr/local/libpng --with-jpeg-dir=/usr/local/jpeg --with-freetype-dir=/usr/local/freetype --with-xpm-dir=/usr/ --with-zlib-dir=/usr/local/zlib --with-iconv --enable-libxml --enable-xml --enable-bcmath --enable-shmop --enable-sysvsem --enable-inline-optimization --enable-opcache --enable-mbregex --enable-fpm --enable-mbstring --enable-ftp --with-openssl --enable-pcntl --enable-sockets --with-xmlrpc --enable-zip --enable-soap --without-pear --with-gettext --enable-session --with-curl --enable-ctype

或者写成多行的:
./configure --prefix=/application/php-7.3.8 \
--with-pgsql=shared --with-pdo-pgsql=shared \
--enable-mysqlnd --with-mysqli=mysqlnd --with-pdo-mysql=mysqlnd \
--with-gd --with-png-dir=/usr/local/libpng --with-jpeg-dir=/usr/local/jpeg \
--with-freetype-dir=/usr/local/freetype \
--with-xpm-dir=/usr/ \
--with-zlib-dir=/usr/local/zlib \
--with-iconv \
--enable-libxml \
--enable-xml \
--enable-bcmath \
--enable-shmop \
--enable-sysvsem \
--enable-inline-optimization \
--enable-opcache \
--enable-mbregex \
--enable-fpm \
--enable-mbstring \
--enable-ftp \
--with-openssl \
--enable-pcntl \
--enable-sockets \
--with-xmlrpc \
--enable-zip \
--enable-soap \
--without-pear \
--with-gettext \
--enable-session \
--with-curl \
--enable-ctype

最后就是安装了 make 的时间稍微有点长。

make
make install

Centos7 安装php7.3 并扩展 MySQL、postgresql的更多相关文章

  1. CentOS7 安装PHP7的swoole扩展:

    一.绪 Swoole简介 PHP异步网络通信引擎 最终编译为so文件作为PHP的扩展 准备工作 Linux环境 PHP7 swoole2.1 redis 源码安装PHP7 源码安装swoole htt ...

  2. centos7安装PHP7的redis扩展

    前言: 在本篇博客中,我将给大家介绍如何在Centos7上安装PHP-Redis扩展,关于如何在Centos上安装redis的,可以参考另外一篇博客:Centos7安装redis 想要在php中操作r ...

  3. CentOS7 安装PHP7的redis扩展:

      phpredis-4.2.0.tar.gz:下载:wget https://github.com/phpredis/phpredis/archive/4.2.0.tar.gz   $ tar -z ...

  4. Centos7 安装PHP7版本及php-fpm,redis ,php-redis,hiredis,swoole 扩展安装

    ============================PHP7.1 ========================================= 1. 更换rpm 源,执行下面两个 rpm - ...

  5. Centos7安装gearman和php扩展

    Centos7安装gearman和php扩展 标签(空格分隔): php,linux gearman所需要的依赖 yum install \ vim \ git \ gcc \ gcc-c++ \ w ...

  6. centos6下安装php7的memcached扩展

    安装php7的memcached扩展 .编译安装libmemcached- wget https://launchpadlibrarian.net/165454254/libmemcached-1.0 ...

  7. window下安装php7的memcache扩展

    安装memcache:http://www.runoob.com/memcached/memcached-connection.html1.4.4 c:\memcached\memcached.exe ...

  8. linux centos7 安装常用软件java,node,mysql,Seafile

    linux centos7 安装常用软件java,node,mysql,Seafile 安装压缩解压缩软件 yum install -y unzip zip 安装git yum install -y ...

  9. CentOS7 安装 PHP7.2

    点击查看原文 安装源 安装 EPEL 软件包: $ sudo yum install epel-release 安装 remi 源: $ sudo yum install http://rpms.re ...

随机推荐

  1. 使用Jenkins编译打包SpringCloud微服务中的个别目录

    意义说明: 使用Jenkins从Gogs拉取SpringCloud微服务,拉取的是整个仓库的内容,分好多个模块文件夹,但是使用maven编译打包的话只编译打包指定的模块文件夹 Gogs Webhook ...

  2. springboot中将日志信息存放在catalina.base中

    <?xml version="1.0" encoding="UTF-8"?> <configuration debug="true& ...

  3. jenkins pipline

    def getHost(){ def remote = [:] remote.name = 'server02' remote.host = '39.19.90' remote.user = 'roo ...

  4. js 遍历树的层级关系的实现

    1.遍历树的层级关系 1)先整理数据 2)找到id和数据的映射关系 3)然后找到父节点的数据,进行存储 test() { const list = [ { id: ", parentId: ...

  5. dede织梦如何去除网站底部的版权信息

    dede织梦如何删除版权powered by?在织梦中,特别是在仿站之中,经常会在首页的底部出现powered by,这是dedecms织梦系统底部自带的官方链接power by等字样,很多新用户想去 ...

  6. OpenWrt增加软件包

    变量名含义 SECTION //包的种类 CATEGORY //显示在menuconfig的哪个目录下 SUBMENU //menuconfig子目录 TITLE //简单的介绍 DESCRIPTIO ...

  7. 对比centos7的systemctl和其他service+chkconfig

    syetemctl就是service和chkconfig这两个命令的整合,在CentOS 7就开始被使用了.systemctl 是系统服务管理器命令,它实际上将 service 和 chkconfig ...

  8. 流程控制-switch

    2.switch语句 switch(表达式){ case 值 1://case相当于== 语句块1; break; case 值 2: 语句块2; break; ....... default: 语句 ...

  9. Nginx的反向代理和负载均衡服务

    Nginx (engine x) 是一个高性能的HTTP和反向代理服务,也是一款轻量级的Web 服务器/反向代理服务器及电子邮件(IMAP/POP3)代理服务器,并在一个BSD-like 协议下发行. ...

  10. 利用EasyUI 数据网格(DataGrid)的loader属性实现后端分页

    该属性在easyui官方文档中并没有详细阐述,通过简单的资料查询和摸索,实现了easyUI数据网格的后端分页功能. 在官网文档中这样阐述loader属性: 定义如何从远程服务器加载数据.返回false ...