Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to install the high version of php for Centos

2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)05/31 Report--

In this article, the editor introduces in detail "how to install the high version of php in Centos". The content is detailed, the steps are clear, and the details are handled properly. I hope that this article "how to install the high version of php in Centos" can help you solve your doubts.

Brief introduction

Php (Hypertext preprocessor) is a general open source scripting language. Grammar absorbs the characteristics of c language, java and perl, is convenient for learning and widely used, and is mainly suitable for the field of web development. Php's unique syntax is a mix of c, java, perl, and php's own syntax.

Dynamic pages made with php compared with other programming languages, php is to embed the program into html (an application under the standard general markup language) documents to execute, the execution efficiency is much higher than the complete generation of html tags cgi; php can also execute compiled code, compilation can achieve encryption and optimize the code to run, so that the code runs faster.

Installation

1. Check whether php is currently installed

Rpm-qa | grep php

If you have php installed, remove these packages first:

Yum remove php*

two。 Install the php source

Centos 5 install the PHP source:

Rpm-ivh http://mirror.webtatic.com/yum/el5/latest.rpm

Centos 6 install the PHP source:

Rpm-ivh http://mirror.webtatic.com/yum/el6/latest.rpm

Centos 7 installs the PHP source and epel extension source:

Rpm-ivh https://mirror.webtatic.com/yum/el7/epel-release.rpmrpm-ivh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm

3. Start installing php now

Install the basic installation package for php5.5:

Yum install php55w php55w-gd php55w-mbstring php55w-mysql php55w-fpm

Install the basic installation package for php5.6:

Yum install php56w php55w-gd php56w-mbstring php56w-mysql php56w-fpm

Install the basic installation package for php7.0:

Yum install php70w php70w-gd php70w-mbstring php70w-mysql php70w-fpm

After installing php, you need to restart apache:

Service restart

4. Test the web page

I installed php7.0, just write a web page with php7.0 to test it.

/ var/www/html/index.php

After reading this, the article "how to install the high version of Centos php" has been introduced. If you want to master the knowledge of this article, you still need to practice and use it. If you want to know more about the article, you are welcome to follow the industry information channel.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report