How to install php on centos6.8 yum

藏色散人
Release: 2022-01-24 11:22:10
Original
1755 people have browsed it

centos6.8 How to install php with yum: 1. Configure the installation package source; 2. Perform the installation through "yum -y install php56w.x86_64 yum -y --enablerepo=webtatic..."; 3. Just set php-fpm to start at boot.

How to install php on centos6.8 yum

The operating environment of this article: centos6.8 system, php5.6 version, DELL G3 computer

How to install centos6.8 yum php?

##Centos6.8 install php5.6

Check the currently installed PHP package

yum list installed | grep php
Copy after login

If there is an installed PHP package, Delete them first, such as:

yum remove php.x86_64 php-cli.x86_64 php-common.x86_64
Copy after login

Configure the installation package source:

# Centos 5.X rpm -Uvh http://mirror.webtatic.com/yum/el5/latest.rpm # CentOs 6.x rpm -Uvh http://mirror.webtatic.com/yum/el6/latest.rpm # CentOs 7.X rpm -Uvh https://mirror.webtatic.com/yum/el7/epel-release.rpm rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm
Copy after login

If you want to delete the packages installed above, reinstall

rpm -qa | grep webstatic rpm -e [上面搜索到的包即可]
Copy after login

Perform the installation

yum -y install php56w.x86_64 yum -y --enablerepo=webtatic install php56w-devel yum -y install php56w-pdo php56w-xml php56w-gd 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-opcache.x86_64
Copy after login

Install PHP FPM

yum -y install php56w-fpm #设置php-fpm开机启动 chkconfig php-fpm on #启动php-fpm /etc/init.d/php-fpm start
Copy after login

Note: If you want to change to php5.5 or 5.4 version, just replace the above 56w with 55w or 54w

Recommended study: "

PHP video tutorial

The above is the detailed content of How to install php on centos6.8 yum. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
php
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!