1. Check the currently installed PHP packages If there are PHP packages installed, delete them first yum remove php.x86_64 php-cli.x86_64 php-common.x86_64 php-gd.x86_64 php-ldap.x86_64 php-mbstring.x86_64 php-mcrypt.x86_64 php-mysql.x86_64 php-pdo.x86_64 2. Add rpm source First add Alibaba Cloud's epel source CentOS 6.X: rpm -Uvh http://mirror.webtatic.com/yum/el6/latest.rpm CentOS 7.X: rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm If you want to delete the package installed above, reinstall it rpm -qa | grep webstatic rpm -e The package searched above can be 3. Run yum install to install php php5.5: yum install php55w.x86_64 php55w-cli.x86_64 php55w-common.x86_64 php55w-gd.x86_64 php55w-ldap.x86_64 php55w-mbstring.x86_64 php55w-mcrypt.x86_64 php55w-mysql.x86_64 php55w-pdo.x86_64 php55w-fpm php55w-devel php5.6: yum install php56w.x86_64 php56w-cli.x86_64 php56w-common.x86_64 php56w-gd.x86_64 php56w-ldap.x86_64 php56w-mbstring.x86_64 php56w-mcrypt.x86_64 php56w-mysql.x86_64 php56w-pdo.x86_64 php56w-fpm php56w-devel php7.0: 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 php70w-fpm php70w-devel Summarize The above is the method of installing PHP with centos6-7 yum introduced by the editor. I hope it will be helpful to everyone! You may also be interested in:
|
<<: jQuery implements navigation bar effect with expansion animation
>>: How to set utf-8 encoding in mysql database
Download tutorial of mysql-connector-java.jar pac...
Table of contents Requirement description: Requir...
Preface I just bought a new VPS. The data disk of...
When it comes to styling our web pages, we have t...
Nginx optimization---hiding version number and we...
MySQL can be connected not only through the netwo...
Written in front I don’t know who first discovere...
We know that when using HTML on NetEase Blog, we ...
Table of contents 1. Problem Description 2. Probl...
Table of contents Basic HTML structure Generate s...
Recently, when I was working on monitoring equipm...
Table of contents Background of this series Overv...
<br />A contradiction arises. In small works...
Table of contents background Understanding compos...
A master once said that you should know the datab...