SSH Rootログインを制限
# vi /etc/ssh/sshd_config
PermitRootLogin no に変更
# systemctl enable sshd
# systemctl start sshd
# systemctl restart sshd
ログイン設定
確認
# systemctl get-default
multi-user.target
グラフィカルログインをやめる
# systemctl set-default multi-user.target
# systemctl get-default
multi-user.target
開発用ライブラリ
# dnf install git wget gcc gcc-c++ bzip2 openssl-devel libffi-devel readline-devel zlib-devel gdbm-devel ncurses-devel
PHP
# dnf install php php-mbstring php-xml php-xmlrpc php-gd php-pdo php-mysqlnd php-json
Apache
インストール
# dnf -y install httpd httpd-tools httpd-devel httpd-manual
# which httpd
# systemctl start httpd
確認
# systemctl status httpd
# httpd -V | head -n 1
Server version: Apache/2.4.37 (centos)
FireWall 設定
# firewall-cmd --add-service=http --permanent
# firewall-cmd --reload
DNS設定
必要な場合のみ
# nmcli c mod ens160 ipv4.dns 8.8.8.8,8.8.4.4
ens160 はネットワークの設定名
# vi /etc/resolv.conf
nameserver 8.8.8.8
node.js
# curl -sL https://rpm.nodesource.com/setup_12.x | bash -
# dnf install -y nodejs
# curl -sL https://dl.yarnpkg.com/rpm/yarn.repo | sudo tee /etc/yum.repos.d/yarn.repo
# dnf install -y yarn