1. 程式人生 > >CentOS更換國內yum源(aliyun阿里映象)

CentOS更換國內yum源(aliyun阿里映象)

1、下載aliyun的repo

[[email protected] ~]# wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo

--2016-12-30 23:33:00--  http://mirrors.aliyun.com/repo/Centos-7.repo
Resolving mirrors.aliyun.com... 112.124.140.210, 115.28.122.210
Connecting to mirrors.aliyun.com|112.124.140.210|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 2573 (2.5K) [application/octet-stream]
Saving to: “/etc/yum.repos.d/CentOS-Base.repo”

100%[=======================================================================>] 2,573       --.-K/s   in 0s      

2016-12-30 23:33:00 (147 MB/s) - “/etc/yum.repos.d/CentOS-Base.repo” saved [2573/2573]

2、更新yum快取

[
[email protected]
~]# yum clean all Loaded plugins: fastestmirror, refresh-packagekit, security Cleaning repos: base extras updates Cleaning up Everything Cleaning up list of fastest mirrors [[email protected] ~]# yum makecache Loaded plugins: fastestmirror, refresh-packagekit, security Determining fastest mirrors * base: mirrors.aliyun.com * extras: mirrors.aliyun.com * updates: mirrors.aliyun.com base | 3.7 kB 00:00 base/group_gz | 226 kB 00:00 base/filelists_db | 6.4 MB 00:06 base/primary_db | 4.7 MB 00:04 base/other_db | 2.8 MB 00:02 extras | 3.4 kB 00:00 extras/filelists_db | 38 kB 00:00 extras/prestodelta | 1.3 kB 00:00 extras/primary_db | 37 kB 00:00 extras/other_db | 51 kB 00:00 updates | 3.4 kB 00:00 updates/filelists_db | 2.5 MB 00:02 updates/prestodelta | 279 kB 00:00 updates/primary_db | 3.7 MB 00:03 updates/other_db | 49 MB 00:49 Metadata Cache Created 3、測試安裝 [
[email protected]
~]# yum install -y git Loaded plugins: fastestmirror, refresh-packagekit, security Setting up Install Process Loading mirror speeds from cached hostfile * base: mirrors.aliyun.com * extras: mirrors.aliyun.com * updates: mirrors.aliyun.com base | 3.7 kB 00:00 extras | 3.4 kB 00:00 updates | 3.4 kB 00:00 Resolving Dependencies --> Running transaction check ---> Package git.x86_64 0:1.7.1-4.el6_7.1 will be installed --> Processing Dependency: perl-Git = 1.7.1-4.el6_7.1 for package: git-1.7.1-4.el6_7.1.x86_64 --> Processing Dependency: perl(Git) for package: git-1.7.1-4.el6_7.1.x86_64 --> Processing Dependency: perl(Error) for package: git-1.7.1-4.el6_7.1.x86_64 --> Running transaction check ---> Package perl-Error.noarch 1:0.17015-4.el6 will be installed ---> Package perl-Git.noarch 0:1.7.1-4.el6_7.1 will be installed --> Finished Dependency Resolution Dependencies Resolved ============================================================================= Package Arch Version Repository Size ============================================================================ Installing: git x86_64 1.7.1-4.el6_7.1 base 4.6 M Installing for dependencies: perl-Error noarch 1:0.17015-4.el6 base 29 k perl-Git noarch 1.7.1-4.el6_7.1 base 28 k Transaction Summary =============================================================================== Install 3 Package(s) Total download size: 4.7 M Installed size: 15 M Downloading Packages: (1/3): git-1.7.1-4.el6_7.1.x86_64.rpm | 4.6 MB 00:04 (2/3): perl-Error-0.17015-4.el6.noarch.rpm | 29 kB 00:00 (3/3): perl-Git-1.7.1-4.el6_7.1.noarch.rpm | 28 kB 00:00 ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Total 1.0 MB/s | 4.7 MB 00:04 Running rpm_check_debug Running Transaction Test Transaction Test Succeeded Running Transaction Installing : 1:perl-Error-0.17015-4.el6.noarch 1/3 Installing : git-1.7.1-4.el6_7.1.x86_64 2/3 Installing : perl-Git-1.7.1-4.el6_7.1.noarch 3/3 Verifying : perl-Git-1.7.1-4.el6_7.1.noarch 1/3 Verifying : 1:perl-Error-0.17015-4.el6.noarch 2/3 Verifying : git-1.7.1-4.el6_7.1.x86_64 3/3 Installed: git.x86_64 0:1.7.1-4.el6_7.1 Dependency Installed: perl-Error.noarch 1:0.17015-4.el6 perl-Git.noarch 0:1.7.1-4.el6_7.1 Complete!

相關推薦

CentOS更換國內yumaliyun阿里映象

1、下載aliyun的repo [[email protected] ~]# wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo --201

centos 更換國內yum

mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base

更換國內yum

