CentOS7の基本的な操作
CentOS7 から変更されたところで困りそうなところなど。
サービス
systemdとやらに変更されたので、そっちで起動する。
# 起動など systemctl restart httpd # 自動起動の設定 systemctl enable httpd # 自動起動の解除 systemctl disable httpd # 稼働しているサービス一覧 systemctl list-units --type=service # 定義されているサービス一覧 systemctl list-unit-files --type=service
ネットワーク関係
自身のIPアドレスを調べる
ifconfigは使えなくなっている。
# 自身のIPアドレス
ip addr show
firewall止める
systemctl stop firewalld
systemctl disable firewalld
設定
GUIっぽく設定できるツールがあるのでそれが楽。
# 設定する nmtui # ネットワークを再起動 systemctl restart network
Apache
設定ファイルの文法チェック
apachectl configtest