[CentOS]v7コマンド
メモ
ネットワークデバイス命名規則
旧Ver : Ver 7
chkconfig --list: systemctl list-unit-files -t service
chkconfig sshd on: systemctl enable sshd.service
chkconfig sshd off: systemctl disable sshd.service
service vsftpd start: systemctl start vsftpd.service
デバイス確認
nmcli d
ホスト名設定
hostnamectl set-hostname hoge.server
接続確認
ip addr show
ネットワーク再起動
systemctl restart NetworkManager
systemctl restart network
nmcli connection down eth0
ファイアウォール自動起動設定確認
systemctl is-enabled firewalld
systemctl is-enabled iptables
firewalld停止
systemctl stop firewalld
SELnuxの無効化
getenforce
setenforce 0
vi /etc/sysconfig/selinux --> SELINUX=disabled
ネットワークデバイス命名規則
eno1, eno2 : オンボード・デバイスに対応するインデックス番号
ens1, ens2 : PCIeホットプラグスロットインデックス番号
enp2s1, enp2s2 : ハードウェアコネクタの物理位置
enx78xxxx : インターフェースのMACアドレス
eth0, eth1 : 従来のカーネルネイティブの命名
旧Ver : Ver 7
chkconfig --list: systemctl list-unit-files -t service
chkconfig sshd on: systemctl enable sshd.service
chkconfig sshd off: systemctl disable sshd.service
service vsftpd start: systemctl start vsftpd.service
デバイス確認
nmcli d
ホスト名設定
hostnamectl set-hostname hoge.server
接続確認
ip addr show
ネットワーク再起動
systemctl restart NetworkManager
systemctl restart network
nmcli connection down eth0
ファイアウォール自動起動設定確認
systemctl is-enabled firewalld
systemctl is-enabled iptables
firewalld停止
systemctl stop firewalld
SELnuxの無効化
getenforce
setenforce 0
vi /etc/sysconfig/selinux --> SELINUX=disabled
スポンサーサイト