0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

ZabbixServer4.0をRHEL7.6にinstall

Posted at

環境

  • Red Hat Enterprise Linux Server release 7.6 (Maipo)
  • zabbix-server-mysql-4.0.3-1.el7.x86_64

参考

nstall_from_packages rhel_centos

install

zabbix server + frontend

# zabbix repositoryの追加
rpm -ivh https://repo.zabbix.com/zabbix/4.0/rhel/7/x86_64/zabbix-release-4.0-1.el7.noarch.rpm

# php周りの依存関係解消の為optionalリポジトリを有効化(zabbix-web-mysqlで使用)
yum-config-manager --enable rhui-REGION-rhel-server-optional

# zabbix server(mysql) install
yum install zabbix-server-mysql

# zabbix frontend install(ここでhttpdも入る)
yum install zabbix-web-mysql zabbix-web-japanese

mariadbのinstallと初期設定

# mariadbのistall
yum install mariadb-server

# mariadbの起動
systemctl start mariadb && systemctl status mariadb
systemctl enable mariadb

# mysql_secure_installationの実行
mysql_secure_installation

# 
Set root password? [Y/n] n
Remove anonymous users? [Y/n] y
Disallow root login remotely? [Y/n] y
Remove test database and access to it? [Y/n] y
Reload privilege tables now? [Y/n] y

# zabbix用databaseとユーザの作成
zabbix_pass=xxxxxxxx
# zabbix server
mysql -uroot -e "create database zabbix character set utf8 collate utf8_bin;"
mysql -uroot -e "grant all privileges on zabbix.* to zabbix@localhost identified by '$zabbix_pass';"

zabbix databaseのsetup

# create.sqlの実行(zabbix server)
zcat /usr/share/doc/zabbix-server-mysql*/create.sql.gz | mysql -uzabbix -p zabbix

# DBHost=localhost、DBName=zabbix、DBUser=zabbixはそのまま利用。パスワードのみ設定する
# zabbix server
sed -i "s/# DBPassword=/# DBPassword=\nDBPassword=$zabbix_pass/g" /etc/zabbix/zabbix_server.conf

zabbix serverの起動

# 起動
systemctl start zabbix-server && systemctl status zabbix-server
# 自動起動も有効化しておく
systemctl enable zabbix-server

httpd側の設定

# zabbix.conf内のphpの変数”date.timezone"修正
# php_value date.timezone Europe/Rigaをphp_value date.timezone Asia/Tokyoに変更
# httpd の起動
systemctl start httpd && systemctl status httpd
# 自動起動設定
systemctl enable httpd

zabbix Webuiからの設定

・ http://{zabbix-serverのip}/zabbixにアクセス

スクリーンショット 2019-01-06 2.09.43.png

・環境の事前チェック

スクリーンショット 2019-01-06 2.10.04.png

・DB接続情報
スクリーンショット 2019-01-06 2.10.27.png

・Zabbix-Server情報
スクリーンショット 2019-01-06 2.11.01.png

・Installのサマリ
スクリーンショット 2019-01-06 2.11.11.png

・ Install完了
スクリーンショット 2019-01-06 2.11.22.png

初期パスワードはzabbix
スクリーンショット 2019-01-06 2.11.38.png

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

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?