CentOS 6.5でのVMwareゲストによるYumアップデートの問題

CentOS 6.5でのVMwareゲストによるYumアップデートの問題

情報:私はWindows 7 Pro(64ビット)とVMware Workstationバージョン10.0.1を使用しています。初めてCentOS(64bit)6.5 Minimalバージョンを使用しています。私はプロキシサーバーを使用できる職場ネットワークでこれを実行しています。

背景:私はこのチュートリアルに従いました(http://1stopit.blogspot.com/2013/11/creating-centos-64-minimal-vm-with.html)

チュートリアルのアドバイスに従って、NAT(デフォルト)の代わりにブリッジネットワーキングを使用するように仮想マシンを構成しました。

最初に実行しようとすると、yum update次のようなPYCURL ERROR 6が表示されました。

Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
could not retreive mirrorlist http://mirrorlist.centos.org/?release=6&arch=x86_64&repo=os error was 
14: PYCURL ERROR 6 - "Couldn't resolve host 'mirrorlist.centos.org'"
Error: Cannot find a valid baseurl for repo: base

その後、実行を試み、ping mirrorlist.centos.org結果は次のようになります。ping:unknown host mirrorlist.centos.org

ifdown eth0その後、次のことを試み、 ifup eth0結果は次のようになります。Determining IP information for eth0... failed.

私のファイルの現在の内容は次のとおりです/etc/sysconfig/network-scripts/ifcfg-eth0

DEVICE=eth0
HWADDR=xx:xx:xx:xx:xx:xx
TYPE=Ethernet
UUID=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
ONBOOT=yes
NM_CONTROLLED=no
BOOTPROTO=dhcp

(私のHWADDRとUUIDを表示する必要があるかどうかわからないので、匿名で処理します。)

私の仕事で(おそらくプロキシサーバーを使って)これを実行しようとしているので、ここで提案を試してみると思いました。https://unix.stackexchange.com/a/93428/60724その後、編集して/etc/yum.conf追加しましたproxy=http://xxx.xxx.xx.xx:8080。これはyum.confの完全なファイルです。

[main]
cachedir=/var/cache/yum/$basearch/$releasever
keepcache=0
debuglevel=2
logfile=/var/log/yum.log
exactarch=1
obsoletes=1
gpgcheck=1
plugins=1
installonly_limit=5
bugtracker_url=http://bugs.centos.org/set_project.php?     project_id=16&ref=http://bugs.centos.org/bug_report_page.php?category=yum
distroverpkg=centos-release
proxy=http://xxx.xxx.xx.xx:8080

#comments
#metadata_expire=90

その後、実行しようとすると、yum updatePYCURLエラー6の代わりにPYCURLエラー5が発生し始めます。下記をご覧ください。

running yum update results in:
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
4&repo=os error was
14: PYCURL ERROR 5 - "Couldn't resolve proxy 'xxx.xxx.xx.xx'"
Error: Cannot find a valid baseurl for repo:base

ベストアンサー1

これはCentos / RHEL 6.x最小インストールのバグです。何らかの理由ですべてのインストールでネットワーク管理者を使用したいので、インストール中にネットワーキングは有効になりません。 /etc/sysconfig/network-scripts/ifcfg-eth0 ファイルの ONBOOT="no" 行を ONBOOT="yes" (または eth 接続番号が何であれ) に変更します。

ただし、configが使用されなくなった場合は、代わりに「ip a」および/または「ip r」を使用してください。

おすすめ記事