18
14

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.

Raspberry PiのIPアドレスをDHCP取得から固定アドレスに変更して、サーバ再起動はしないで設定反映したかった(けど出来なかった話)

Last updated at Posted at 2018-12-14

要約

  • Raspbrry Pi(Raspbian)のIPアドレスを固定のものにしたい
    • DHCPで取得したIPアドレス
      • 192.168.202.103
    • 今回、固定したいIPアドレス
      • 192.168.202.61
  • インターネット上の情報だと、サーバ再起動で設定反映している
    • 本番環境を想定するとサーバ再起動はしたくないので、サーバ再起動はしないでIPアドレスの変更をしたい
    • 結局出来なかったので、サーバ再起動をして設定反映をしました :cry:

Raspbrry Pi に関して

  • 他の記事が多数あるので詳細は割愛します

Raspbianについて

  • RaspbianはRaspberry Pi用に最適化した、DebianのベースのOSです

    • Linuxディストリビューションの一つです
  • 参考URL

今回の筐体および、OS情報

$ cat /etc/debian_version 
9.4
$ cat /etc/os-release     
PRETTY_NAME="Raspbian GNU/Linux 9 (stretch)"
NAME="Raspbian GNU/Linux"
VERSION_ID="9"
VERSION="9 (stretch)"
ID=raspbian
ID_LIKE=debian
HOME_URL="http://www.raspbian.org/"
SUPPORT_URL="http://www.raspbian.org/RaspbianForums"
BUG_REPORT_URL="http://www.raspbian.org/RaspbianBugs"

実際に調査・実行していきます

  • 既存のIPアドレスや、インターフェースを確認します
    • 有線用のインターフェースの他に、無線LAN用のインターフェースがあるのが分かります
$ ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    link/ether b8:27:eb:ae:13:aa brd ff:ff:ff:ff:ff:ff
    inet 192.168.202.103/24 brd 192.168.202.255 scope global eth0
       valid_lft forever preferred_lft forever
    inet6 fe80::f38f:644a:db9e:9327/64 scope link 
       valid_lft forever preferred_lft forever
3: wlan0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
    link/ether b8:27:eb:fb:46:ff brd ff:ff:ff:ff:ff:ff

IPアドレスを固定するために設定を変更していきます

  • 変更するファイル

    • /etc/dhcpd.conf
  • 変更前の設定ファイルの確認

    • コメントアウトは省略します
$ cat /etc/dhcpcd.conf | grep -v ^#
hostname
clientid
persistent
option rapid_commit
option domain_name_servers, domain_name, domain_search, host_name
option classless_static_routes
option ntp_servers
option interface_mtu
require dhcp_server_identifier
slaac private
  • バックアップファイルの作成をします
$ sudo cp -af /etc/dhcpcd.conf{,.org}
  • 該当のファイルを変更し、内容を確認します
$ vim /etc/dhcpcd.conf
$ cat /etc/dhcpcd.conf | grep -v ^#
hostname
clientid
persistent
option rapid_commit
option domain_name_servers, domain_name, domain_search, host_name
option classless_static_routes
option ntp_servers
option interface_mtu
require dhcp_server_identifier
slaac private
interface eth0
static ip_address=192.168.202.61/24
static routers=192.168.202.1
static domain_name_servers=192.168.202.1 8.8.8.8 8.8.4.4
  • ネットワークの再起動をしてみます
