Home  >  Q&A  >  body text

CentOS 6 yum安装PHP的问题

服务器当前安装的PHP5.4

现在想部署lumen框架上去。

需要PHP5.6或以上版本,而且需要安装那几个扩展。

我想要不直接安装个PHP7上去好了。搜了个YUM安装PHP7的命令

rpm -Uvh https://mirror.webtatic.com/yum/el6/latest.rpm
yum install -y php70w php70w-opcache

先不说是否可以正常安装,现在有个问题就是如何在安装命令里把OpenSSL PHP Extension、PDO PHP Extension、Mbstring PHP Extension这三个扩展的安装也加到命令里? 或者说,如果先安装好PHP7了,如何再安装着几个扩展?

搜索的资料杂七杂八的。。希望有经验的朋友给简单说说哈,谢谢。

给我你的怀抱给我你的怀抱2733 days ago501

reply all(2)I'll reply

  • 淡淡烟草味

    淡淡烟草味2017-04-26 09:04:24

    There are two types of yum sources

    • One is the officially maintained source

    • The other is the epel source maintained by the community.

    The rpm package is an installation package compiled by the author. You cannot customize it based on it.
    For the epel package, it depends on the author’s character compared to the official package.
    However, after the PHP installation is completed, you can add extensions. The way to add extensions is to compile the installation library files.

    reply
    0
  • ringa_lee

    ringa_lee2017-04-26 09:04:24

    Docker solves all environmental problems. If you really don’t want to write your own Dockerfile, there is also ready-made Laradock.

    reply
    0
  • Cancelreply