未分類

CentOS 7 安裝、升級 PHP 5.6

安裝、更新 EPEL
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

編輯 yum 容器
vi /etc/yum.repos.d/repo.repo

[remi-php56]
name=Les RPM de remi de PHP 5.6 pour Enterprise Linux 7 – $basearch
mirrorlist=http://rpms.famillecollet.com/enterprise/7/php56/x86_64
# WARNING: If you enable this repository, you must also enable “remi”
enabled=1
gpgcheck=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-remi

更新 libzip

wget http://rpms.famillecollet.com/enterprise/7/remi/x86_64/libzip-last-1.1.3-1.el7.remi.x86_64.rpm
yum localinstall libzip-last-*.rpm
yum update

安裝、更新 PHP

# yum remove php-*
# yum install –enablerepo=remi,remi-php56 php php-devel php-mbstring php-pdo php-gd php-xml php-mcrypt php-mysql