centOS安装php最新版本
来源:互联网 发布:数控立车编程操作入门 编辑:程序博客网 时间:2024/05/18 03:42
查看 centos 版本:
[root@iZ23d ~]# cat /etc/centos-release
CentOS Linux release 7.2.1511 (Core)
1、删除之前的 php 版本:
[root@iZ23d ~]# yum remove php* php-common
Loaded plugins: langpacks
Repository base is listed more than once in the configuration
Repository updates is listed more than once in the configuration
Repository extras is listed more than once in the configuration
Repository centosplus is listed more than once in the configuration
No Match for argument: php-5.4.16
No Match for argument: php-5.4.16.tar.gz
No Match for argument: php-7.0.1RC1
No Match for argument: php-7.0.1RC1.tar.gz
No Match for argument: phpMyAdmin-4.4.0.tar.gz
No Match for argument: php-common
No Packages marked for removal
2、rpm 安装 Php7 相应的 yum源:
[root@iZ23d ~]# rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm
Retrieving https://mirror.webtatic.com/yum/el7/webtatic-release.rpm
warning: /var/tmp/rpm-tmp.LhJKKR: Header V4 RSA/SHA1 Signature, key ID 62e74ca5: NOKEY
Preparing... ################################# [100%]
package webtatic-release-7-3.noarch is already installed
3、 直接yum安装php7:
[root@iZ23d ~]# yum install php70w
Loaded plugins: langpacks
Repository base is listed more than once in the configuration
Repository updates is listed more than once in the configuration
Repository extras is listed more than once in the configuration
Repository centosplus is listed more than once in the configuration
Resolving Dependencies
--> Running transaction check
。。。 【省略】Warning: RPMDB altered outside of yum.
Installing : php70w-common-7.0.0-1.w7.x86_64 1/3
Installing : php70w-cli-7.0.0-1.w7.x86_64 2/3
Installing : php70w-7.0.0-1.w7.x86_64 3/3
Verifying : php70w-7.0.0-1.w7.x86_64 1/3
Verifying : php70w-common-7.0.0-1.w7.x86_64 2/3
Verifying : php70w-cli-7.0.0-1.w7.x86_64 3/3
Installed:
php70w.x86_64 0:7.0.0-1.w7
Dependency Installed:
php70w-cli.x86_64 0:7.0.0-1.w7 php70w-common.x86_64 0:7.0.0-1.w7
Complete!
4、检查 php 版本:
[root@iZ23d ~]# php -v
PHP 7.0.0 (cli) (built: Dec 2 2015 20:42:32) ( NTS )
Copyright (c) 1997-2015 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2015 Zend Technologies
[root@iZ23d2e6hoqZ ~]#
以上显示安装成功!
5、重启 Apache,查看 phpinfo :
0 0
- centOS安装php最新版本
- CentOS 6.5 安装最新版本的php
- CentOS安装最新版本github
- CentOS快速安装最新版本的SaltStack
- Centos 6.4 yum安装最新版本elasticsearch
- CentOS 最新版本git的安装教程
- CentOS 6.x 安装最新版本 git
- CentOS 最新版本git的安装教程
- Centos下安装最新版本Git
- Centos安装php高版本
- centos 安装多版本php
- Centos安装php高版本
- centos上面安装最新版本的git2.11版本
- yum安装最新php和MySQL版本
- Centos最新方法升级php版本到5.2.11
- CentOS/RHEL 6.6 通过YUM升级PHP最新版本
- Centos最新方法升级php版本到5.2.11
- 在centos 6.4中安装最新版本firefox
- 完数
- poj1463树形动归
- React.jsDOM获取方式
- 浅谈图形界面引擎开发
- 【图解】Windows系统搭建Android开发环境
- centOS安装php最新版本
- 人机界面HMI 迅为iTOP-HMI070-N触摸屏一体机 7寸工业平板电脑
- 编程习惯的养成——转自知乎
- 《道德经》第十二章
- Java架构师之路高级进阶教程
- mysql导库遇到的问题
- CentOS7单用户模式下修改root用户密码
- CheckStyle使用中遇到的问题
- network.py