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/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 doHow can I install php5.6 on CentOS 6?

cốt truyện
Improve this question
asked Oct 29, năm ngoái at 10:35

33333 gold badges88 silver badges1515 bronze badges
địa chỉ cửa hàng a bình luận |

4 Answers 4

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

rpm -Uvh,

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

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

6433 bronze badges
địa chỉ cửa hàng a bình luận |
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: Hướng Dẫn Cách Bật Tắt Chế Độ Máy Bay Trên Win 10, Bật Hoặc Tắt Chế Độ Máy Bay

To make the SCL version of PHP the default on the command line, run the following as root to địa chỉ cửa hàng to the mặc định 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 add PHP packages easier by setting $PATH lớn include /opt/rh/rh-php56/root/...

nội dung
Improve this answer
edited Dec 5, năm 2016 at 19:59
answered May 10, 2016 at 19:17

45544 silver badges1313 bronze badges
địa chỉ a phản hồi |
You can use REMI"s repository

To enable it, follow these steps:

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

Please chú ý that, doing that, you will update the system-wide php package khổng lồ the 5.6 version. If you need, for some reason, install PHP 5.6 alongside the older, CentOS-distributed relase, you had to vày a more complex side-by-side installation.

chia sẻ
Improve this answer
answered Oct 29, 2015 at 10:45

44.3k66 gold badges9898 silver badges162162 bronze badges
add a phản hồi |
Try installing from specific repo

yum --disablerepo="*" --enablerepo="remi-php56" install php
nói qua
Improve this answer
edited Jun 9, 2017 at 6:40


Mr. Raspberry
3,8781313 silver badges3232 bronze badges
answered Jun 9, 2017 at 3:21
111 bronze badge
add a phản hồi |

Your Answer

Thanks for contributing an answer to hệ thống Fault!

Please be sure to answer the question. Provide details và 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

email Required, but never shown

Post as a guest


Required, but never shown

Post Your Answer Discard

By clicking “Post Your Answer”, you agree to lớn our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged 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 khổng lồ work
Dependency problems updating Centos 6.4, 64 bit
PHP & 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 khổng lồ RSS
Question feed lớn subscribe lớn this RSS feed, copy and paste this URL into your RSS reader.

server Fault
Stack Exchange Network
Site design / hình ảnh sản phẩm © 2022 Stack Exchange Inc; user contributions licensed under CC BY-SA. Rev2022.11.17.43037

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.

hotlive |