詳解Centos下YUM安裝PHP的兩種方式
在Centos下安裝PHP時, 先后使用了兩種方式進(jìn)行實現(xiàn), 現(xiàn)整理出來以作記錄。
摘要
一般Centos下安裝軟件我們采用源碼
安裝或者RPM包
安裝的方式,有時候更簡單我們可以采用YUM源
的方式
安裝PHP的時候有個特殊的地方,其有兩個YUM源可供選擇
Webtatic方式安裝升級PHP
安裝webtatic
源
[root@i-bskmtj6q ~]# rpm -Uvh https://mirror.webtatic.com/yum/el6/latest.rpm Retrieving https://mirror.webtatic.com/yum/el6/latest.rpm Preparing... ########################################### [100%] 1:webtatic-release ########################################### [100%] [root@i-bskmtj6q ~]# ls -l /etc/yum.repos.d/webtatic* -rw-r--r-- 1 root root 963 Nov 13 2016 /etc/yum.repos.d/webtatic-archive.repo -rw-r--r-- 1 root root 865 Nov 13 2016 /etc/yum.repos.d/webtatic.repo -rw-r--r-- 1 root root 963 Nov 13 2016 /etc/yum.repos.d/webtatic-testing.repo
安裝或者升級PHP
## install yum --enablerepo=remi install php php-* ## update yum --enablerepo=remi update php php-*
REMI方式安裝升級PHP
REMI源有個特殊
的地方,安裝其前必須先安裝
[root@i-bskmtj6q ~]# rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm Retrieving http://rpms.famillecollet.com/enterprise/remi-release-6.rpm error: Failed dependencies: epel-release = 6 is needed by remi-release-6.9-1.el6.remi.noarch
安裝 REMI源
[root@i-bskmtj6q ~]# rpm -ivh https://dl.fedoraproject.org/pub/epel/epel-release-latest-6.noarch.rpm Retrieving https://dl.fedoraproject.org/pub/epel/epel-release-latest-6.noarch.rpm Preparing... ########################################### [100%] 1:epel-release ########################################### [100%] [root@i-bskmtj6q ~]# rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm Retrieving http://rpms.famillecollet.com/enterprise/remi-release-6.rpm Preparing... ########################################### [100%] 1:remi-release ########################################### [100%] [root@i-bskmtj6q ~]# ls -l /etc/yum.repos.d/remi* -rw-r--r-- 1 root root 457 Jun 30 20:13 /etc/yum.repos.d/remi-php54.repo -rw-r--r-- 1 root root 1316 Jun 30 20:13 /etc/yum.repos.d/remi-php70.repo -rw-r--r-- 1 root root 1316 Jun 30 20:13 /etc/yum.repos.d/remi-php71.repo -rw-r--r-- 1 root root 1316 Jun 30 20:13 /etc/yum.repos.d/remi-php72.repo -rw-r--r-- 1 root root 2609 Jun 30 20:13 /etc/yum.repos.d/remi.repo -rw-r--r-- 1 root root 751 Jun 30 20:13 /etc/yum.repos.d/remi-safe.repo
安裝或者升級PHP
## install yum --enablerepo=webtatic install php php-* ## update yum --enablerepo=webtatic update php php-*
說明
1、EPEL
Extra Packages for Enterprise Linux,也就是為企業(yè)級 Linux提供的擴展軟件源,適用于 RHEL,CentOS,Scientific Linux系統(tǒng)。
2、remi
軟件源對舊的fedora版本提供最新的軟件支持,也可以為Centos及RHEL提供最新的軟件
看官網(wǎng)的圖標(biāo)可能主要和PHP安裝升級相關(guān)(個人猜測)
3、Webtatic
The Webtatic Yum repository is a CentOS/RHEL repository containing updated web-related packages. 主要供應(yīng)最新LAMP等軟件源
參考官網(wǎng)介紹 https://webtatic.com/projects/yum-repository/
以上就是本文的全部內(nèi)容,希望對大家的學(xué)習(xí)有所幫助,也希望大家多多支持腳本之家。
相關(guān)文章
linux中關(guān)于ftp查看不到文件列表的問題詳解
下面小編就為大家?guī)硪黄猯inux中關(guān)于ftp查看不到文件列表的問題詳解。小編覺得挺不錯的,現(xiàn)在就分享給大家,也給大家做個參考。一起跟隨小編過來看看吧2016-11-11Ubuntu18 給terminal改個漂亮的命令行提示符的方法
這篇文章主要介紹了Ubuntu18 給terminal改個漂亮的命令行提示符的方法,本文給大家介紹的非常詳細(xì),具有一定的參考借鑒價值,需要的朋友可以參考下2019-06-06淺談生產(chǎn)者消費者模型(Linux系統(tǒng)下的兩種實現(xiàn)方法)
下面小編就為大家?guī)硪黄獪\談生產(chǎn)者消費者模型(Linux系統(tǒng)下的兩種實現(xiàn)方法)。小編覺得挺不錯的,現(xiàn)在就分享給大家,也給大家做個參考。一起跟隨小編過來看看吧2017-01-01Linux下安裝jdk1.8并配置環(huán)境變量的教程
這篇文章主要介紹了Linux下安裝jdk1.8并配置環(huán)境變量的教程,需要的朋友可以參考下2018-03-03sersync2 完全安裝配置說明(三) 插件基本配置和使用
sersync2 完全安裝配置說明(三) 插件基本配置和使用,需要的朋友可以參考下。2011-11-11