linux的初探之更新源

  linux软件安装,大多直接利用yum安装,避免了依赖引起的其他问题,而默认提供的源不一定存在需要的软件版本,因此需要更新源。

  当前个人的centos版本为7

  1安装含php5.6的remi repo(centos 7)

$ rpm -Uvh http://download.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
$ rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-7.rpm

  2查看现在的repo

[root@iZwz9agxh9ddcfm68xu5iqZ ~]# yum repolist all
Loaded plugins: langpacks
repo id                                  repo name                                                                                      status
base/7/x86_64                            CentOS-7 - Base                                                                                enabled:  9,363
base-debuginfo/x86_64                    CentOS-7 - Debuginfo                                                                           disabled
base-source/7                            CentOS-7 - Base Sources                                                                        disabled
centosplus/7/x86_64                      CentOS-7 - Plus                                                                                disabled
centosplus-source/7                      CentOS-7 - Plus Sources                                                                        disabled
contrib/7/x86_64                         CentOS-7 - Contrib                                                                             disabled
extras-source/7                          CentOS-7 - Extras Sources                                                                      disabled
fasttrack/7/x86_64                       CentOS-7 - fasttrack                                                                           disabled
remi                                     Remi's RPM repository for Enterprise Linux 7 - x86_64                                          disabled
remi-php55 Remi's PHP 5.5 RPM repository for Enterprise Linux 7 - x86_64 disabled remi-php55-debuginfo/x86_64 Remi's PHP 5.5 RPM repository for Enterprise Linux 7 - x86_64 - debuginfo disabled remi-php56 Remi's PHP 5.6 RPM repository for Enterprise Linux 7 - x86_64 enabled: 384 remi-php56-debuginfo/x86_64 Remi's PHP 5.6 RPM repository for Enterprise Linux 7 - x86_64 - debuginfo disabled remi-php70 Remi's PHP 7.0 RPM repository for Enterprise Linux 7 - x86_64 disabled remi-php70-debuginfo/x86_64 Remi's PHP 7.0 RPM repository for Enterprise Linux 7 - x86_64 - debuginfo disabled remi-php70-test Remi's PHP 7.0 test RPM repository for Enterprise Linux 7 - x86_64 disabled remi-php70-test-debuginfo/x86_64 Remi's PHP 7.0 test RPM repository for Enterprise Linux 7 - x86_64 - debuginfo disabled ...

  发现了php5.6的remi,而status为disabled,因此需要开启。

  2安装yum-config-manager

$ yum search yum-config-manager
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: ftp.yzu.edu.tw
 * epel: mirror01.idc.hinet.net
 * extras: ftp.yzu.edu.tw
 * remi-safe: mirror.innosol.asia
 * updates: ftp.yzu.edu.tw
=================================== Matched: yum-config-manager ===================================
remi-release.noarch : YUM configuration for remi repository
yum-utils.noarch : Utilities based around the yum package manager
$ yum install yum-utils

  3开启repo

$ yum-config-manager --enable remi
$ yum-config-manager --enable remi-php56

  4此时再搜索yum search php可以发现很多的php的版本,此后再正常安装。

posted @ 2017-04-19 13:32  jeyfang  阅读(304)  评论(0编辑  收藏  举报