yum 安装 php5.6

时间:2023-03-09 07:28:50
yum 安装 php5.6

yum 安装 php5.6

安装 PHP

rpm -Uvh http://ftp.iij.ad.jp/pub/linux/fedora/epel/6/i386/epel-release-6-8.noarch.rpm;
rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm;
yum list --enablerepo=remi --enablerepo=remi-php56 | grep php; #查看php的安装包
yum install --enablerepo=remi --enablerepo=remi-php56 php php-mysql php-opcache php-pecl-apcu php-devel php-mbstring php-mcrypt php-mysqlnd php-phpunit-PHPUnit php-pecl-xdebug php-pecl-xhprof php-pdo php-pear php-fpm php-cli php-xml php-bcmath php-process php-gd php-common;
php -v; #这里会有报错,关于版本冲突的问题,看提示,使用 --skip-broken解决
[root@localhost ~]# yum install --enablerepo=remi --enablerepo=remi-php56 php php-mysql php-opcache php-pecl-apcu php-devel php-mbstring php-mcrypt php-mysqlnd php-phpunit-PHPUnit php-pecl-xdebug php-pecl-xhprof php-pdo php-pear php-fpm php-cli php-xml php-bcmath php-process php-gd php-common --skip-broken  --downloadonly --downloaddir=/data/php/
#这条命令表示把php的安装包保存