LoginSignup
0
1

More than 3 years have passed since last update.

Centos8をインストールして実施したこと~zabbix serverインストール前~

Last updated at Posted at 2019-11-24

あくまで自分の環境下での話なので、他で使えるかは検証していません。ご了承ください。
ちょっとCentosにzabbix serverを設定したいので記録です。

◆環境
 ・ホスト側
   windows 10 pro(1903 build 18362.418)
   VMware Workstation 15 Player (15.5.1 build-15018445)

 ・クライアント側
   CentOS Linux release 8.0.1905 (Core)
   サーバ(GUI)だけでインストールを実施
   ネットワーク設定は済ませた

◆やったこと ※全部管理ユーザーで実行しています

1.selinuxの無効化

1-1.selinuxが有効であることを確認する

 # getenforce
 Enforcing

1-2.設定ファイルの修正を実施する

 # vi /etc/selinux/config

1-2-1.変更点
 ・以下の文字列を変更する
  変更前:SELINUX=enforcing
  変更後:SELINUX=disabled

1-3.OSを再起動する

1-4.selinuxが無効になっていることを確認する

 # getenforce
 Disabled

2.時刻同期設定の変更

2-1.今ちゃんと同期しているか確認する

 # chronyc tracking
Reference ID    : D2ADA039 (ntp2.jst.mfeed.ad.jp)
Stratum         : 3
Ref time (UTC)  : Sun Nov 24 05:32:09 2019
System time     : 0.000199137 seconds fast of NTP time
Last offset     : +0.000210001 seconds
RMS offset      : 0.000210001 seconds
Frequency       : 13.926 ppm slow
Residual freq   : -1430.045 ppm
Skew            : 5.729 ppm
Root delay      : 0.094943538 seconds
Root dispersion : 0.064484976 seconds
Update interval : 1.6 seconds
Leap status     : Normal

一番下の「Leap status」が「Normal」ならOK

2-2.設定ファイルを修正する

 # vi /etc/chrony.conf

2-2-1.変更点
 ・以下の文字列をコメントアウト。追記する
  コメントアウトする列:pool 2.centos.pool.ntp.org iburst
  追記する列:pool ntp.jst.mfeed.ad.jp iburst

2-3.サービスの再起動を行う

 # systemctl restart chronyd

 エラーが出なければOK
 
2-4.作業後も同期がとれていることの確認を行う

 # chronyc tracking

 確認内容は2-1と同じ「# chronyc sources」で同期先も確認できる

3.アップデートの確認と実行する

3-1.アップデートの確認

 # dnf check-update

すいません見てもわからん

 # dnf update

確認には「y」で進める。「完了しました!」表示を確認してプロンプトが戻ってきたらOK

4.MySQLのインストール

4-1.端末から以下のコマンドを実行する

 yum -y install mysql-devel
 yum -y install mysql-server

 それぞれ「完了しました!」表示であればOK

4-2.ログのタイムゾーンをOSの設定に合わせる

vi /etc/my.cnf.d/mysql-server.cnf

4-2-1.変更点
以下の内容を追記する

log_timestamps=SYSTEM

4-3.SQLを開始して接続するrootのパスワード設定・不要ユーザーの削除

 #systemctl start mysqld.service

 mysql_secure_installation --use-default

 ※パスワードは、8文字以上で英数大文字小文字と記号を含む必要がある。

 Do you wish to continue with the password provided?(Press y|Y for Yes, any other key for No) : y
 ※ここで不要ユーザーとDBが消えるそうです

 「All done!」表示であればOK
 「... Failed! Error: Your password does not satisfy the current policy requirements」表示する場合はパスワードの複雑さを再確認すること。

ファイヤーウォールはよくわからんので後で・・・

以下サイトを参考にしました
https://www.rem-system.com/centos8-first-settings/#2_selinux
https://qiita.com/atanaka7/items/837a94b5aad63a96aa1c

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