CÀI PHP 5.6 CENTOS 6, 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: Cài php 5.6 centos 6, how to install/upgrade php

yum menu installed *php*Loaded plugins: fastestmirror, securityLoading mirror speeds from cached hosttệp tin * base: ftp.tsukucha.wide.ad.jp * epel: ftp.kddilabs.jp * extras: ftp.tsukubố.wide.ad.jp * updates: ftp.tsukutía.wide.ad.jpInstalled 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-pbởi vì.

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: ftp.tsukutía.wide.ad.jp * epel: ftp.kddilabs.jp * extras: ftp.tsukubố.wide.ad.jp * updates: ftp.tsukutía.wide.ad.jpNo 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?


php centos6
Share
Improve sầu this question
Follow
asked Oct 29 "15 at 10:35
*

shinshin
32333 gold badges88 silver badges1515 bronze badges
Add a comment |

4 Answers 4


Active Oldest Votes
4
you would add repo into centos 6 by:

rpm -Uvh https://mirror.webtatic.com/yum/el6/lachạy thử.rpmNext,

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


Share
Improve sầu this answer
Follow
answered Oct 29 "15 at 10:41
*

GLifeGLife
6433 bronze badges
Add a comment |
6
CentOS now offers Software Collections (SCL) as a repo installable from base:

yum install centos-release-sclOnce you"ve sầu 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, PostgreSquốc lộ, MariaDB, MySquốc lộ, perl, ruby, etc. are available. It"s also available on CentOS and RHEL 7 and 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: Những Video Được Thiết Kế Bằng Mmd Là Gì, Mikumikudance

To make the SCL version of PHPhường the mặc định on the command line, run the following as root khổng lồ add khổng lồ the default profile:

printf "#!/bin/bash source scl_source enable rh-php56 " > /etc/profile.d/php56.shchthủ thuật ugo+r /etc/profile.d/php56.shThis makes using pear to lớn add PHPhường. packages easier by setting $PATH lớn include /opt/rh/rh-php56/root/...


Share
Improve sầu this answer
Follow
edited Dec 5 "16 at 19:59
answered May 10 "16 at 19:17
*

LiczyrzepaLiczyrzepage authority
45544 silver badges1313 bronze badges
3
Add a phản hồi |
2
You can use REMI"s repository

To enable it, follow these steps:

yum install http://rpms.famillecollet.com/enterprise/remi-release-6.rpmedit /etc/yum.repos.d/remày.repo và, under then tag, phối enabled=1yum install php

Please note that, doing that, you will update the system-wide php package lớn the 5.6 version. If you need, for some reason, install PHPhường. 5.6 alongside the older, CentOS-distributed relase, you had to do a more complex side-by-side installation.


Share
Improve sầu this answer
Follow
answered Oct 29 "15 at 10:45
*

shodanshokshodanshok
38.4k44 gold badges8383 silver badges134134 bronze badges
1
Add a bình luận |
-1
Try installing from specific repo

yum --disablerepo="*" --enablerepo="remi-php56" install php
Share
Improve sầu this answer
Follow
edited Jun 9 "17 at 6:40

*

Mr. Raspberry
3,8481111 silver badges3232 bronze badges
answered Jun 9 "17 at 3:21
CrisMCrisM
111 bronze badge
Add a comment |

Your Answer


Thanks for contributing an answer lớn Server Fault!

Please be sure lớn 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; bachồng 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 Thư điện tử and Password
Submit

Post as a guest


Name
E-Mail Required, but never shown


Post as a guest


Name
Email

Required, but never shown


Post Your Answer Disthẻ

By clicking “Post Your Answer”, you agree khổng lồ our terms of service, privacy policy & 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
Linked
2
CentOS installing MySQL 5.6.26
1
Package rh-php56 not available on CentOS 6 via centos-release-scl
Related
1
Yum Fails When Installing PHP
2
enable mysql 5.5 for php
1
PHP. upgraded to lớn 5.3.8 - Can't install/tăng cấp extensions
1
installing dkms fails khổng lồ work
0
Dependency problems updating Centos 6.4, 64 bit
0
PHP.. and PCI Compliance
3
php-devel failed on installation red-hat 6
0
CentOS 5.5 php-posix with dependency error php53-common
0
RHSCL - php55-tidy extension not available via RHSCL
Hot Network Questions more hot questions

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


Server Fault
Company
Stack Exchange Network
site thiết kế / logo © 2021 Stack Exchange Inc; user contributions licensed under cc by-sa. rev2021.3.15.38781