How to install php 7.x on CentOS 7
Step 1: Setup the Webtatic YUM repo
Precompiled PHP 7.x binaries are available for CentOS 7 from the Webtatic, IUS, or Remi’s RPM repositories.
Below are instructions on installing PHP 7.x using the Webtatic YUM repo.
Setup the Webtatic YUM repo:
sudo rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
sudo rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm
Step 2: Install PHP 7.1 and necessary extensions
Install PHP 7.1 and some of the most commonly used extensions:
sudo yum install -y mod_php71w php71w-cli php71w-common php71w-gd php71w-mbstring php71w-mcrypt php71w-mysqlnd php71w-xml
Note: The above packages are for general purpose use and may not suit your specific requirements. You should confirm the packages to be installed referring to the Webtatic PHP 7.1 introduction page.
Alternatively, if you want to install PHP 7.0, you should refer to Webtatic PHP 7.0 introduction page.
Step 3: configure PHP 7.x
After the installation, the PHP 7.x configuration file will be saved as /etc/php.ini. If necessary, you can use the vi text editor to modify it:
sudo cp /etc/php.ini /etc/php.ini.bak
sudo vi /etc/php.ini
Remember to restart your web server after modifying the /etc/php.ini file.
For Apache:
sudo systemctl restart httpd.service
For Nginx:
sudo systemctl restart nginx.service php-fpm.service
That’s it. Thanks for reading.
How to install php 7.x on CentOS 7的更多相关文章
- Install FFMPEG and FFMPEG-PHP in CentOS 6 with Virtualmin
Install FFMPEG and FFMPEG-PHP in CentOS 6 with Virtualmin 1 year ago - by Daniel - howto centos v ...
- Install Erlang and Elixir in CentOS 7
In this tutorial, we will be discussing about how to install Erlang and Elixir in CentOS 7 minimal s ...
- Install Maya 2015 x64 in CentOS 7
Thanks for Must(QQ ID)'s big help for installing Maya in CentOS7. This is my steps for installing ma ...
- How to install Wordpress 4.0 on CentOS 7.0
This document describes how to install and configure Wordpress 4.0 on CentOS 7.0. WordPress started ...
- How to install GSL on linux(ubuntu,centos,redhat)
Test: ftp://ftp.gnu.org/gnu/gsl/gsl-1.15.tar.gz success. ftp://ftp.gnu.org/gnu/gsl/gsl-1.13.0.tar.g ...
- How To install FFMPEG, FLVTOOL2, MP4Box on CentOS server 2015 easy method
for i386:wget http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.3-1.el6.rf.i686.rpmrpm ...
- Install TightVNC Server in RHEL/CentOS and Fedora to Access Remote Desktops
Virtual Networking Computing (VNC) is a Kind of remote sharing system that makes it possible to take ...
- How to install Redis 3.2 on CentOS 6 and 7
What is Redis? Redis is a flexible open-source, key value data store, used as a database, cache and ...
- [转载]How To Install Nginx And PHP-FPM On CentOS 6 Via Yum
http://www.lifelinux.com/how-to-install-nginx-and-php-fpm-on-centos-6-via-yum/ http://blog.csdn.net/ ...
- Install Haskell on Ubuntu and CentOS
For Ubuntu: Step one: Install GHC If you don't want to install curl you can skip step 1 and just dir ...
随机推荐
- Network Basic Knowledge
@1: 应用层的常用协议以及对应的端口号: DNS 53/tcp/udp SMTP 25/tcp POP3 110/tcp HTTP 80/tcp HTTPS 443/udp TELNET 23/tc ...
- 简单springmvc在Eclipse的Tomcat上部署404error,直接在Tomcat上部署可以访问
在Eclipse工程下的.setting文件夹的org.eclipse.wst.common.component这个文件,如下则可以访问: <?xml version="1.0&quo ...
- 解释一下python中的继承
当一个类继承另一个类,它就被称为一个子类/派生类,继承父类/基类/超类.它会继承/获取所有类成员(属性和方法) 继承能让我们重新使用代码,也能更容易的创建和维护应用 单继承:一个类继承单个基类 多继承 ...
- Android:日常学习笔记(6)——探究活动(4)
Android:日常学习笔记(6)——探究活动(4) 活动的启动模式 standard模式 standard是活动默认的启动模式,在不进行显示定义的情况下,所有活动都会自动使用这种启动模式. stan ...
- SVN 过滤文件
SVN新手最容易犯的一个错误: 就是把所有文件一股脑地全提交上去了. 这样很不好,因为这当中包含很多编译器自动生成的文件,还有中间文件. 这些文件可能每次编译都会不同,所以编译一次就冲突一次. 很显然 ...
- [SCOI2005]超级格雷码
题目 BZOJ 洛谷 做法 爆搜真有意思 满足不重复且异或后仅一位为\(1\) 利用奇偶性交叉搜索(仅改变一位) My complete code #include<bits/stdc++.h& ...
- 快乐学习 Ionic Framework+PhoneGap 手册1-1{创建APP项目}
快乐学习 Ionic Framework+PhoneGap 手册1-1 * 前提必须安装 Node.js,安装PhoneGap,搭建Android开发环境,建议使用真机调试 {1.1}= 创建APP项 ...
- accept= 'image/*'反映缓慢
input[type='file']的accept属性用来指定上传文件的MIME类型. 将其设为accept= 'image/*',顾名思义,过滤掉所有非图片文件, 但在实际操作中,发现有时会出现响应 ...
- poj 1679 The Unique MST 【次小生成树+100的小数据量】
题目地址:http://poj.org/problem?id=1679 2 3 3 1 2 1 2 3 2 3 1 3 4 4 1 2 2 2 3 2 3 4 2 4 1 2 Sample Outpu ...
- 【arc101】比赛记录
这场还好切出了D,rt应该能涨,然而这场的题有点毒瘤,700分的D没多少人切,更别说EF了.(暴打出题人)既然这样,干脆就水一篇博客,做个简单的比赛记录. C - Candles 这题是一道一眼题,花 ...