卸载既存的httpd、php
[root@v133 /]# rpm -qa | grep httpd
httpd-2.2.15-30.el6.centos.x86_64
httpd-tools-2.2.15-30.el6.centos.x86_64
[root@v133 /]# rpm -qa | grep php
php-cli-5.3.3-27.el6_5.x86_64
php-pear-1.9.4-4.el6.noarch
php-common-5.3.3-27.el6_5.x86_64
php-gd-5.3.3-27.el6_5.x86_64
php-xml-5.3.3-27.el6_5.x86_64
php-pdo-5.3.3-27.el6_5.x86_64
php-5.3.3-27.el6_5.x86_64
使用yum删除(依赖的php也会被删除)
[root@v133 /]# yum remove httpd-2.2.15
起動
[root@v133 /]# /etc/init.d/httpd start
安装
# remiリポジトリの公開鍵を取り込む
sudo rpm --import https://rpms.remirepo.net/RPM-GPG-KEY-remi
# yum-config-manager コマンドのインストールと remiリポジトリの追加
sudo yum install yum-utils http://mirror.smartmedia.net.id/remi/enterprise/remi-release-6.rpm
yum install yum-utils
# remi-php70 リポジトリを有効化
sudo yum-config-manager --enable remi-php70
# PHP と拡張モジュールなどをインストール
sudo yum install php php-cli php-devel php-common php-mbstring php-mysql php-phpunit-PHPUnit php-pecl-xdebug php-fpm php-gd php-gmp php-mcrypt php-opcache php-pdo php-xml
MySQL5.7
rpm -Uvh http://dev.mysql.com/get/mysql57-community-release-el6-7.noarch.rpm