How to install php 5, how to install/upgrade php

When I run yum install php php-devel php-mysql php-gd php-mbstring, it will install php5.3.

Bạn đang xem: How to install php 5, how to install/upgrade php

yum list installed *php*Loaded plugins: fastestmirror, securityLoading mirror speeds from cached hostfile * base: * epel: * extras: * updates: Packagesphp.x86_64 5.3.3-46.el6_6
updatesI just removed it yum remove php php-cli php-common php-devel php-gd php-mbstring php-mysql php-pdo.

And I tried yum install php56w php56w-devel php56w-mysql php56w-gd php56w-mbstring, but they are not available.

Loaded plugins: fastestmirror, securitySetting up Install ProcessLoading mirror speeds from cached hostfile * base: * epel: * extras: * updates: package php56w available.No package php56w-devel available.No package php56w-mysql available.No package php56w-gd available.No package php56w-mbstring available.Error: Nothing to lớn doHow can I install php5.6 on CentOS 6?

php centos6
Improve this question
asked Oct 29, 2015 at 10:35

33333 gold badges88 silver badges1515 bronze badges
địa chỉ cửa hàng a phản hồi |

4 Answers 4

Sorted by: Reset to mặc định
Highest score (default) Date modified (newest first) Date created (oldest first)
you would địa chỉ repo into centos 6 by:

rpm -Uvh,

#yum clean all#yum install php56w php56w-commonI hope help you!

mô tả
Improve this answer
answered Oct 29, năm ngoái at 10:41

6433 bronze badges
showroom a phản hồi |
CentOS now offers Software Collections (SCL) as a repo installable from base:

yum install centos-release-sclOnce you"ve installed the SCL repo, you can install php 5.6:

yum install rh-php56The CentOS documentation is slightly dated as is the Red Hat Documentation, but newer versions of php, PostgreSQL, MariaDB, MySQL, perl, ruby, etc. Are available. It"s also available on CentOS & RHEL 7 & is theoretically better integrated with the OS. The notes say that adding packages through SCL won"t interfere with the system"s utilities, such as yum.

Xem thêm: upload file image php

To make the SCL version of PHP the mặc định on the command line, run the following as root to địa chỉ to the default profile:

printf "#!/bin/bash source scl_source enable rh-php56 " > /etc/profile.d/php56.shchmod ugo+r /etc/profile.d/php56.shThis makes using pear to showroom PHP packages easier by setting $PATH to lớn include /opt/rh/rh-php56/root/...

cốt truyện
Improve this answer
edited Dec 5, năm 2016 at 19:59
answered May 10, năm nhâm thìn at 19:17

45544 silver badges1313 bronze badges
showroom a bình luận |
You can use REMI"s repository

To enable it, follow these steps:

yum install /etc/yum.repos.d/remi.repo and, under then tag, phối enabled=1yum install php

Please lưu ý that, doing that, you will update the system-wide php package lớn the 5.6 version. If you need, for some reason, install PHP 5.6 alongside the older, CentOS-distributed relase, you had to bởi a more complex side-by-side installation.

giới thiệu
Improve this answer
answered Oct 29, 2015 at 10:45

43.2k66 gold badges9292 silver badges156156 bronze badges
địa chỉ cửa hàng a phản hồi |
Try installing from specific repo

yum --disablerepo="*" --enablerepo="remi-php56" install php
mô tả
Improve this answer
edited Jun 9, 2017 at 6:40


Mr. Raspberry
3,8781212 silver badges3232 bronze badges
answered Jun 9, 2017 at 3:21
111 bronze badge
địa chỉ a bình luận |

Your Answer

Thanks for contributing an answer to server Fault!

Please be sure to lớn answer the question. Provide details and share your research!

But avoid

Asking for help, clarification, or responding lớn other answers.Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Facebook
Sign up using email and Password

Post as a guest

thư điện tử Required, but never shown

Post as a guest


Required, but never shown

Post Your Answer Discard

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy và cookie policy

Not the answer you're looking for? Browse other questions tagged php centos6 or ask your own question.

The Overflow Blog
Featured on Meta
CentOS installing MySQL 5.6.26
Package rh-php56 not available on CentOS 6 via centos-release-scl
Yum Fails When Installing PHP
enable mysql 5.5 for php
PHP upgraded khổng lồ 5.3.8 - Can't install/upgrade extensions
installing dkms fails lớn work
Dependency problems updating Centos 6.4, 64 bit
PHP và PCI Compliance
php-devel failed on installation red-hat 6
CentOS 5.5 php-posix with dependency error php53-common
RHSCL - php55-tidy extension not available via RHSCL
Hot Network Questions more hot questions

Question feed
Subscribe to RSS
Question feed lớn subscribe lớn this RSS feed, copy & paste this URL into your RSS reader.

vps Fault
Stack Exchange Network
Site kiến thiết / logo sản phẩm © 2022 Stack Exchange Inc; user contributions licensed under cc by-sa. Rev2022.5.23.42198

Your privacy

By clicking “Accept all cookies”, you agree Stack Exchange can store cookies on your device và disclose information in accordance with our Cookie Policy.