LoginSignup
2
2

More than 5 years have passed since last update.

Zabbix3.0をCentOS6.7にインストール

Posted at

概要

CentOS6.7にZabbix環境を構築する

構成

Software Version
CentOS 6.7
Apache 2.2.15
PHP 5.5
MySQL 5.1.73
Zabbix 3.0.22

参考手順

手順

  • Apache、MySQLをインストール
# yum install -y httpd mysql-server
  • Zabbixパッケージをダウンロード
# rpm -ivh https://repo.zabbix.com/zabbix/3.0/rhel/6/x86_64/zabbix-release-3.0-1.el6.noarch.rpm
# yum -y install zabbix-server-mysql zabbix-web-mysql zabbix-web-japanese zabbix-agent
  • MySQLを起動
# service mysqld start
# chkconfig mysqld on
  • MySQLにZabbix用データベースを作成
# mysql -uroot
mysql> create database zabbix character set utf8 collate utf8_bin;
mysql> grant all privileges on zabbix.* to zabbix@localhost identified by 'zabbix';
mysql> quit;
  • 初期データをインストール
# zcat /usr/share/doc/zabbix-server-mysql-3.0.*/create.sql.gz | mysql -uzabbix -pzabbix zabbix
  • バージョンを確認
# rpm -q zabbix-server-mysql
  • Zabbixのデータベース接続設定
# vi /etc/zabbix/zabbix_server.conf
/etc/zabbix/zabbix_server.conf
DBHost=localhost         # ADD
DBName=zabbix            # DEFAULT
DBUser=zabbix            # DEFAULT
DBPassword=zabbix        # ADD
  • Zabbixサーバー起動、自動起動を設定
# service zabbix-server start
# chkconfig zabbix-server on
  • httpd.confを設定
# vi /etc/httpd/conf/httpd.conf
/etc/httpd/conf/httpd.conf
#ServerName www.example.com:80
ServerName localhost:80             # ADD
  • PHP5.4以上が必要なので、必要なリポジトリをインストール
# rpm -ivh http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
# rpm -ivh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm
  • PHP5.5および必要なエクステンションをインストール
# yum install -y --enablerepo=remi-php55 php php-bcmath php-gd php-ldap php-mbstring php-xml php-mysqlnd
  • Zabbix-web設定ファイルをhttpd/conf.dにコピー
# cp /usr/share/doc/zabbix-web-3.0.*/httpd22-example.conf /etc/httpd/conf.d/zabbix.conf
# vi /etc/httpd/conf.d/zabbix.conf
/etc/httpd/conf.d/zabbix.conf
        # php_value date.timezone Europe/Riga
        php_value date.timezone Asia/Tokyo       # ADD
  • Apacheを起動
# service httpd start
# chkconfig httpd on
  • ZabbixWebUIにアクセス
  • ZabbixWebUIの初期設定
    • Configure DB connection
      • Password zabbix
  • ZabbixWebUIにログイン
    • Username Admin
    • Password zabbix
2
2
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
2
2