$ sudo systemctl restart networking 
$ sudo systemctl status networking
sudo: unable to resolve host wp-movie: Invalid argument
● networking.service - Raise network interfaces
   Loaded: loaded (/lib/systemd/system/networking.service; enabled; vendor preset: enabled)
   Active: active (exited) since Wed 2018-12-12 22:17:03 JST; 1 day 12h ago
     Docs: man:interfaces(5)
  Process: 232 ExecStart=/sbin/ifup -a --read-environment (code=exited, status=0/SUCCESS)
  Process: 224 ExecStartPre=/bin/sh -c if [ "$CONFIGURE_INTERFACES" != "no" ] && [ -n "$(ifquery --read-environment --list --exclude=lo
 Main PID: 232 (code=exited, status=0/SUCCESS)
   CGroup: /system.slice/networking.service

Dec 12 22:17:03 wp-movie systemd[1]: Starting Raise network interfaces...
Dec 12 22:17:03 wp-movie systemd[1]: Started Raise network interfaces.
  • IPアドレスを確認します
$ ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    link/ether b8:27:eb:ae:13:aa brd ff:ff:ff:ff:ff:ff
    inet 192.168.202.103/24 brd 192.168.202.255 scope global eth0
       valid_lft forever preferred_lft forever
    inet6 fe80::f38f:644a:db9e:9327/64 scope link 
       valid_lft forever preferred_lft forever
3: wlan0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
    link/ether b8:27:eb:fb:46:ff brd ff:ff:ff:ff:ff:ff

---> ネットワークの再起動では、設定反映はされていないようです :no_good:

  • 気を取り直して、DHCPのデーモンを確認します
$ sudo systemctl list-unit-files --type=service | grep dhcp
dhcpcd.service                         enabled  
dhcpcd5.service                        enabled  

---> 2個起動しているので個別に確認してみます

$ sudo systemctl status dhcpcd
● dhcpcd.service - dhcpcd on all interfaces
   Loaded: loaded (/lib/systemd/system/dhcpcd.service; enabled; vendor preset: enabled)
   Active: active (running) since Fri 2018-12-14 11:25:31 JST; 2h 33min ago
  Process: 307 ExecStart=/usr/lib/dhcpcd5/dhcpcd -q -b (code=exited, status=0/SUCCESS)
 Main PID: 342 (dhcpcd)
   CGroup: /system.slice/dhcpcd.service
           ├─342 /sbin/dhcpcd -q -b
           └─377 wpa_supplicant -B -c/etc/wpa_supplicant/wpa_supplicant.conf -iwlan0 -Dnl80211,wext
$ sudo systemctl status dhcpcd5
● dhcpcd.service - dhcpcd on all interfaces
   Loaded: loaded (/lib/systemd/system/dhcpcd.service; enabled; vendor preset: enabled)
   Active: active (running) since Fri 2018-12-14 11:25:31 JST; 2h 34min ago
  Process: 307 ExecStart=/usr/lib/dhcpcd5/dhcpcd -q -b (code=exited, status=0/SUCCESS)
 Main PID: 342 (dhcpcd)
   CGroup: /system.slice/dhcpcd.service
           ├─342 /sbin/dhcpcd -q -b
           └─377 wpa_supplicant -B -c/etc/wpa_supplicant/wpa_supplicant.conf -iwlan0 -Dnl80211,wext

---> 同じプロセスを見ているようです :thinking:
---> 以降は、 dhcpcd5 を見ていきます

  • dhcpcd5を再起動してみます
$ nohup sudo systemctl restart dhcpcd5 && sudo systemctl restart dhcpcd5 &
$ ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    link/ether b8:27:eb:ae:13:aa brd ff:ff:ff:ff:ff:ff
    inet 192.168.202.103/24 brd 192.168.202.255 scope global eth0
       valid_lft forever preferred_lft forever
    inet 192.168.202.61/24 brd 192.168.202.255 scope global secondary eth0
       valid_lft forever preferred_lft forever
    inet6 fe80::f38f:644a:db9e:9327/64 scope link 
       valid_lft forever preferred_lft forever
3: wlan0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
    link/ether b8:27:eb:fb:46:ff brd ff:ff:ff:ff:ff:ff

---> IPアドレスが2個取れるようになりました :thinking: :thinking:
---> 新しく付与された(= 自分で設定した)IPアドレスでSSHログイン出来るか確認しておきます

### ※ 他の筐体からSSHログインをしています
$ ssh pi@192.168.202.61
Warning: Permanently added '192.168.202.61' (ECDSA) to the list of known hosts.
pi@192.168.202.61's password: 
Linux raspberrypi 4.14.71-v7+ #1145 SMP Fri Sep 21 15:38:35 BST 2018 armv7l

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Fri Dec 14 13:45:12 2018 from 192.168.202.115

SSH is enabled and the default password for the 'pi' user has not been changed.
This is a security risk - please login as the 'pi' user and type 'passwd' to set a new password.

pi@raspberrypi:~ $ 

---> 新しいIPアドレスでもSSHログインすることが出来ました

  • 試しにdhcpcd5を止めて、確認を進めていきます
    • ※ 無線LANがDHCPでIPアドレスを取得しているため、最終的には起動状態にします
$ sudo systemctl stop dhcpcd5
$ sudo systemctl status dhcpcd 
● dhcpcd.service - dhcpcd on all interfaces
   Loaded: loaded (/lib/systemd/system/dhcpcd.service; enabled; vendor preset: enabled)
   Active: inactive (dead) since Fri 2018-12-14 14:19:24 JST; 6s ago
  Process: 1314 ExecStop=/sbin/dhcpcd -x (code=exited, status=0/SUCCESS)
  Process: 1269 ExecStart=/usr/lib/dhcpcd5/dhcpcd -q -b (code=exited, status=0/SUCCESS)
 Main PID: 1271 (code=exited, status=0/SUCCESS)
$ sudo systemctl status dhcpcd5
● dhcpcd.service - dhcpcd on all interfaces
   Loaded: loaded (/lib/systemd/system/dhcpcd.service; enabled; vendor preset: enabled)
   Active: inactive (dead) since Fri 2018-12-14 14:13:47 JST; 1s ago
  Process: 1168 ExecStop=/sbin/dhcpcd -x (code=exited, status=0/SUCCESS)
  Process: 307 ExecStart=/usr/lib/dhcpcd5/dhcpcd -q -b (code=exited, status=0/SUCCESS)
 Main PID: 342 (code=exited, status=0/SUCCESS)

---> dhcpcd5は止まっています
---> 一緒にdhcpcdも止まりました :cold_sweat:

  • IPアドレスを確認します
$ ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    link/ether b8:27:eb:ae:13:aa brd ff:ff:ff:ff:ff:ff
    inet 192.168.202.103/24 brd 192.168.202.255 scope global eth0
       valid_lft forever preferred_lft forever
    inet 192.168.202.61/24 brd 192.168.202.255 scope global secondary eth0
       valid_lft forever preferred_lft forever
    inet6 fe80::f38f:644a:db9e:9327/64 scope link 
       valid_lft forever preferred_lft forever
3: wlan0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
    link/ether b8:27:eb:fb:46:ff brd ff:ff:ff:ff:ff:ff

---> 未だにIPアドレスが2個ついています :thinking: :thinking:

  • ifconfig コマンドを利用して、インターフェースの down / up を行ってみます
    • ネットワークが切れるため、 念のために nohup を使用しています
nohup sudo ifconfig eth0 down && sleep 10 && sudo ifconfig eth0 up & 
  • IPアドレスを確認します
$ ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    link/ether b8:27:eb:ae:13:aa brd ff:ff:ff:ff:ff:ff
    inet 192.168.202.103/24 brd 192.168.202.255 scope global eth0
       valid_lft forever preferred_lft forever
    inet 192.168.202.61/24 brd 192.168.202.255 scope global secondary eth0
       valid_lft forever preferred_lft forever
    inet6 fe80::f38f:644a:db9e:9327/64 scope link 
       valid_lft forever preferred_lft forever
3: wlan0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
    link/ether b8:27:eb:fb:46:ff brd ff:ff:ff:ff:ff:ff

---> 未だにIPアドレスが2個ついています :thinking: :thinking:

  • 何か状態を保持しているファイルが無いか調べているうちに、以下のディレクトリを見つけました
$ ls -la /var/lib/dhcpcd5/
total 20
drwxr-xr-x  2 root root 4096 Dec  9 07:17 .
drwxr-xr-x 44 root root 4096 Nov 29  2017 ..
-rw-r--r--  1 root root  548 Dec 14 00:53 dhcpcd-eth0.lease
-rw-r--r--  1 root root  548 Aug  2 12:00 dhcpcd-wlan0-guest.lease
-rw-r--r--  1 root root  548 Mar  2  2018 dhcpcd-wlan0-welcome-guest.lease

---> 怪しいのがありました(ファイルの名前は変更しています)
---> 特に dhcpcd-wlan0-hogehoge は、無線LANで繋いだことがあるWifiのSSID名でした

  • 有線LANのキャッシュらしいファイルを削除してみます
$ sudo rm -fv /var/lib/dhcpcd5/dhcpcd-eth0.lease 
removed '/var/lib/dhcpcd5/dhcpcd-eth0.lease'
$ ls -la /var/lib/dhcpcd5/dhcpcd-eth0.lease 
ls: cannot access '/var/lib/dhcpcd5/dhcpcd-eth0.lease': No such file or directory
  • IPアドレスを確認します
$ ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    link/ether b8:27:eb:ae:13:aa brd ff:ff:ff:ff:ff:ff
    inet 192.168.202.103/24 brd 192.168.202.255 scope global eth0
       valid_lft forever preferred_lft forever
    inet 192.168.202.61/24 brd 192.168.202.255 scope global secondary eth0
       valid_lft forever preferred_lft forever
    inet6 fe80::f38f:644a:db9e:9327/64 scope link 
       valid_lft forever preferred_lft forever
3: wlan0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
    link/ether b8:27:eb:fb:46:ff brd ff:ff:ff:ff:ff:ff

---> 未だにIPアドレスが2個ついています :thinking: :thinking:

  • この状態で、ネットワークの再起動をしてみます
$ sudo systemctl restart networking 
  • IPアドレスを確認します
$ ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    link/ether b8:27:eb:ae:13:aa brd ff:ff:ff:ff:ff:ff
    inet 192.168.202.103/24 brd 192.168.202.255 scope global eth0
       valid_lft forever preferred_lft forever
    inet 192.168.202.61/24 brd 192.168.202.255 scope global secondary eth0
       valid_lft forever preferred_lft forever
    inet6 fe80::f38f:644a:db9e:9327/64 scope link 
       valid_lft forever preferred_lft forever
3: wlan0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
    link/ether b8:27:eb:fb:46:ff brd ff:ff:ff:ff:ff:ff

---> 未だにIPアドレスが2個ついています :thinking: :thinking:

  • ifconfig コマンドを利用して、インターフェースの down / up を行ってみます
    • ネットワークが切れるため、 念のために nohup を使用しています
nohup sudo ifconfig eth0 down && sleep 10 && sudo ifconfig eth0 up & 
  • IPアドレスを確認します
$ ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    link/ether b8:27:eb:ae:13:aa brd ff:ff:ff:ff:ff:ff
    inet 192.168.202.103/24 brd 192.168.202.255 scope global eth0
       valid_lft forever preferred_lft forever
    inet 192.168.202.61/24 brd 192.168.202.255 scope global secondary eth0
       valid_lft forever preferred_lft forever
    inet6 fe80::f38f:644a:db9e:9327/64 scope link 
       valid_lft forever preferred_lft forever
3: wlan0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
    link/ether b8:27:eb:fb:46:ff brd ff:ff:ff:ff:ff:ff

---> 効果は無いようです :cold_sweat:
---> 打つ手が無くなってきたので、諦めてサーバ再起動してみます :cry:
---> dhcpcdの自動起動の設定は無線LANのために残しておきます

サーバ再起動をして、設定反映されるか確認します

  • サーバ再起動コマンド
$ sudo shutdown -r now 
  • 再び、自分が設定したIPアドレスにて、SSHログインをします
### ※ 他の筐体からSSHログインをしています
$ ssh pi@192.168.202.61
Warning: Permanently added '192.168.202.61' (ECDSA) to the list of known hosts.
pi@192.168.202.61's password: 
Linux raspberrypi 4.14.71-v7+ #1145 SMP Fri Sep 21 15:38:35 BST 2018 armv7l

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Fri Dec 14 13:45:12 2018 from 192.168.202.115

SSH is enabled and the default password for the 'pi' user has not been changed.
This is a security risk - please login as the 'pi' user and type 'passwd' to set a new password.

pi@raspberrypi:~ $ 
  • IPアドレスを確認します
$ ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    link/ether b8:27:eb:ae:13:aa brd ff:ff:ff:ff:ff:ff
    inet 192.168.202.61/24 brd 192.168.202.255 scope global eth0
       valid_lft forever preferred_lft forever
    inet6 fe80::f38f:644a:db9e:9327/64 scope link 
       valid_lft forever preferred_lft forever
3: wlan0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
    link/ether b8:27:eb:fb:46:ff brd ff:ff:ff:ff:ff:ff

---> IPアドレスは、自分が設定したもののみとなりました :relaxed:

  • dhcpcdの確認をします
$ sudo systemctl status dhcpcd
● dhcpcd.service - dhcpcd on all interfaces
   Loaded: loaded (/lib/systemd/system/dhcpcd.service; enabled; vendor preset: enabled)
   Active: active (running) since Fri 2018-12-14 14:31:24 JST; 2min 56s ago
  Process: 298 ExecStart=/usr/lib/dhcpcd5/dhcpcd -q -b (code=exited, status=0/SUCCESS)
 Main PID: 336 (dhcpcd)
   CGroup: /system.slice/dhcpcd.service
           ├─336 /sbin/dhcpcd -q -b
           └─426 wpa_supplicant -B -c/etc/wpa_supplicant/wpa_supplicant.conf -iwlan0 -Dnl80211,wext

$ sudo systemctl status dhcpcd5
● dhcpcd.service - dhcpcd on all interfaces
   Loaded: loaded (/lib/systemd/system/dhcpcd.service; enabled; vendor preset: enabled)
   Active: active (running) since Fri 2018-12-14 14:31:24 JST; 3min 15s ago
  Process: 298 ExecStart=/usr/lib/dhcpcd5/dhcpcd -q -b (code=exited, status=0/SUCCESS)
 Main PID: 336 (dhcpcd)
   CGroup: /system.slice/dhcpcd.service
           ├─336 /sbin/dhcpcd -q -b
           └─426 wpa_supplicant -B -c/etc/wpa_supplicant/wpa_supplicant.conf -iwlan0 -Dnl80211,wext

---> 両方共起動しています

  • キャッシュらしきファイルを確認します
pi@raspberrypi:~ $ ls -la /var/lib/dhcpcd5/             
total 16
drwxr-xr-x  2 root root 4096 Dec 14 11:18 .
drwxr-xr-x 44 root root 4096 Nov 29  2017 ..
-rw-r--r--  1 root root  548 Aug  2 12:00 dhcpcd-wlan0-guest.lease
-rw-r--r--  1 root root  548 Mar  2  2018 dhcpcd-wlan0-welcome-guest.lease

---> 有線LANのものは作成されていないようです

結果

  • 最終的にはサーバ再起動にて、設定反映が出来ました
  • 仮に本番環境のサーバだと、簡単にサーバ再起動は出来ないので、しっかりとサーバ再起動の計画を立てましょう :thinking:
    • そもそも本番稼働に入ってからIPアドレスを変更するような自体にならないように事前に対策をしましょう :cold_sweat:
18
14
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
18
14

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?