CentOS 6 系統 PHP 預設只能更新到 5.3.3,可另外新增 remi repository 安裝較新的 PHP
安裝 remi repository
rpm -ivh http://download.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm
說明:
http://download.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm => 64 bit
http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm => 32 bit
安裝 apache、mysql、php
yum --enablerepo=remi install httpd
yum --enablerepo=remi install mysql-server
yum --enablerepo=remi install php
yum --enablerepo=remi install php-mysql
其他,安裝 php-mbstring
yum --enablerepo=remi install php-mbstring
若不想每次都輸入 --enablerepo=remi,可修改 /etc/yum.repos.d/remi.repo,將 remi 開啟
vi /etc/yum.repos.d/remi.repo
將 enabled=0 改為 enabled=1
沒有留言:
張貼留言