centos 6.5 lamp (php5.6版本)
阿新 • • 發佈:2018-12-06
追加CentOS 6.5的epel及remi源。
如果使用無效可先用 yum update 更新下
# rpm -Uvh http://ftp.iij.ad.jp/pub/linux/fedora/epel/6/x86_64/epel-release-6-8.noarch.rpm
# rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm
rpm -Uvh http://mirror.webtatic.com/yum/el6/latest.rpm(其他源,好像沒用)
以下是CentOS 7.0的源。
# yum install epel-release
# rpm -ivh http://rpms.famillecollet.com/enterprise/remi-release-7.rpm
使用yum list命令檢視可安裝的包(Packege)。
# yum list --enablerepo=remi --enablerepo=remi-php56 | grep php
安裝PHP5.6
yum源配置好了,下一步就安裝PHP5.6。
yum install --enablerepo=remi --enablerepo=remi-php56 php php56-opcache php56-devel php56-mbstring php56-mcrypt php56-mysqlnd php56-phpunit-PHPUnit php56-pecl-xdebug php56-pecl-xhprof
yum install --enablerepo=remi --enablerepo=remi-php56 php-fpm (啟動用php-fpm)
yum install php56 php56-pear php56-mysql php56-gd (56為php5.6版本 支援apache解析.php檔案)
用PHP命令檢視版本。
PHP-v