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: ftp.tsukuba.wide.ad.jp * epel: ftp.kddilabs.jp * extras: ftp.tsukuba.wide.ad.jp * updates: ftp.tsukuba.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-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: ftp.tsukuba.wide.ad.jp * epel: ftp.kddilabs.jp * extras: ftp.tsukuba.wide.ad.jp * updates: ftp.tsukuba.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 lớn doHow can I install php5.6 on CentOS 6?
rpm -Uvh https://mirror.webtatic.com/yum/el6/latest.rpmNext,
#yum clean all#yum install php56w php56w-commonI hope help you!
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/...
To enable it, follow these steps:
yum install http://rpms.famillecollet.com/enterprise/remi-release-6.rpmedit /etc/yum.repos.d/remi.repo and, under thenPlease 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.
yum --disablerepo="*" --enablerepo="remi-php56" install php
mô tả
Improve this answer
Follow
edited Jun 9, 2017 at 6:40
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.
Required, but never shown
By clicking “Post Your Answer”, you agree to our terms of service, privacy policy và cookie policy
Question feed
Subscribe to RSS
Question feed lớn subscribe lớn this RSS feed, copy & paste this URL into your RSS reader.
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.