More Related Content
Similar to Cent7@zabbix2.4を試す
Similar to Cent7@zabbix2.4を試す (20)
Cent7@zabbix2.4を試す
- 2. 自己紹介 白石 雅義
FB : /masayoshi.shiraishi
twitter : m_46 CTF : monolith
プログラマ以外のITのお仕事やってます。
インフラ、サーバ、zabbix監視・管理
ネットワーク、情報セキュリティ…等
- 9. PostgreSQL用の6543ポート開放
# firewall-cmd --zone=dmz ̶add-port=6543/tcp
--permanent
zabbix用の10050(エージェント側)/10051(サーバ側)ポート開放
# firewall-cmd --zone=dmz --add-port=10050/tcp --permanent
# firewall-cmd --zone=dmz --add-port=10051/tcp --permanent
- 10. 2. 各種レポジトリの導入
epel
# yum install epel-release
remi
# rpm -Uvh http://
rpms.famillecollet.com/enterprise/
remi-release-7.rpm
- 11. pgdg
# rpm -ivh http://yum.postgresql.org/
9.5/redhat/rhel-7-x86_64/
pgdg-centos95-9.5-2.noarch.rpm
zabbix (agent側はこのレポジトリのみ)
# rpm -ivh http://repo.zabbix.com/
zabbix/2.4/rhel/7/x86_64/zabbix-
release-2.4-1.el7.noarch.rpm
- 12. 3. Apache 2.4.6 インストール
# yum install httpd httpd-devel
# vi /etc/httpd/conf/httpd.conf
→ 必要に応じて適宜変更
- 13. 4. PostgreSQL 9.5.x(最新版)インストール
# yum -y ̶disableplugin=priorities
install postgresql95-server
initdb実行
# su -c '/usr/pgsql-9.5/bin/initdb -D
/var/lib/pgsql/9.5/data' postgres
- 18. psqlコマンドを利用してユーザとDB作成
# su - postgres
$ psql -U postgres -p 6543
create user zabbix SUPERUSER
PASSWORD Hellow_zabbix1123! ;
create database zabbix owner=zabbix;
- 26. # systemctl enable zabbix-server.service
# systemctl start zabbix-server.service
# systemctl enable zabbix-agent.service
# systemctl start zabbix-agent.service
- 27. # systemctl enable httpd.service
# systemctl start httpd.service
サイトアクセス
http://{サーバIP}/zabbix
- 37. Linuxのサービス監視用shファイル
#!/bin/sh
# httpd running status checker.
# Return Status: 1 = Runnning
# 0 = not Running
ret=0
service httpd status >/dev/null ¦¦ ret=$?
if [ "$ret" = "0" ]; then
# runnning
echo 1
else
# not runnning
echo 0
fi