How to Install PHP 7 on CentOS/RHEL 7.1 & 6.7
来源:互联网 发布:网络知名小说家排行榜 编辑:程序博客网 时间:2024/05/22 06:12
PHP 7.0 is the latest stable release of PHP. May of popular yum repositories are providing rpm packages for PHP 7. This article is using webtatic yum repository and used the same for testing on CentOS 7 server. This article will help you to install PHP 7 on CentOS & Red Hat 7.1 & 6.7 servers.
Install Yum Repository
First you need to enable Webtatic and EPEL yum repositories on your system. Use the following command to install EPEL repository on your CentOS and Red Hat 7/6 systems
Use this command to install epel-release yum repository.
# yum install epel-release
and now execute one of following command as per your operating system version to install webtatic yum repository.
CentOS/RHEL 7# rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpmCentOS/RHEL 6# rpm -Uvh https://mirror.webtatic.com/yum/el6/latest.rpm
Install PHP 7
Use the following command to install PHP 7 on your system.
# yum install php70w
Verify Install PHP Version
Now use the following command to check installed php version on your system.
# php -vPHP 7.0.0 (cli) (built: Dec 2 2015 20:42:32) ( NTS )Copyright (c) 1997-2015 The PHP GroupZend Engine v3.0.0, Copyright (c) 1998-2015 Zend Technologies
Install PHP Modules
You may also want to install additional php modules based on your application requirements. Below command will install some more useful php modules.
# yum install php70w-xml php70w-soap php70w-xmlrpc# yum install php70w-mbstring php70w-json php70w-gd php70w-mcrypt
记得最后要重启apache-server
#sudo service httpd restart
To find out other available php modules use the following command.
# yum search php70 php70w.x86_64 : PHP scripting language for creating dynamic web sitesphp70w-bcmath.x86_64 : A module for PHP applications for using the bcmath libraryphp70w-cli.x86_64 : Command-line interface for PHPphp70w-common.x86_64 : Common files for PHPphp70w-dba.x86_64 : A database abstraction layer module for PHP applicationsphp70w-devel.x86_64 : Files needed for building PHP extensionsphp70w-embedded.x86_64 : PHP library for embedding in applicationsphp70w-enchant.x86_64 : Enchant spelling extension for PHP applicationsphp70w-fpm.x86_64 : PHP FastCGI Process Managerphp70w-gd.x86_64 : A module for PHP applications for using the gd graphics libraryphp70w-imap.x86_64 : A module for PHP applications that use IMAPphp70w-interbase.x86_64 : A module for PHP applications that use Interbase/Firebird databasesphp70w-intl.x86_64 : Internationalization extension for PHP applicationsphp70w-ldap.x86_64 : A module for PHP applications that use LDAPphp70w-mbstring.x86_64 : A module for PHP applications which need multi-byte string handlingphp70w-mcrypt.x86_64 : Standard PHP module provides mcrypt library supportphp70w-mysql.x86_64 : A module for PHP applications that use MySQL databasesphp70w-mysqlnd.x86_64 : A module for PHP applications that use MySQL databasesphp70w-odbc.x86_64 : A module for PHP applications that use ODBC databasesphp70w-opcache.x86_64 : An opcode cache Zend extensionphp70w-pdo.x86_64 : A database access abstraction module for PHP applicationsphp70w-pdo_dblib.x86_64 : MSSQL database module for PHPphp70w-pear.noarch : PHP Extension and Application Repository frameworkphp70w-pgsql.x86_64 : A PostgreSQL database module for PHPphp70w-phpdbg.x86_64 : Interactive PHP debuggerphp70w-process.x86_64 : Modules for PHP script using system process interfacesphp70w-pspell.x86_64 : A module for PHP applications for using pspell interfacesphp70w-recode.x86_64 : A module for PHP applications for using the recode libraryphp70w-snmp.x86_64 : A module for PHP applications that query SNMP-managed devicesphp70w-soap.x86_64 : A module for PHP applications that use the SOAP protocolphp70w-tidy.x86_64 : Standard PHP module provides tidy library supportphp70w-xml.x86_64 : A module for PHP applications which use XMLphp70w-xmlrpc.x86_64 : A module for PHP applications which use the XML-RPC protocol
- How to Install PHP 7 on CentOS/RHEL 7.1 & 6.7
- How to Install LAMP (Apache 2.4, MySQL 5.6, and PHP 5.4) on CentOS/RHEL 7
- How to Install Apache OpenOffice on RHEL/CentOS
- How to install MySQL Server 5.6 on CentOS 7 / RHEL 7
- How to Install GUI (Gnome 3) Using CD/DVD on RHEL/CentOS 7
- How to Install Tomcat 7.0.68 Server on CentOS/RHEL 7/6/5
- How to Install Subversion (SVN) 1.8.15 on CentOS/RHEL 7/6/5
- How to Install PostgreSQL 9.5 on CentOS/RHEL 7/6/5 and Fedora 23/22
- Install PHP 7, Apache, MySQL 5.6 on CentOS / RHEL 7.1 & 6.7 + Wordpress
- How To Install Docker on CentOS 7
- How To Install Openfire On CentOS 7
- How to Install MySQL on CentOS 7
- How to Install Pip on CentOS 7
- How To Install MySQL on CentOS 7
- How to Install TestLink on CentOS 7
- How To Install Speedtest-cli On a CentOS / RHEL / Scientific / Fedora Linux To Check Internet Speed
- How to Install php-mcrypt on CentOS 6.2
- How to install php memcached on CentOS 6.5
- SpringMVC 使用JSR-303进行校验 @Valid
- SVN服务器的搭建与使用(三)
- Wireshark抓包详解
- 欢迎使用CSDN-markdown编辑器
- 浅谈Java中path、classpath环境变量的配置问题
- How to Install PHP 7 on CentOS/RHEL 7.1 & 6.7
- 特殊字符<200b><200c><200d>的删除办法与原理
- yum 安装mysql5.7 是 出现无法登陆问题以及mysql error You must reset your password using ALTER USER statement befor
- java POI word的docx文档中的文字替换,并把docx转成pdf文档
- jface databinding:label provider 实现多列表格(Table)数据绑定的两个途径
- rails g -h
- Linux的用户组和权限管理之特殊权限及ACL的使用
- 事件分发机制
- Android图片加载Glide框架使用详解