LoginSignup
1
1

More than 5 years have passed since last update.

CentOSにProxy経由でslコマンドを入れる(EPELパッケージ導入)

Last updated at Posted at 2017-06-28

EPELのパッケージをProxy経由で取得する

CentOSにslを入れたい。

#yum install sl

読み込んだプラグイン:fastestmirror
Loading mirror speeds from cached hostfile
 * base: download.nus.edu.sg
 * extras: centos.usonyx.net
 * updates: centos.usonyx.net
何もしません

CentOSの素のレポジトリにslが入っていない。
EPELをレポジトリに追加すればslが取得できるはずである。

#yum install epel-release
インストール:
  epel-release.noarch 0:7-9
完了しました!

レポジトリを追加したのでslをインストールする。

#yum install sl
・・・
sl-5.02-1.el7.x86_64.rpm       FAILED
http://mirror01.idc.hinet.net/EPEL/7/x86_64/s/sl-5.02-1.el7.x86_64.rpm: [Errno 14] HTTP Error 407 - Proxy Authentication Required
他のミラーを試します。
sl-5.02-1.el7.x86_64.rpm       FAILED
https://epel.mirror.angkasa.id/pub/epel/7/x86_64/s/sl-5.02-1.el7.x86_64.rpm: [Errno 14] curl#22 - "HTTP returned error"
他のミラーを試します。
sl-5.02-1.el7.x86_64.rpm       FAILED
https://mirror.pregi.net/epel/7/x86_64/s/sl-5.02-1.el7.x86_64.rpm: [Errno 14] curl#22 - "HTTP returned error"
他のミラーを試します。

Error downloading packages:
  sl-5.02-1.el7.x86_64: [Errno 256] No more mirrors to try.
・・・・

プロキシに阻まれslが取得できない。

/etc/profileの末尾をみる

http_proxy=http://username:password@proxy:port

ちゃんと書いてある。
尚、usernameには@が含まれているが%40にエンコードされている。

curl www.yahoo.co.jp

yahooが返ってくる。

/etc/yum.repos.d/epel.repoの
[epel] セクション末尾に
proxy=http://username:password@proxy:port
を追加する

#yum install sl
インストール  1 パッケージ

総ダウンロード容量: 14 k
インストール容量: 17 k
Is this ok [y/d/N]: y
Downloading packages:
Delta RPMs disabled because /usr/bin/applydeltarpm not installed.
sl-5.02-1.el7.x86_64.rpm                                   |  14 kB   00:01
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  インストール中          : sl-5.02-1.el7.x86_64                            1/1
  検証中                  : sl-5.02-1.el7.x86_64                            1/1

インストール:
  sl.x86_64 0:5.02-1.el7

完了しました!

インストールできた。

# sl
                                                  (  ) (@@) ( )  (@)  ()    @@
                                             (@@@)
                                         (    )
                                      (@@@@)

                                    (   )
                                  ====        ________                __________
                              _D _|  |_______/        \__I_I_____===__|_________
                               |(_)---  |   H\________/ |   |        =|___ ___|
                               /     |  |   H  |  |     |   |         ||_| |_||
                              |      |  |   H  |__--------------------| [___] |
                              | ________|___H__/__|_____/[][]~\_______|       |
                              |/ |   |-----------I_____I [][] []  D   |=======|_
                            __/ =| o |=-~O=====O=====O=====O\ ____Y___________|_
                             |/-=|___|=    ||    ||    ||    |_____/~\___/
                              \_/      \__/  \__/  \__/  \__/      \_/

参考:
http://www.sysarchitects.com/using-proxy-access-epel-internal-network

1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1