yum源1.備份yum源文件# cd /etc/yum.repos.d/# mv CentOS-Base.repo CentOS-Base.repo.bak2.下載對應的yum源文件下載對應版本repo文件, 放入/etc/yum.repos.d/ 目錄下# wget http://mirrors.163.c

python pip 更換國內安裝windows

打開 tar pan ini文件 col window color -h oba 1.點擊此電腦,在最上面的的文件夾窗口輸入 : %APPDATA% 2.按回車跳轉到以下目錄,新建pip文件夾 3.創建pip.ini文件 4.打開文件夾,輸入以下內容,關閉即可(註意:源鏡像

Centos 6.5 製作本地YUM掛載盤方式

1.設定掛載盤 2.建立檔案目錄:mkdir /mnt/cdrom  掛載光碟到此路徑 : mount -t iso9660  -o ro  /dev/cdrom   /mnt/cdrom 為了避免每次重啟後都要手動mount,可以在/

Ubuntu/CentOS更換國內軟體

ubuntu 更換為阿里雲軟體源 ●第一步,為了以防萬一,備份舊的軟體源 sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak 這時,舊的軟體原始檔已經被備份,/etc/apt/sources.list.bak即

更換國內yumyum下載rpm包

五週第二次課(11月14日) 7.6 yum更換國內源 yum install -y epel-release #安裝擴充套件源epel 預設yum源地址,國內有163和搜狐速度比較快

Centos7.4 更換國內yum

1.進入yum源配置資料夾。(配置之前先看看有沒有安裝wget命令呢,沒的話可以先用當前的yum源安裝一下再說。yum -y install wget) cd /etc/yum.repos.d

CentOS7下配置網絡yum附帶下載地址

tro arch all 運行 help soc 1-1 centos6 earch 一、查看外網是否通暢 配置網絡yum源(需要保證外網開通,我這裏是使用網易163提供開源鏡像站) 二、下載repo文件 cd /etc/yum.repos.dwget http:

open suse 42.3常用軟體包括阿里

阿里映象源,直接在終端安裝,首先在終端輸入 su 點選回車,輸入密碼,密碼輸入時為了安全是不顯示的,你輸入以後直接回車就可以了。 zypper addrepo -f http://mirrors.aliyun.com/opensuse/update/leap/42.3/oss  openSUSE-

Redhat7 將本地yum修改為阿里映象,安裝軟體的時候“HTTP Error 404

報錯如下: 解決辦法: 1.將CentOS-Base.repo裡面的$releaseveer替換為7即可,可以用sed命令,如下: sed -i ‘s/$releasever/7/’ CentOS-Base.repo 2.然後清除一下本地快取 yum clea

三、idea怎樣設定Maven倉庫的地址為國內映象比如阿里映象

  第一步:找到idea中maven中的“settings.xml”位置   一般在idea安裝目錄下的“D:\IntelliJ IDEA 2017.2.5\plugins\maven\lib\maven3\conf”(參照左面地址)   第二步:找到“&l

【Linux】CentOS6.8更新yum -->阿里

一、更新yum源 步驟: a.更新/etc/yum.repos.d目錄下CentOS-Base.repo檔案** b. 使用yum makecache更新倉庫的配置資訊。 1、更新/etc/yum.repos.d目錄下的CentOs-Base.re

更換阿里雲的yum備份

完全參考http://mirrors.aliyun.com/help/centos?spm=5176.bbsr150321.0.0.d6ykiD1、備份mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup2、

centos更換yumaliyun

國外的yum源由於眾所周知的GFW原因,有的被牆,有的很慢,阿里雲依靠強大的技術優勢建立了國內的開源映象。阿里雲Linux安裝映象源地址:http://mirrors.aliyun.com/ 第一步:備份你的原映象檔案,以免出錯後可以恢復。 備份(如有配置其他epel源) 1

國內yum安裝配置阿里雲,163,epel

阿里雲映象源 1、備份 mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup 2、下載新的CentOS-Base.repo 到/etc/yum.r

Linux centosVMware yum更換國內倉庫yum下載rpm包、碼包安裝

httpd-2.2 nload b- med 4.2 ces oca vmware 錯誤 一、yum更換國內倉庫源 cd /etc/yum.repos.d/ rm -f dvd.repo wget http://mirrors.163.com/.help/CentOS7-B

Centos 7 配置國內yum和epel指南

1.首先進入/etc/yum.repos.d/目錄下,新建一個repo_bak目錄,用於儲存系統中原來的repo檔案 [[email protected] ~]# cd /etc/yum.repos.d/ [[email protected] yum.repos.d]# mkdi

雙系統Redhat 7.5更新yumcentos+gcc安裝

Redhat 7.5更新yum元 redhat 7.5 更新centos yum源 安裝步驟(必須有網) 1. **檢視系統自帶的yum源並刪除** 2. **去網路源下載rpm包** 3.安裝下載的yum源(找到

阿里centos 6的 yum配置

#首先備份原來的cent os官方yum源 cp /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.bak #獲取阿里的yum源覆蓋本地官方yum源 wget -O /etc/yum.repos.d/Cent