因为想在阿里云上写php扩展,故在以前的机子上升级php,在这里,简单的记录下此次升级的一些步骤。我这边是先删除php5,然后再安装的。
安装epel
yum -y install epel-release
安装源
rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm
卸载老版本的php
yum -y remove php* php-common
安装php
yum -y install php70w php70w-opcache
安装php模块
yum -y install php70w-mysql php70w-xml php70w-soap php70w-xmlrpc php70w-mbstring php70w-json php70w-gd php70w-mcrypt
重启nginx和php服务
systemctl restart nginx
ps -ef | grep php-fpm
kill -9 上面获取的进程id
whereis php-fpm
启动fpm
摘自
如何在CentOS7上升级PHP5.x到PHP7?_恒馨博客towait.com