*Red Hat Enterprise Linux 7 !RHEL7 でのサービス起動制御 *起動時の接続が自動になっている「優先接続1」の設定を確認 [root@rhel7 nonaka]# nmcli connection show '有線接続 1' | grep connection.autoconnect connection.autoconnect: yes connection.autoconnect-priority: 0 connection.autoconnect-slaves: -1 (default) *起動時の接続が手動になっていた enp0s3 の接続を自動接続化 [root@rhel7 nonaka]# nmcli connection show enp0s3 | grep connection.autoconnect connection.autoconnect: no connection.autoconnect-priority: 0 connection.autoconnect-slaves: -1 (default) [root@rhel7 nonaka]# nmcli connection modify enp0s3 connection.autoconnect yes [root@rhel7 nonaka]# nmcli connection show enp0s3 | grep connection.autoconnect connection.autoconnect: yes connection.autoconnect-priority: 0 connection.autoconnect-slaves: -1 (default) *起動依存関係の表示 # systemctl list-dependencies # systemctl list-unit-files # systemctl list-dependencies runlevel3.target *コンソール(CUI)への切り替え # systemctl isolate multi-user.target *GUIへの切り替え # systemctl isolate graphical.target *起動時の GUI/CUI の確認 [root@rhel7 nonaka]# systemctl get-default graphical.target *起動時をCUIに変更 [root@rhel7 nonaka]# systemctl set-default multi-user.target Removed symlink /etc/systemd/system/default.target. Created symlink from /etc/systemd/system/default.target to /usr/lib/systemd/system/multi-user.target. *起動時の GUI/CUI の確認 [root@rhel7 nonaka]# systemctl get-default multi-user.target *起動スクリプトの表示 /usr/bin/systemctl list-units --type service !ネットワークデバイスの一覧表示 root@ubuntu02:/var/log# tcpdump --list-interfaces 1.enp0s3 [Up, Running] 2.any (Pseudo-device that captures on all interfaces) [Up, Running] 3.lo [Up, Running, Loopback] 4.nflog (Linux netfilter log (NFLOG) interface) 5.nfqueue (Linux netfilter queue (NFQUEUE) interface) 6.usbmon1 (USB bus number 1) *tcpdump のインターフェース一覧の機能を利用 *eth0 だったのが enp0s3 となっている。 !!!参考サイト !RHEL6→RHEL7で変更された主要コマンドまとめ / よろずブログ / SIOS *https://oss.sios.com/yorozu-blog/rhel6-rhel7change *サービス一覧 /usr/bin/systemctl list-units --type service *サービス自動起動の確認 /usr/bin/systemctl is-enabled unit_name *サービス自動起動の有効化 /usr/bin/systemctl enable unit_name *サービス自動起動の無効化 /usr/bin/systemctl disable unit_name !RHEL 7 における systemd の概要 / RH KB *https://access.redhat.com/ja/node/1379593 ""systemctl は、RHEL 7 (systemd) システムでサービスを管理する最も重要なコマンドです。 *一覧 systemctl systemctl --type service systemctl --type target *依存関係の調査 systemctl list-dependencies nfs-server.service !RHEL7/CentOS7でipコマンドをマスター / めもめも *http://enakai00.hatenablog.com/entry/20140712/1405139841 # ip route add default via 192.168.122.1 # ip route del default via 192.168.122.1 *IF の接続 # nmcli c up enp0s3 !Red Hat Enterprise Linux7 / ネットワークガイド / 第8章 ネットワークデバイス命名における一貫性 *https://access.redhat.com/documentation/ja-jp/red_hat_enterprise_linux/7/html/networking_guide/ch-consistent_network_device_naming ""従来の Linux のネットワークインターフェースには eth[0123…] などの数値が付けられました。しかし、これらの名前は必ずしもシャーシー上の実際のラベルと一致していません。 ""デフォルトでは、ファームウェア、トポロジー、および場所情報に基づいて固定名が割り当てられます。 ""これには、名前が完全に自動的かつ予想可能であり、ハードウェアが追加もしくは削除されても (再列挙がなされず) 固定のままであり、またハードウェアが壊れた場合にシームレスに交代可能であるという利点があります。 ""マイナス面は、従来使用されていた eth0 や wlan0 といった名前と比べて読みにくい場合があるという点です。 ""たとえば、enp5s0 などの場合です。 ""デフォルトでは、systemd が以下のポリシーを使用してサポート対象の命名スキームを適用し、インターフェースに命名します。 +スキーム 1: ファームウェアや BIOS がオンボードデバイスについて提供する索引番号を組み入れた名前 (例: eno1) は、ファームウェアや BIOS からの情報が適用可能で利用可能な場合は、これが適用されます。そうでない場合は、スキーム 2 にフォールバックします。 +スキーム 2: ファームウェアや BIOS が提供している PCI Express ホットプラグスロットの索引番号を組み込んだ名前 (例: ens1) は、ファームウェアや BIOS からの情報が適用可能で利用可能な場合は、これが適用されます。そうでない場合は、スキーム 3 にフォールバックします。 +スキーム 3: ハードウェアのコネクターの物理的場所を組み込んだ名前 (例: enp2s0) は、これが適用可能な場合は、適用されます。そうでない場合は、スキーム 5 にフォールバックします。 +スキーム 4: インターフェースの MAC アドレスを組み込んだ名前 (例: enx78e7d1ea46da) はデフォルトでは使用されませんが、ユーザーが選択すれば適用可能です。 +スキーム 5: 従来型の予測不可能なカーネル命名スキーム (例: eth0) は、他のすべての方法が失敗した場合に使用されます。