Zabbix 2.0.4をCentOS6.3にインストールした際の備忘録

環境 :AmazonWebServices(AWS)
AMI  :suz-lab_centos-core-6.3.8 (ami-2b9d192a)
OS   :CentOS release 6.3 (Final)

素人の自分でもインストールできます。Zabbix2.0.Xのインストール備忘録が少なかったので参考程度にアップします。インストール先はAWS-EC2初期セットアップ済みのCentOS release 6.3です足りないパッケージなどがあるかと思いますので、そこは皆さんの環境に合わせて下さい。

#yum -y install httpd mysql-server php php-mysql

ちなみにZabbixとだけ入力すると 1.8.X=古い版 2.0.X=最新版がそれぞれ出てきます

# yum list | grep zabbix20
zabbix20.x86_64                                 2.0.4-3.el6                 @epel
zabbix20-server.x86_64                      2.0.4-3.el6                 @epel
zabbix20-server-mysql.x86_64            2.0.4-3.el6                 @epel
zabbix20-agent.x86_64                       2.0.4-3.el6                 epel
zabbix20-proxy.x86_64                       2.0.4-3.el6                 epel
zabbix20-proxy-mysql.x86_64             2.0.4-3.el6                 epel
zabbix20-proxy-pgsql.x86_64              2.0.4-3.el6                 epel
zabbix20-proxy-sqlite3.x86_64            2.0.4-3.el6                 epel
zabbix20-server-pgsql.x86_64             2.0.4-3.el6                 epel
zabbix20-web.noarch                           2.0.4-3.el6                 epel
zabbix20-web-mysql.noarch                 2.0.4-3.el6                 epel
zabbix20-web-pgsql.noarch                  2.0.4-3.el6                 epel

# yum list installed zabbix  ←最終的には下記のパッケージをインストールしました。
zabbix20.x86_64                  2.0.4-3.el6                @epel
zabbix20-agent.x86_64            2.0.4-3.el6                @epel
zabbix20-server.x86_64           2.0.4-3.el6                @epel
zabbix20-server-mysql.x86_64     2.0.4-3.el6                @epel
zabbix20-web.noarch              2.0.4-3.el6                @epel
zabbix20-web-mysql.noarch        2.0.4-3.el6                @epel

# vi /etc/my.cnf            ←Mysqlの設定ファイルを編集

# Disabling symbolic-links is recommended to prevent assorted security risks



# Disabling symbolic-links is recommended to prevent assorted security risks
character-set-server = utf8
collation-server = utf8_general_ci
init-connect = SET NAMES utf8

# /etc/rc.d/init.d/mysqld start   ←Mysqlを起動
MySQL データベースを初期化中:  Installing MySQL system tables…

# mysql_secure_installation    ←Mysql初期インストールを行う

In order to log into MySQL to secure it, we’ll need the current
password for the root user.  If you’ve just installed MySQL, and
you haven’t set the root password yet, the password will be blank,
so you should just press enter here.

Enter current password for root (enter for none):
OK, successfully used password, moving on…

Setting the root password ensures that nobody can log into the MySQL
root user without the proper authorisation.

Set root password? [Y/n]
New password:
Re-enter new password:
Password updated successfully!
Reloading privilege tables..
… Success!

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? [Y/n]
… 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? [Y/n]
… 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? [Y/n]
– 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? [Y/n]
… Success!

Cleaning up…

All done!  If you’ve completed all of the above steps, your MySQL
installation should now be secure.

Thanks for using MySQL!

# mysql -u root -p          ←Mysqlにログインし、ユーザ(zabbix)とDB(zabbix)を作成する
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or g.
Your MySQL connection id is 12
Server version: 5.5.30-cll MySQL Community Server (GPL) by Atomicorp

Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective

Type ‘help;’ or ‘h’ for help. Type ‘c’ to clear the current input statement.

mysql> grant all privileges on zabbix.* to zabbix@localhost identified by ‘XXXXXXX’;
Query OK, 0 rows affected (0.00 sec)

mysql> create database zabbix character set utf8;
Query OK, 1 row affected (0.00 sec)

mysql> exit

