yum centos6.5 安装 php7 php56

安装源,这个是 centos6的

yum install http://rpms.famillecollet.com/enterprise/remi-release-6.rpm

rpm -Uvh https://mirror.webtatic.com/yum/el6/latest.rpm 这个插件少memcache之类的木有

验证下:yum search php7 就会出来了

yum install -y php70

然后提示:

Error: php70w-common conflicts with php-common-5.3.3-46.el6_7.1.x86_64

之前有 –> Processing Conflict: php70w-common-7.0.3-1.w6.x86_64 conflicts php-common < 5.5.0

应该卸载原来的php5.3

yum remove php*

 

然后安装需要的库

yum list php7* 可以列出所有可用的

yum install php70-php.x86_64 php70-php-gd.x86_64  php70-php-mbstring.x86_64  php70-php-mysqlnd.x86_64  php70-php-pdo.x86_64  php70-php-pdo-dblib.x86_64   php70-php-pecl-imagick.x86_64 php70-php-pecl-imagick-devel.x86_64 php70-php-pecl-memcache.x86_64 php70-php-pecl-memcached.x86_64  php70-php-pecl-xdebug.x86_64  php70-php-devel.x86_64  php70-php-fpm.x86_64

 

 

——-

thinkphp3.1老程序不支持,

改php5.6

yum install php56-php.x86_64 php56-php-gd.x86_64  php56-php-mbstring.x86_64  php56-php-mysqlnd.x86_64  php56-php-pdo.x86_64  php56-php-pdo-dblib.x86_64   php56-php-pecl-imagick.x86_64 php56-php-pecl-imagick- devel.x86_64 php56-php-pecl-memcache.x86_64 php56-php-pecl-memcached.x86_64  php56-php-pecl-xdebug.x86_64  php56-php-devel.x86_64  php56-php-fpm.x86_64 php56-php-mysqlnd.x86_64 php56-php-5.6.19-1.el6.remi.x86_64 php56 php56-php-mbstring.x86_64

这个一定要装 php56-php-5.6.19-1.el6.remi.x86_64 如果不装不会生成libphp.so apache下会无法使用,nginx到无所谓
php56-php-mbstring.x86_64 这个包oss会用到,否则aliyun会异常

修改上传尺寸
/opt/remi/php56/root/etc/php.ini
upload_max_filesize =
post_max_size =

发表评论