48
45

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.

CentOS7をインストール後、NetworkManager(nmtui)で固定IPをふる方法

Last updated at Posted at 2014-10-21

固定IPの設定は、/etc/sysconfig/network-scripts/以下のifcfg-***のファイルを設定するのが一般的と思いますが、CentOS7では非推奨らしいので、NetworkManager付属の「nmtui」で固定IPを付与します。

といっても、やり方は非常に簡単です。

手順
(アドレスの確認(インストール直後はDHCPと思います))
#ip addr show
(固定IPの設定)
#nmtui
(GUIが起動します)
「Edit a connection」選択
「eth1」(例)選択
「IPv4 CONFIGURATION」
 →Manual
「Addresses」
 →192.168.1.1/24
「GATEWAY」
 →192.168.1.1
「DNS servers」
 →192.168.1.101
「OK」選択
「Quit」選択
(ネットワーク再起動)
#systemctl restart network.service
(アドレスの確認)
#ip addr show
48
45
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
48
45

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?