我最近想安装一个wordpress, 但是官网介绍需要php7.3以上版本,但是百度了一下,都是要编译安装。

为此,我想,centos..., php... 两大当红辣子鸡没有yum安装方式,简直不可能。

为此,我搜寻了各种源,发现remi源有php73。

但是我yum install 以后,发现两个致命的问题:

(1)php -v 不会显示任何东西,要php73 -v 才行

(2)建立一个phpinfo的测试页,没有任何反应,据研究是apache缺乏libphp7.so模块,各种教程都让我编译的时候加一个参数,但我是yum安装的啊。

于是乎,我找到了一个外国教程,安装后完美解决上述问题。

开题声明:翻译自:https://tecadmin.net/install-php7-on-centos7/

《如何将PHP7.3,7.2, 7.1 安装在centos/RHEL 7.6 上?》

  PHP7.3是PHP最新的稳定发行版,很多流行的yum仓库都提供php7的rpm安装包,这篇文章用Remi和EPEL仓库将安装包安装至你的系统。这篇文章帮你将PHP7.3, 7.2, 7.1服务安装至你的系统,这篇教程经过了centos7.4.1708的测试(实际上译者用7.6也可用)。

设置你的yum仓库

  首先,你需要安装remi和EPEL仓库,使用下面的命令安装:

安装EPEL:

sudo yum install epel-release

安装remi:

sudo rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-7.rpm

  

安装PHP7

(译者:根据需求选择一个指令即可)

## 安装PHP 7.3
yum --enablerepo=remi-php73 install php ## 安装 PHP 7.2
yum --enablerepo=remi-php72 install php ## 安装 PHP 7.1
yum --enablerepo=remi-php71 install php 

我安装了php7.3, 通过下面指令检测是否正确运行:

php -v

PHP 7.3.0 (cli) (built: Dec  4 2018 16:12:20) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.3.0-dev, Copyright (c) 1998-2018 Zend Technologies

  

安装PHP模块

  你可能需要安装以下PHP模块,下面是一些有用的模块的安装指令。(译者:如果你不安装,就会缺这缺那,比方说libphp7.so)

### For PHP 7.3
yum --enablerepo=remi-php73 install php-xml php-soap php-xmlrpc php-mbstring php-json php-gd php-mcrypt ### For PHP 7.2
yum --enablerepo=remi-php72 install php-xml php-soap php-xmlrpc php-mbstring php-json php-gd php-mcrypt ### For PHP 7.1
yum --enablerepo=remi-php71 install php-xml php-soap php-xmlrpc php-mbstring php-json php-gd php-mcrypt

  你也可以通过下面的指令搜寻一些其它php模块,下面的示例指令将列出remi仓库下所有PHP7.3可用模块。

yum --enablerepo=remi-php73 search php | grep php73

php73.x86_64 : Package that installs PHP 7.3
php73-php.x86_64 : PHP scripting language for creating dynamic web sites
php73-php-bcmath.x86_64 : A module for PHP applications for using the bcmath
php73-php-brotli.x86_64 : Brotli Extension for PHP
php73-php-cli.x86_64 : Command-line interface for PHP
php73-php-common.x86_64 : Common files for PHP
php73-php-componere.x86_64 : Composing PHP classes at runtime
php73-php-dba.x86_64 : A database abstraction layer module for PHP applications
php73-php-dbg.x86_64 : The interactive PHP debugger
php73-php-devel.x86_64 : Files needed for building PHP extensions
php73-php-embedded.x86_64 : PHP library for embedding in applications
php73-php-enchant.x86_64 : Enchant spelling extension for PHP applications
php73-php-fpm.x86_64 : PHP FastCGI Process Manager
php73-php-gd.x86_64 : A module for PHP applications for using the gd graphics
...
...

  

结尾再次声明,翻译自:https://tecadmin.net/install-php7-on-centos7/

