CentOS7快速安装PHP7.0指南
Posted myway_liang
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了CentOS7快速安装PHP7.0指南相关的知识,希望对你有一定的参考价值。
一、删除旧版本 rpm -qa|grep php* or yum list installed |grep php yum remove php* 二、安装新版本 1.更新yum安装包 rpm -Uvh https://mirror.webtatic.com/yum/el7/epel-release.rpm rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm 2.安装php和其它组件 yum install php70w.x86_64 php70w-cli.x86_64 php70w-common.x86_64 php70w-gd.x86_64 php70w-ldap.x86_64 php70w-mbstring.x86_64 php70w-mcrypt.x86_64 php70w-mysql.x86_64 php70w-pdo.x86_64 yum install php70w-fpm sed -i -r "/^max_execution_time/ [email protected](max_execution_time = )[0-9][email protected]\[email protected]" /etc/php.ini sed -i -r "/^memory_limit/ [email protected](memory_limit = )[0-9]+(M)@\1128\[email protected]" /etc/php.ini sed -i -r "/^post_max_size/ [email protected](post_max_size = )[0-9]+(M)@\116\[email protected]" /etc/php.ini sed -i -r "/^upload_max_filesize/ [email protected](upload_max_filesize = )[0-9]+(M)@\12\[email protected]" /etc/php.ini sed -i -r "/^max_input_time/ [email protected](max_input_time = )[0-9][email protected]\[email protected]" /etc/php.ini sed -i -r "/^always_populate_raw_post_data/d; /^;always_populate_raw_post_data/ a\always_populate_raw_post_data = -1" /etc/php.ini sed -i -r "/^expose_php/ [email protected](expose_php = )[email protected]\[email protected]" /etc/php.ini vim /etc/php.ini date.timezone = Asia/Shanghai systemctl enable php-fpm systemctl start php-fpm
以上是关于CentOS7快速安装PHP7.0指南的主要内容,如果未能解决你的问题,请参考以下文章
centos7.5环境下编译安装php7.0.30并安装redis和mongo扩展