Locked History Actions

Diff for "Centos8-setup"

Differences between revisions 1 and 34 (spanning 33 versions)
Revision 1 as of 2019-09-27 01:28:15
Size: 2738
Comment:
Revision 34 as of 2019-09-27 08:21:15
Size: 4283
Comment:
Deletions are marked like this. Additions are marked like this.
Line 14: Line 14:
= SL7 (Centos7) OS インストール初期設定 = = Centos8インストールヒント =
Line 16: Line 16:
1. EPEL repository の追加 1. CentOS 8 には CentOS 8 と CentOS 8-stream の2種があるが、通常の安定したサーバ向けの用途には CentOS 8 (CentOS 8.0.1905)の方を使用する。
[[https://wiki.centos.org/Manuals/ReleaseNotes/CentOSStream |CentOS Stream]] は 開発者向けの rolling-release Linux distro である。CentOS 8のインストールには以下から dvd iso をダウンロードする。

[[http://ftp.riken.jp/Linux/centos/8/isos/x86_64/ | http://ftp.riken.jp/Linux/centos/8/isos/x86_64/]]

2. サーバが USB-boot に対応している場合(最近のサーバの場合)インストール用iso イメージは DVD-R に焼かずに USBメモリ上に Bootable USB を作成した方が、はるかに高速にインストールできる。
(参考)[[https://qiita.com/fiftystorm36/items/27368f855141b311d014 | USB メモリを利用して PC に Linux (CentOS) をインストール]]





= Centos8インストール後の初期設定 =





1. yum (dnf-3) レポジトリーのソースを変更(ミラーサーバを設定)

{{{
/etc/yum.repos.d/
}}}
配下の3つのファイル(CentOS-AppStream.repo, CentOS-Base.repo, CentOS-Extras.repo)の最初の方の baseurlをコメントをはずしてサーバを指定
{{{
CentOS-AppStream.repo
baseurl=http://ftp.riken.jp/Linux/centos/$releasever/AppStream/$basearch/os/

CentOS-Base.repo
baseurl=http://ftp.riken.jp/Linux/centos/$releasever/BaseOS/$basearch/os/

CentOS-Extras.repo
baseurl=http://ftp.riken.jp/Linux/centos/$releasever/extras/$basearch/os/
}}}
と変更、yum update (dnf-3 update)を実施(初期update)


2. EPEL repository の追加
Line 21: Line 58:
2. Yum レポジトリーのソースを変更(ミラーサーバを設定)
{{{
/etc/yum.repos.d/
}}}
配下のファイル、最初のentry (URL)を
{{{
http://ftp.riken.jp/Linux/...
}}}
に変更、yum update を実施(初期update)
Line 31: Line 59:
3. kernelのパケットフィルタを firewalld から iptables に変更 3. 旧来のiptablesを使いたい場合、kernelのパケットフィルタを firewalld から iptables に変更 
Line 74: Line 102:
server eric.nc.u-tokyo.ac.jp iburst
server zao.net.tohoku.ac.jp  iburst
server clock.nc.fukuoka-u.ac.jp iburst
server ntp01.sinet.ad.jp iburst
server ats1.e-timing.ne.jp iburst
server time.google.com iburst
server ntp
.jst.mfeed.ad.jp iburst
Line 85: Line 114:
server indico2.riken.jp iburst
Line 93: Line 123:
7. ganglia-gmond のインストール 7. ganglia-gmond のインストール (2019/9/27 epelにまだ ganglia-gmond はありません!)

Centos8インストール前のヒント

1. CentOS 8 には CentOS 8 と CentOS 8-stream の2種があるが、通常の安定したサーバ向けの用途には CentOS 8 (CentOS 8.0.1905)の方を使用する。 CentOS Stream は 開発者向けの rolling-release Linux distro である。CentOS 8のインストールには以下から dvd iso をダウンロードする。

http://ftp.riken.jp/Linux/centos/8/isos/x86_64/

2. サーバが USB-boot に対応している場合(最近のサーバの場合)インストール用iso イメージは DVD-R に焼かずに USBメモリ上に Bootable USB を作成した方が、はるかに高速にインストールできる。 (参考)USB メモリを利用して PC に Linux (CentOS) をインストール

Centos8インストール後の初期設定

1. yum (dnf-3) レポジトリーのソースを変更(ミラーサーバを設定)

/etc/yum.repos.d/ 

配下の3つのファイル(CentOS-AppStream.repo, CentOS-Base.repo, CentOS-Extras.repo)の最初の方の baseurlをコメントをはずしてサーバを指定

CentOS-AppStream.repo
baseurl=http://ftp.riken.jp/Linux/centos/$releasever/AppStream/$basearch/os/

CentOS-Base.repo
baseurl=http://ftp.riken.jp/Linux/centos/$releasever/BaseOS/$basearch/os/

CentOS-Extras.repo
baseurl=http://ftp.riken.jp/Linux/centos/$releasever/extras/$basearch/os/

と変更、yum update (dnf-3 update)を実施(初期update)

2. EPEL repository の追加

# yum install epel-release

3. 旧来のiptablesを使いたい場合、kernelのパケットフィルタを firewalld から iptables に変更

# systemctl stop firewalld.service
# systemctl mask firewalld.service
# yum install iptables-services
# systemctl enable iptables.service
# systemctl start iptables.service

4. 必要ならば SELinux を disable する

/etc/selinux/config

中で

#SELINUX=enforcing
SELINUX=disabled

の変更後、reboot

5. SSHを外部に開いている場合は、パスワード認証を禁止

/etc/ssh/sshd_config

中、以下の変更

PasswordAuthentication no

を行い、sshd を再起動

6. Chronydの設定

 /etc/chrony.conf

を設定。以下設定例1(外部stratum1サーバに同期):

server 133.243.238.163 iburst
server 133.243.238.164 iburst
server 133.243.238.243 iburst
server 133.243.238.244 iburst
server ntp01.sinet.ad.jp iburst
server ats1.e-timing.ne.jp iburst
server time.google.com iburst
server ntp.jst.mfeed.ad.jp iburst

以下設定例2(外部stratum1サーバに同期している内部サーバに同期):

server ribf.riken.jp iburst
server ribf00.riken.jp iburst
server ribf01.riken.jp iburst
server ribfsmtp1.riken.jp iburst
server ribfsmtp2.riken.jp iburst
server indico2.riken.jp iburst

chronydサービスを有効化、起動,

以下のコマンドで時刻同期を確認

chronyc sources

7. ganglia-gmond のインストール (2019/9/27 epelにまだ ganglia-gmond はありません!)

# yum install ganglia-gmond

/etc/ganglia/gmond.conf を設定する(隣接ノードからコピー)

必要なport 8649/tcp, 8650/tcp をiptables で開ける(LAN内)

実行設定

# systemctl enable gmond
# systemctl start gmond