centos/RHEL 7.6 使用yum安装php7.3(方便wordpress的php7.3需求,并解决了libphp7.so缺失问题)的更多相关文章

  1. Centos 升级MySQL版本或者Yum安装Mysql5.6

    Centos 升级MySQL版本或者Yum安装Mysql5.6 1.从MySQL Yum仓库下载最新的rpm文件:http://dev.mysql.com/downloads/repo/yum/Cen ...

  2. CentOS 7.0下使用yum安装MySQL

    CentOS7默认数据库是mariadb,配置等用着不习惯,因此决定改成mysql,但是CentOS7的yum源中默认好像是没有mysql的.为了解决这个问题,我们要先下载mysql的repo源. 1 ...

  3. CentOS 6.7下配置 yum 安装 Nginx

    CentOS 6.7下配置 yum 安装 Nginx. 转载:http://www.linuxidc.com/Linux/2016-07/133283.htm 第一步,在/etc/yum.repos. ...

  4. Centos 6/ 7下通过yum安装php7环境

    本文转自:云溪社区 2015年12月初PHP7正式版发布,迎来自2004年以来最大的版本更新.PHP7最显著的变化就是性能的极大提升,已接近Facebook开发的PHP执行引擎HHVM.在WordPr ...

  5. Centos 6.* / 7.*下通过yum安装php7

    查看 centos 版本 # cat /etc/centos-release 删除之前的 php 版本 # yum remove php* php-common rpm 安装 Php7 相应的 yum ...

  6. 在CentOS/RHEL/Scientific Linux 6下安装 LAMP

    LAMP 是服务器系统中开源软件的一个完美组合.它是 Linux .Apache HTTP 服务器.MySQL 数据库.PHP(或者 Perl.Python)的第一个字母的缩写代码.对于很多系统管理员 ...

  7. CentOS 6.9/7通过yum安装指定版本的PostgreSQL扩展PostGIS

    一.安装PostGIS扩展插件(24_10) // 安装EPEL源 # rpm -ivh http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-rele ...

  8. CentOS 下 rpm包与 yum 安装与卸载

    rpm包的安装:      1.安装一个包 # rpm -ivh 2.升级一个包 # rpm -Uvh 3.移走一个包 # rpm -e 4.安装参数 --force 即使覆盖属于其它包的文件也强迫安 ...

  9. Centos 6.x/7.x yum安装php5.6.X

    鉴于Centos 默认yum源的php版本太低了,手动编译安装又有点一些麻烦,那么如何采用Yum安装的方案安装最新版呢.那么,今天我们就来学习下如何用yum安装php最新版. 1.检查当前安装的PHP ...

随机推荐

  1. upload三种上传方式(上)---Servlet---post---commons-fileupload.1.2.1.jar方式请求上传文件

    上传前进行的配置选项: 1.在下方的Servers中,右键你的tomcat--open,选中下面两个配置. 第一个:Serve modules without publishing 作用:tomcat ...

  2. CentOS使用nginx部署https服务

    nginx安装参考:https://www.cnblogs.com/taiyonghai/p/6728707.html 自签证书生成参考:https://gmd20.github.io/blog/op ...

  3. python time 和 datetime模块

    time模块 时间相关的操作,时间有三种表示方式: 时间戳               1970年1月1日之后的秒,即:time.time() 格式化的字符串    2014-11-11 11:11, ...

  4. 菜鸟教程之学习Shell script笔记(下)

    菜鸟教程Shell script学习笔记(下) 以下内容是学习菜鸟教程之shell教程,所整理的笔记 菜鸟教程之shell教程:http://www.runoob.com/linux/linux-sh ...

  5. Windows服务器

    知道了怎么装VMware workstation并且创建虚拟机装上了系统配好网络

  6. Jquery如何序列化form表单数据为JSON对象

    jquery提供的serialize方法能够实现. $("#searchForm").serialize();但是,观察输出的信息,发现serialize()方法做的是将表单中的数 ...

  7. 对抗生成网络-图像卷积-mnist数据生成(代码) 1.tf.layers.conv2d(卷积操作) 2.tf.layers.conv2d_transpose(反卷积操作) 3.tf.layers.batch_normalize(归一化操作) 4.tf.maximum(用于lrelu) 5.tf.train_variable(训练中所有参数) 6.np.random.uniform(生成正态数据

    1. tf.layers.conv2d(input, filter, kernel_size, stride, padding) # 进行卷积操作 参数说明:input输入数据, filter特征图的 ...

  8. FLV 格式导入 视频

  9. docker php容器中简单添加seaslog拓展

    最近有个项目用到了seaslog,因为之前调试php的容器已经搭好了,不想再通过dockerfile重新搭建了,搜了半天没有东西可以装,就仿照着安装redis拓展操作了一顿 1.wget http:/ ...

  10. Android Studio上传代码到Coding.net

    1.官方帮助文档:https://coding.net/help/doc/git/import-from-local.html 2.简单点: https://git.coding.net/javaka ...