码迷,mamicode.com
首页 > Web开发 > 详细

CentOS7快速安装PHP7.0指南

时间:2017-06-18 10:36:15      阅读:231      评论:0      收藏:0      [点我收藏+]

标签:size   span   新版本   emc   com   pop   lease   max   sql   

一、删除旧版本
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/ s@(max_execution_time = )[0-9]+@\1300@" /etc/php.ini
sed -i -r "/^memory_limit/ s@(memory_limit = )[0-9]+(M)@\1128\2@" /etc/php.ini
sed -i -r "/^post_max_size/ s@(post_max_size = )[0-9]+(M)@\116\2@" /etc/php.ini
sed -i -r "/^upload_max_filesize/ s@(upload_max_filesize = )[0-9]+(M)@\12\2@" /etc/php.ini
sed -i -r "/^max_input_time/ s@(max_input_time = )[0-9]+@\1300@" /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/ s@(expose_php = )On@\1Off@" /etc/php.ini

vim /etc/php.ini
date.timezone = Asia/Shanghai
systemctl enable php-fpm
systemctl start php-fpm 

 

CentOS7快速安装PHP7.0指南

标签:size   span   新版本   emc   com   pop   lease   max   sql   

原文地址:http://www.cnblogs.com/vincent-liang/p/7043366.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!