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 
时间: 2024-10-27 14:02:46

CentOS7快速安装PHP7.0指南的相关文章

centos7.3安装php7.0

需求:在Centos7.3下搭建LNMP环境 文章转载自:http://blog.csdn.net/wszll_alex/article/details/76285324 作者:狂热森林 1. 关闭防火墙和selinux 打开文件selinux vim /etc/sysconfig/selinux 将文件中SELINUX=enforcing改为disabled,然后执行"setenforce 0″不用重启地关闭selinux. SELINUX=disabled 关闭放火墙 systemctl s

Linux Centos7.2 编译安装PHP7.0.2

操作环境: 1.系统:Centos7.2 2.服务:Nginx 1.下载PHP7.0.2的安装包解压,编译,安装: $ cd /usr/src/ $ wget http://cn2.php.net/distributions/php-7.0.2.tar.gz $ tar -zxvf php-7.0.2.tar.gz $ cd php-7.0.2 1.1 编译前检查 请检查是否安装了gcc ,没有的话执行yum install gcc 检查是否安装了libxml2 ,没有的话执行yum insta

centos7.2源码安装php7.0.9和nginx1.10.3服务器

下载nginx-1.10.3.tar.gz,php-7.0.9.tar.gz.也可以去nginx官网,php官网下载想要的版本.我选择nginx1.10.3稳定版和php7.0.9最新版.php源码包下载速度可能会很慢,建议使用迅雷等工具,下载完成后通过stfp工具把源码包上传到服务器上,为方便测试,我直接放置在root家目录下: 使用源码安装要确保服务器安装好gcc(编辑工具)和make(安装工具),若没安装可以执行命令安装: # yum install gcc # yum install m

centos7.5环境下编译安装php7.0.30并安装redis和mongo扩展

1.安装php7.0.30的脚本 # vim install_php.sh #!/bin/bash # 安装基本依赖 yum install -y gcc gcc-c++ htop telnet iotop iptraf iftop make logrotate xinetd ntsysv sysstat perl autoconf libjpeg libjpeg-devel libpng libpng-devel glibc glibc-devel glib2 glib2-devel bzip

centos7 快速安装 mariadb(mysql)

nbsp; centos7 快速安装 mariadb(mysql) 默认安装 mariadb 5.5.如果安装 mariadb 10.0 需要修改源 Centos 使用YUM安装MariaDB 出于安全考虑,不应该使用 root安装.所以应该新建一个用户 CentOS 7中MARIADB安装配置步骤详解

Centos7 离线安装 php7

问题:因内部管控,机器无法连接公有yum源安装php. 正常安装php7可以参考CentOS7.2 安装 PHP7.2 下面的代码也是一种方法 yum -y install libmcrypt libmcrypt-devel mcrypt mhashrpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpmrpm -Uvh https://mirror.webtatic.com/yum/el7/w

centos7抢先安装docker1.0

1.关闭selinux [[email protected] ~]#setenforce 0 2.安装 Fedora EPEL [[email protected] ~]#yum install -y http://ftp.riken.jp/Linux/fedora/epel/6/x86_64/epel-release-6-8.noarch.rpm 3.安装docker [[email protected] ~]#yum install -y docker-io [[email protecte

图解Linux下源码安装PHP7.0.9 +Nginx

上一次,在<Linux下源码安装php7.0.6>,安装过PHP7.0.3,本文将记录安装PHP7.0.9过程. 测试环境 Linux 2.6.32-279.el6.i686 nginx-1.9.15.tar http://nginx.org/download/nginx-1.9.15.tar.gz php-7.0.9.tar.gz http://am1.php.net/distributions/php-7.0.9.tar.gz 安装Nginx wget http://nginx.org/d

Centos7.2安装zabbix3.0

Centos7.2YUM安装zabbix3.0 防火墙和selinux关闭,这个我就不说了. 1.启动apache yum -y install httpd systemctl start httpd.service systemctl enable httpd.service systemctl status httpd.service 2. 启动mariadb yum install mariadb mariadb-server -y systemctl start mariadb syst