技術関連の覚書

案件でやったり自宅で試したことの覚書

CentOS7

CentOS6からの変更点

内容 CentOS6 CentOS7
デフォルトファイルシステム ext4 xfs
ブートローダ GRUB GRUB2
セキュリティ設定 iptables firewall+iptables
サービス起動 service サービス名 start systemctl start ユニット名[.service]
サービス再起動 service サービス名 restart systemctl restart ユニット名[.service]
サービス停止 service サービス名 stop systemctl stop ユニット名[.service]
サービス自動起動設定 chkconfig スクリプト名 on systemctl enable ユニット名
サービス自動起動停止 chkconfig スクリプト名 off systemctl disable ユニット名
サービス状態確認 chkconfig –list systemctl list-util-files
ホスト名変更 hostname ホスト名 hostnamectl set-hostname ホスト名
ネットワーク設定 /etc/sysconfig/network-script/ifcfg-ethXの変更とnetwork restart nmtui(GUI)
nmcli(コマンド)
ネットワーク状態確認 netstat ip n
ネットワークインタフェースの状態 netstat -i ip -s l
ネットワークインタフェースの起動 ifup eth0 nmcli c up eno0
ネットワークインタフェースの停止 ifdown eth0 nmcli c down eno0

プロキシを経由する場合の設定

yum /etc/yum.confにproxyの設定を記述

proxy=http://ホスト:ポート
proxy_username=ユーザ
proxy_password=パスワード

curl

~/.curlrc ファイルを編集する

proxy="http://ホスト:ポート