Tips/Linux

CentOS7になったとたんにコマンドやら設定やらデータベースやらの作法が変わりまくってパニックになった人用まとめ

インストール後によく引っかかるところ

サービス

  • サービスの一覧
    • systemctl list-unit-files --type=service
  • サービスの起動・停止・確認
    • systemctl start sshd
    • systemctl stop sshd
    • systemctl restart sshd
    • systemctl status sshd
  • サービスの自動起動設定・自動起動停止
    • systemctl enable sshd
    • systemctl disable sshd

NTPクライアント

  • ntpdではなくchronyd
    • systemctl status chronyd
  • 時刻問い合わせ先
    • vi /etc/chrony.conf
      server NTP1.JamFunk.jp iburst
      server NTP2.JamFunk.jp iburst
      
      #bindcmdaddress ::1 #IPv6をlistenしない

ネットワーク

  • ifconfigではなくip
    • ip addr show
      • 従来のifconfig
      • もしくはyum install net-toolsでifconfigをインストール
  • デバイス名はeth*ではなく、デバイスの種類に応じた命名に