Locked History Actions

Diff for "Centos8-setup"

Differences between revisions 49 and 51 (spanning 2 versions)
Revision 49 as of 2019-09-29 07:49:20
Size: 4997
Comment:
Revision 51 as of 2019-09-30 06:13:53
Size: 5119
Comment:
Deletions are marked like this. Additions are marked like this.
Line 23: Line 23:
3.CentOS 8での主な変更点は、アップストリームのリリースノートの [[https://access.redhat.com/documentation/ja-jp/red_hat_enterprise_linux/8/html/8.0_release_notes/overview|第1章 概要]] をご覧ください。 また[[https://hackers-high.com/linux/rhel8-new-features/|ここ]]にも記述があります。 3.CentOS 8での主な変更点は、アップストリームの[[https://access.redhat.com/documentation/ja-jp/red_hat_enterprise_linux/8/html-single/8.0_release_notes/index|リリースノート]]や、その [[https://access.redhat.com/documentation/ja-jp/red_hat_enterprise_linux/8/html/8.0_release_notes/overview|第1章 概要]] をご覧ください。 また[[https://hackers-high.com/linux/rhel8-new-features/|ここ]]にも記述があります。

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

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

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

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

3.CentOS 8での主な変更点は、アップストリームのリリースノートや、その 第1章 概要 をご覧ください。 またここにも記述があります。

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

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

/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 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 を再起動。sshは公開鍵認証のみ接続できるようになります。

6. (参考)httpd周りのソフト環境

RHEL5(CentOS5)  httpd-2.2.3   php-5.1.6   perl-5.8   python-2.4.3      mysql-5.0.95   
RHEL6(CentOS6)  httpd-2.2.15  php-5.3.3   perl-5.10  python-2.6.6      mysql-5.1.73     
RHEL7(CentOS7)  httpd-2.4.6   php-5.4.16  perl-5.16  python-2.7.5      mariadb-5.5.64 
RHEL8(CentOS8)  httpd-2.4.37  php-7.2.11  Perl-5.26  python-3.6 (2.7)  mariadb-10.3.11   

7. Chronydの設定

 /etc/chrony.conf

を設定。以下設定例1(下から3台を選んで設定)(外部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