pubinf

しばらく書いてなかったですが、Bloggerで再開しました
パソコン練習日記

タグ:zabbix

6/16~6/17で
Zabbix3.0の認定プロフェッショナルトレーニングを受講しました。

http://www.zabbix.com/jp/training_professional.php 


以前までは、トレーニングを受講するだけで認定書?がもらえましたが、
Zabbix3.0からは試験をパスしないともらえなくなるなど
変更点がありました。


トレーニング内容はオフィシャルサイトにあるので、
その他のことで伝えたいことを箇条書きすると以下な感じ

・トレーニングを受講すれば、「Zabbix認定プロフェッショナルコース修了証明書」がもらえる

・試験をパスすると、さらに「Zabbix認定プロフェッショナル証明書」がもらえる

・試験はWebブラウザを使っての受験で、4択の中から単一選択と複数選択の問題がある

・試験は70問中80%以上正解で合格(ということは15問以上間違えると落ちる)

・制限時間は50分か60分かぐらいだった。覚えていない

・合否はすぐわかる

・合格率は世界中で実施して、5割いかないぐらい

・試験に落ちたからといって、再試験するのにトレーニングまで再受講する必要はない。
 再試験だけを受けて合格すれば認定証明書がもらえる
  =>というか、トレーニングを受けなくても試験だけ受けることも可能(※と言っていた気がする)

・再試験料はいくらか、すでに決定済み(けど、いくらか聞いてなかった)

・出題範囲はスペシャリストコースの内容も含まれている


こんな感じですかね。


ちなみに
やんわり受かりました。
zbx

左が「Zabbix認定プロフェッショナルコース修了証明書」で
右が「Zabbix認定プロフェッショナル証明書」ですね。


CentOS7にZabbixServer3.0を構築

DBはMySQL、
WebはApache。

参考URL
https://www.zabbix.com/documentation/3.0/manual/installation/install_from_packages#red_hat_enterprise_linuxcentos
https://www.zabbix.com/documentation/3.0/manual/appendix/install/db_scripts


使ったOSの詳細なバージョンは以下。

# cat /etc/redhat-release
CentOS Linux release 7.2.1511 (Core)



[mariaDBアンインストール]
MySQLの邪魔になるらしいので

# yum list installed | grep maria
mariadb-libs.x86_64                  1:5.5.47-1.el7_2               @updates

# yum -y remove mariadb-libs



[MySQLインストール]
最新のrpmをWebから取得。
http://dev.mysql.com/downloads/repo/yum/


RHEL7のDownloadをクリック
mysql1



"No thanks, just start my download."を右クリック⇒"リンクのコピー"
でURLを取得
mysql2



mysqlのrpmをインストール。
渡すパラメータ(URL)は取得したURL
# yum install http://dev.mysql.com/get/mysql57-community-release-el7-8.noarch.rpm




mysqlのリポジトリを確認
# yum list available | grep mysql
mysql3




リポジトリを指定してmysqlをインストール。
# yum -y --enablerepo=mysql57-community install mysql-community-server




mysqlが自動起動(enabled)であることを確認。
# systemctl list-unit-files | grep mysql
mysqld.service                              enabled




mysqlを起動。
# systemctl start mysqld.service



mysqlのrootユーザ初期パスワードを確認。
# cat /var/log/mysqld.log | grep "temporary password"
mysql4


mysql_secure_installationを実行し、
rootパスワード変更などセキュリティ設定。
とりあえずログだけ乗っけるけど、パスワードポリシーとかがきつかった。
今回、rootのパスワードは"Z@bbix12345"に設定。
# mysql_secure_installation

