# Please edit system and help pages ONLY in the master wiki! ## For more information, please see MoinMoin:MoinDev/Translation. ## IMPORTANT NOTE: ## When you use this page as a template for creating your project page: ## * please remove all lines starting with two hashes (##) ## * except the acl line, please keep that, but remove one hash, so it reads #acl ... ## * fix the acl line so it has the correct page instead of the sample Project/...Group ##acl Project/AdminGroup:admin,read,write,delete,revert Project/ReadWriteGroup:read,write Project/ReadGroup:read ##master-page:Unknown-Page ##master-date:Unknown-Date #format wiki #language en = Centos8インストール前のヒント = 1. CentOS 8 には [[https://wiki.centos.org/ja/Manuals/ReleaseNotes/CentOS8.1905|CentOS-8 (1905)]] と [[https://wiki.centos.org/Manuals/ReleaseNotes/CentOSStream |CentOS Stream 8]] の2種があります。CentOS Stream は 開発者向けの rolling-release Linux distributions です。 2.ご注意 CentOS 8は2021年末をもって終了すると2020年12月に突如アナウンスされ、すでに終了しました。 [[https://www.centos.org/]] [[https://blog.centos.org/2020/12/future-is-centos-stream/]] CentOS 8利用者は、2020年12月末までに 1)CentOS Streamに移行する, 2)Alma Linux に移行する、 3)Rocky linux に移行する、 4)RHELに移行する などの移行処置が必要になると思われます。 この文章でこれ以降の CentOS 8は、CentOS Stream 8, Alma Linux 8, Rocky Linux 8 と読み替えてください。 2. CentOS 8をインストールするサーバが USB-boot に対応している場合(最近のサーバの場合)インストール用iso イメージは DVD-R DL に焼かずに [[https://rufus.ie/|rufus]] あるいは[[https://unetbootin.github.io/|UNetbootin]] を使用して USBメモリ上に Bootable USB を作成した方が、高速にインストールできます。 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-single/considerations_in_adopting_rhel_8/index|導入における検討事項]]をご覧ください。 = Centos8インストール後の初期設定とTips = 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 }}} ## # cd /etc/pki/rpm-gpg/ ## # wget https://dl.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-8 3. 旧来のiptablesを使いたい場合、kernelのパケットフィルタを firewalld から iptables に変更できます。 {{{ # systemctl stop firewalld.service # systemctl mask firewalld.service # yum install iptables-services iptables # 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) glibc-2.5-123 httpd-2.2.3 php-5.1.6 perl-5.8 python-2.4.3 ruby-1.8.5 mysql-5.0.95 RHEL6(CentOS6) glibc-2.12-1 httpd-2.2.15 php-5.3.3 perl-5.10 python-2.6.6 ruby-1.8.7 mysql-5.1.73 RHEL7(CentOS7) glibc-2.17-292 httpd-2.4.6 php-5.4.16 perl-5.16 python-2.7.5 ruby-2.0.0 mariadb-5.5.64 RHEL8(CentOS8) glibc-2.28-42 httpd-2.4.37 php-7.2.11 Perl-5.26 python-3.6 (2.7) ruby-2.5.3 mariadb-10.3.11 }}} 7. Perlの変更に関して CentOS 8 では Perl が Perl-5.26 にアップグレードされています。これにより従来 CentOS 5,6,7 で動作していたPerlプログラムがそのままではエラーとなり修正が必要な場合があります。詳細についてはアップストリームのドキュメント[[https://access.redhat.com/documentation/ja-jp/red_hat_enterprise_linux/8/html-single/considerations_in_adopting_rhel_8/index#perl_dynamic-programming-languages-web-servers-database-servers|15.1.3. Perl への主な変更点]]をご参照ください。 Perl-5.26ではセキュリティ上の理由からライブラリーのパスから現在のディレクトリーが削除されましたので、それが原因でhttpd上でperlプログラム実行時にエラーが出る場合は {{{ /etc/httpd/conf/httpd.conf }}} 中や、それぞれのvirtualhostの設定ファイル内に以下の一文 {{{ setenv PERL5LIB . }}} を追記するとhttpd上で perlプログラムが正常に動作するようになる場合があります。 8. PHP の変更に関して CentOS 8 では PHP 7.2 が同梱されています。これまでの CentOS 7での PHP 5.4に対して重要な変更が導入されました。詳細についてはアップストリームのドキュメント[[https://access.redhat.com/documentation/ja-jp/red_hat_enterprise_linux/8/html-single/considerations_in_adopting_rhel_8/index#php_dynamic-programming-languages-web-servers-database-servers|15.1.2. PHP への主な変更点]]を参照ください。 9. MariaDB の変更について CentOS 8 では MariaDB がMariaDB-10.3.11にアップグレードされています。これにより従来の CentOS 5,6,7 で動作していた MySQL, MariaDBはダンプファイルを使ってリストアが必要です。例については[[https://ribf.riken.jp/ribfcomp/MySQL-5.1%20%E3%81%8B%E3%82%89MariaDB-10.3%20%E3%81%B8%E3%81%AE%E7%A7%BB%E8%A1%8C|MySQL-5.1 からMariaDB-10.3 への移行]]をご参照ください。 10. (過去への互換性のため)必要ならば python27 をインストールします {{{ yum install -y @python27 }}} 11. 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サービスを有効化、起動: 以下のコマンドで自動起動設定,再起動 {{{ # systemctl enable chronyd # systemctl restart chronyd }}} 以下のコマンドで時刻同期を確認できます。 {{{ $ chronyc sources }}} 12. (必要なら) ganglia-gmondをインストールします。2019.11.28時点で EPEL8 にはganglia-gmondはないので fedora 29 の rpm {{{ ganglia-3.7.2-23.fc29.x86_64.rpm ganglia-gmond-3.7.2-23.fc29.x86_64.rpm }}} をインストール すると ganglia-gmond が動作します。 {{{ yum localinstall ganglia-3.7.2-23.fc29.x86_64.rpm ganglia-gmond-3.7.2-23.fc29.x86_64.rpm }}} 13. アップストリームのOSのリリース日、サポート終了日: CentOSもこれに準ずる:と期待していましたが Centos 8 は2021年末をもって終了するとアナウンスされました。 [[https://access.redhat.com/support/policy/updates/errata/|https://access.redhat.com/support/policy/updates/errata/]] {{{ リリース日     サポート期限 RHEL3 2003年10月22日 2010年10月31日(終了) RHEL4 2005年2月14日 2012年2月29日 (終了) RHEL5 2007年3月14日 2017年3月31日 (終了) RHEL6 2010年11月10日 2020年11月30日 (終了) RHEL7 2014年6月10日 2024年6月30日 RHEL8 2019年5月7日 2029年5月 CentOS 8は2021年末に終了  Alma linux 8, Rocky Linux 8 は2029年までサポート予定 RHEL9 2022年5月17日 2032年5月 Alma linux 9, Rocky Linux 9 は2032年までサポート予定 }}} 14. Scientific Linux, CentOS 以外の 米国の商用エンタープライズ Linuxパッケージのクローンプロジェクト等、参考リンク [[https://almalinux.org/ | AlmaLinux ]], [[https://mirrors.almalinux.org/ | Mirrors]], [[http://ftp.riken.jp/Linux/almalinux/ | 国内ミラー]], [[https://github.com/AlmaLinux/almalinux-deploy | almalinux-deploy:An EL to AlmaLinux migration tool]], [[https://inaba-serverdesign.jp/blog/20210913/migration-from-centos-to-almalinux.html| hint1]] [[https://rockylinux.org/ | Rocky Linux]], [[https://mirrors.rockylinux.org/mirrormanager/mirrors/Rocky/8/x86_64|Mirrors]], [[http://ftp.riken.jp/Linux/rocky/ | 国内ミラー]], [[https://github.com/rocky-linux/rocky-tools/tree/main/migrate2rocky| migrate2rocky -- Conversion Script]], [[https://docs.rockylinux.org/guides/migrate2rocky/| migrate2rocky-docs]], [[https://inaba-serverdesign.jp/blog/20210909/migrate-from-centos-to-rockylinux.html| hint1]] [[http://springdale.math.ias.edu/ | Springdale Linux (SDL)]] [[http://ftp.riken.jp/Linux/springdale/| SDLの国内のミラー]] [[https://listserv.fnal.gov/scripts/wa.exe?A0=SCIENTIFIC-LINUX-USERS | SCIENTIFIC-LINUX-USERS Home Page ]] [[https://linux.web.cern.ch/| Update on CentOS Linux strategy at CERN/FNAL]], [[https://indico.cern.ch/event/995485/contributions/4256466/attachments/2207964/3736640/hepix21-linuxatcern.pdf| Linux at CERN: current status and future (15 Mar 2021) ]]