10
9

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

CentOSを入れたらネットにつながらなかった話

10
Last updated at Posted at 2015-11-12

ちゃんとインフラを勉強することになったので、
仮想環境ESXi6.0上にCentOS7を入れてみました。
ネットにはつながっているだろうと思い、さっそくyumでapache入れようとしたらコケました。

pingをgoogle.comに向けて打つと死んでる。
ifconfigでipが振られてない。

ちょっと調べたらデフォルトではネットにはつなげてないらしい。

作業した環境

  • 仮想環境ESXi(固定IPを付与)
  • CentOS7

やったこと

1.イーサネットインタフェースファイル(ifcfg)の確認

cat /etc/sysconfig/network-scripts/ifcfgほにゃらら

設定ファイル
/etc/sysconfig/network-scripts/ifcfgほにゃらら

設定ファイルの詳細(ifcfgファイルの詳細)
https://access.redhat.com/documentation/ja-JP/Red_Hat_Enterprise_Linux/6/html/Deployment_Guide/s1-networkscripts-interfaces.html

2.ONBOOTの値がnoになってたので修正。

「ONBOOT=no」を「ONBOOT=yes」へ

3.ネットワークデーモンの再起動

service netwok restart

最後にifconfigやpingコマンドでローカルIPが振られていることと疎通確認を行って完了。

10
9
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
10
9

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?