Securing the MySQL server deployment.
Enter password for user root:
The existing password for the user account root has expired. Please set a new password.
New password:
Re-enter new password:
The 'validate_password' plugin is installed on the server.
The subsequent steps will run with the existing configuration
of the plugin.
Using existing password for root.
Estimated strength of the password: 100
Change the password for root ? ((Press y|Y for Yes, any other key for No) : Y
New password:
Re-enter new password:

Estimated strength of the password: 100
Do you wish to continue with the password provided?(Press y|Y for Yes, any other key for No) : y
By default, a MySQL installation has an anonymous user,
allowing anyone to log into MySQL without having to have
a user account created for them. This is intended only for
testing, and to make the installation go a bit smoother.
You should remove them before moving into a production
environment.
Remove anonymous users? (Press y|Y for Yes, any other key for No) : y
Success.

Normally, root should only be allowed to connect from
'localhost'. This ensures that someone cannot guess at
the root password from the network.
Disallow root login remotely? (Press y|Y for Yes, any other key for No) : y
Success.
By default, MySQL comes with a database named 'test' that
anyone can access. This is also intended only for testing,
and should be removed before moving into a production
environment.

Remove test database and access to it? (Press y|Y for Yes, any other key for No) : y
 - Dropping test database...
Success.
 - Removing privileges on test database...
Success.
Reloading the privilege tables will ensure that all changes
made so far will take effect immediately.
Reload privilege tables now? (Press y|Y for Yes, any other key for No) : y
Success.
All done



[Zabbixのインストール・設定]
Zabbixのrpmをインストール
# rpm -ivh http://repo.zabbix.com/zabbix/3.0/rhel/7/x86_64/zabbix-release-3.0-1.el7.noarch.rpm



ZabbixServerに関連するものをすべてインストール
# yum install zabbix-server-mysql zabbix-web-mysql



ZabbixAgentもインストール
# yum install zabbix-agent




rootユーザでmysqlにログイン
# mysql --user=root -p
Enter password:




mysqlの文字コード設定とZabbixユーザの作成。
パスワードは任意でいいけど”zabbix”という簡単なパスワードだとエラーが出た
mysql> create database zabbix character set utf8 collate utf8_bin;
Query OK, 1 row affected (0.00 sec)
mysql> grant all privileges on zabbix.* to zabbix@localhost identified by 'Z@bbix01';
Query OK, 0 rows affected, 1 warning (0.01 sec)
mysql> quit
Bye



SQLファイルがあるディレクトリに移動
※ZabbixServerの更新があるとディレクトリが変わるので、
/usr/share/doc/配下のディレクトリ(zabbix-server-mysql-XXXX)を確認する。
は下記。
# cd /usr/share/doc/zabbix-server-mysql-3.0.2




ZabbixのDB作ったりテーブル作ったり。
rootユーザでMysqlにログインし、sqlを実行
# zcat create.sql.gz | mysql -uroot zabbix -p
Enter password:




ZabbixServerのconfファイルを編集。
今回はDBPasswordだけは要変更なのでパスワードを変更
# vi /etc/zabbix/zabbix_server.conf
DBHost=localhost
DBName=zabbix
DBUser=zabbix
DBPassword=Z@bbix01



ZabbixServer起動
# systemctl start zabbix-server


ZabbixServer自動起動設定
# systemctl enable zabbix-server



ZabbixAgent起動
# systemctl start zabbix-agent



ZabbixAgent自動起動設定
# systemctl enable zabbix-agent


[Apache、PHP設定]

timezoneの箇所を編集。
# vi /etc/php.ini
date.timezone = Asia/Tokyo



Webサーバ起動
# systemctl start httpd




Webサーバ自動起動設定
# systemctl enable httpd



[FW設定]
http、ZabbixServerポート、ZabbixAgent(いちおう)を開放。
# firewall-cmd --permanent --add-service=http
# firewall-cmd --permanent --add-port=10051/tcp
# firewall-cmd --permanent --add-port=10050/tcp


設定を読み込み
# firewall-cmd --reload




あとはブラウザで接続し、設定。
zabsv

zbxsv01


zbxsv02


zbxsv03


zbxsv04


zbxsv05

ちなみにログイン初期ユーザ・パスワードは
Admin/zabbix
https://www.zabbix.com/documentation/3.0/manual/installation/install_from_packages#red_hat_enterprise_linuxcentos
Zabbix公式マニュアルの一番下に書いています。

zbxsv06




追記
SElinux無効化

# setenforce 0


# vi /etc/selinux/config
SELINUX=disabled

↑このページのトップヘ