Zabbix2.0を早速インストールした
いやー嬉しいことにZabbix2.0がリリースされました。
おめでとうございます(祝)。
嬉しすぎて早速インストールしました。
最新版はソースですが、yumレポジトリも公開されると思います。きっと・・・きっと・・・
インストール対象
- インストール先:/home/zabbio
- apacheドキュメントルート:/var/www/html
環境設定-システム時間を日本時間にする
cp /usr/share/zoneinfo/Japan /etc/localtime
yumでphpとapacheインストール
★phpは最新版が欲しいためremiレポジトリ使用
wget http://dl.fedoraproject.org/pub/epel/5/x86_64/epel-release-5-4.noarch.rpm
wget http://rpms.famillecollet.com/enterprise/remi-release-5.rpm
rpm -Uvh remi-release-5.rpm epel-release-5-4.noarch.rpm
yum install --enablerepo=remi php php-bcmath php-gd php-mbstring php-xml php-common php-pdo php-mysql httpd curl curl-devel
yum install curl curl-devel
yumでmysqlインストールとconfigure用のシンボリックリンク作成
yum install MySQL-client-community MySQL-devel-community MySQL-server-community mysqlclient15 mysqlclient15-devel
ln -s /usr/bin/mysql_config /usr/lib64/mysql/
mysqlインストール後、my.cnf編集
vi /etc/my.cnf
service mysql start
[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sockdefault-storage-engine = innodb
user=mysql
character-set-server=utf8
skip-character-set-client-handshake
collation-server=utf8_general_ci
init_connect="SET NAMES utf8 collate utf8_general_ci"innodb_file_per_table
innodb_buffer_pool_size=512M
innodb_log_file_size=16M
innodb_log_files_in_group=2
[mysql]
no-auto-rehash
# Remove the next comment character if you are not familiar with SQL
safe-updates# Default to using old password format for compatibility with mysql 3.x
# clients (those using the mysqlclient10 compatibility package).
#old_passwords=1
# Disabling symbolic-links is recommended to prevent assorted security risks;
# to do so, uncomment this line:
# symbolic-links=0
[mysqld_safe]
log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid
Zabbix2.0を本家からインストール
wget http://prdownloads.sourceforge.net/zabbix/zabbix-2.0.0.tar.gz
./configure --enable-server --prefix=/usr/local/zabbix/2.0 --with-mysql=/usr/lib64/mysql/mysql_config --enable-ipv6 --with-libcurl --enable-agent
make && make install
php.iniの設定を編集
vi /etc/php.ini
service httpd start
date.timezone = Asia/Tokyo
post_max_size = 16M
max_execution_time = 300
max_input_time = 300
Zabbix用のデータベース作成、schema設定
[root@ip-10-160-81-102 zabbix-2.0.0]# mysql
mysql> create database zabbix;
Query OK, 1 row affected (0.00 sec)mysql> create user zabbix;
Query OK, 0 rows affected (0.00 sec)mysql> grant all privileges on zabbix.* to zabbix@localhost identified by '*****パスワード';
Query OK, 0 rows affected (0.00 sec)mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)[root@ip-10-160-81-102 mysql]# cat /home/zabbio/zabbix-2.0.0/database/mysql/schema.sql | mysql -u zabbix -p****** zabbix
[root@ip-10-160-81-102 mysql]# cat /home/zabbio/zabbix-2.0.0/database/mysql/images.sql | mysql -u zabbix -p****** zabbix
[root@ip-10-160-81-102 mysql]# cat /home/zabbio/zabbix-2.0.0/database/mysql/data.sql | mysql -u zabbix -p***** zabbix