# cd /usr/share/zabbix-mysql/           ←初期DBをインポートする
# mysql -u zabbix -p zabbix  < schema.sql
# mysql -u zabbix -p zabbix  < schema.sqlimages.sql
# mysql -u zabbix -p zabbix  < images.sql  data.sql

# vi /etc/zabbix/zabbix_server.conf        ←zabbixの設定ファイルを編集
### Option: DBName
#       Database name.
#       For SQLite3 path to database file must be provided. DBUser and DBPassword are ignored.
# Mandatory: yes
# Default:
# DBName=


### Option: DBUser
#       Database user. Ignored for SQLite.
# Mandatory: no
# Default:
# DBUser=


### Option: DBPassword
#       Database password. Ignored for SQLite.
#       Comment this line if no password is used.
# Mandatory: no
# Default:
# DBPassword=


# /etc/rc.d/init.d/zabbix-server start         ←zabbix-serverを起動させる
Starting Zabbix server: [  OK  ]
# tail -f /bavar/lozag/zabbix/zabbix_server.log
16166:20130208:122339.935 server #0 started [main process]
16215:20130208:122339.953 server #26 started [self-monitoring #1]
16180:20130208:122340.139 server #7 started [poller #5]
16174:20130208:122340.145 server #3 started [poller #1]
16177:20130208:122340.147 server #5 started [poller #3]
16181:20130208:122340.148 server #8 started [unreachable poller #1]
16179:20130208:122340.151 server #6 started [poller #4]
16175:20130208:122340.154 server #4 started [poller #2]
16201:20130208:122340.175 server #19 started [discoverer #1]
16194:20130208:122340.186 housekeeper deleted: 0 records from history and trends, 0 records of deleted items, 0 events, 0 alerts, 0 sessions

# /etc/rc.d/init.d/hrttpd start         ←httpも起動させる
httpd を起動中: [  OK  ]




# vi /etc/php.ini                 ←PHPの設定ファイルを編集

; Maximum size of POST data that PHP will accept.
; Its value may be 0 to disable the limit. It is ignored if POST data reading
; is disabled through enable_post_data_reading.
post_max_size = 8M

; Maximum execution time of each script, in seconds
; Note: This directive is hardcoded to 0 for the CLI SAPI
max_execution_time = 30

; Maximum amount of time each script may spend parsing request data. It’s a good
; idea to limit this time on productions servers in order to eliminate unexpectedly
; long running scripts.
; Note: This directive is hardcoded to -1 for the CLI SAPI
; Default Value: -1 (Unlimited)
; Development Value: 60 (60 seconds)
; Production Value: 60 (60 seconds)
max_input_time = 60

# /etc/rc.d/init.d/httpd restart


先ほど要件を満たしていなかった項目が緑色になった 次はDBの情報を入力




http://XXXXXXXXXX/zabbix を開いて ID:admin PASS:zabbixでログインして下さい。

言語を日本語 目に優しい? 黒と青の画面に変更してみました。


# yum liist | grep zabbix20-agent.x86_64
# yum -y install zabbix20-agent.x86_64



  • このエントリーをはてなブックマークに追加


adana escort adıyaman escort afyon escort ağrı escort aksaray escort amasya escort ankara escort antalya escort ardahan escort artvin escort aydın escort balıkesir escort bartın escort batman escort bayburt escort bilecik escort bingöl escort bitlis escort bolu escort burdur escort bursa escort çanakkale escort çankırı escort çorum escort denizli escort diyarbakır escort düzce escort edirne escort elazığ escort erzincan escort erzurum escort eskişehir escort gaziantep escort gebze escort giresun escort gümüşhane escort hakkari escort hatay escort ığdır escort ısparta escort istanbul escort izmir escort izmit escort kahramanmaraş escort karabük escort karaman escort kars escort kastamonu escort kayseri escort kilis escort kırıkkale escort kırklareli escort kırşehir escort kocaeli escort konya escort kütahya escort malatya escort manisa escort mardin escort mersin escort muğla escort muş escort nevşehir escort niğde escort ordu escort osmaniye escort rize escort sakarya escort samsun escort şanlıurfa escort siirt escort sinop escort şırnak escort sivas escort tekirdağ escort tokat escort trabzon escort tunceli escort uşak escort van escort yalova escort yozgat escort zonguldak escort