0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

CentOS8 インストール後の設定メモ

Last updated at Posted at 2020-03-14

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
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?