CentOS7のインストール後の初期設定手順のメモです
参考にさせていただいたかた感謝ですm(__)m
https://centossrv.com/centos7-init.shtml
rootになれるユーザーを管理者のみにします |
# usermod -G wheel centos # vi /etc/pam.d/su |
#auth required pam_wheel.so use_uid
↑のコメントアウトを削除
パッケージ管理システム設定 |
# yum -y update # yum -y install yum-cron # vi /etc/yum/yum-cron.conf |
applied. apply_updates = no
↑yesにする
# systemctl start yum-cron
# systemctl enable yum-cron
# yum -y groupinstall base “Development tools”
SELinuxの無効化 |
# getenforce Enforcing ↑って、出るとSELinuxは有効 |
# setenforce 0
# getenforce
Permissive
↑って、出るとSELinuxは無効
# vi /etc/sysconfig/selinux
SELINUX=enforcing
↑disabledにする
EPELのリポジトリのインストール
# yum install epel-release
/etc/yum.repos.d/epel.repo
enabled = 1
↑0にすることで、明示的に使用されるよう
SSHのセキュリティ対策
# vi /etc/ssh/sshd_config
Port 22
↑空いている違うポートに変更する
PermitRootLogin yes
↑noにする