zabbix 2.0.0部署文檔

系統環境:php

Centos5.8 x64html

Iptables disabledmysql

Selinux disabledlinux

軟件環境:c++

zabbix-2.0.0sql

 

 

下載zabbixchrome

# wget http://nchc.dl.sourceforge.net/project/zabbix/ZABBIX%20Latest%20Stable/2.0.0/zabbix-2.0.0.tar.gzvim

# yum -y install gcc gcc-c++ curl curl-devel net-snmp net-snmp-devel perl-DBI php php-gd php-mbstring php-xml php-bcmath mysql-server mysql-devel php-mysql httpdfrontend

# /etc/init.d/mysqld startdom

修改mysqlroot密碼爲000000

# mysqladmin -uroot -p password 000000

# mysql -uroot -p

Enter password:

mysql> create database zabbix character set utf8;

Query OK, 1 row affected (0.00 sec)

mysql> grant all on zabbix.* to zabbix@'%' identified by '123123';

Query OK, 0 rows affected (0.00 sec)

mysql> flush privileges;

Query OK, 0 rows affected (0.00 sec)

mysql> exit

Bye

# tar xf zabbix-2.0.0.tar.gz

# cd zabbix-2.0.0/database/mysql

# pwd

/mnt/zabbix-2.0.0/database/mysql

# ls

data.sql images.sql schema.sql

使用zabbix登陸mysql,若是登陸不進去能夠試試以下操做:

mysql -uroot –p

mysql> use mysql;

mysql> select user,password,host from user;

+--------+------------------+-----------------------+

| user | password | host |

+--------+------------------+-----------------------+

| root | 4e469e355b706e6f | localhost |

| root | | localhost.localdomain |

| root | | 127.0.0.1 |

| | | localhost |

| | | localhost.localdomain |

| zabbix | 5668a61a05d9c04b | % |

+--------+------------------+-----------------------+

6 rows in set (0.00 sec)

mysql> delete from mysql.user where mysql.user.host='localhost.localdomain';

mysql> delete from mysql.user where mysql.user.host='127.0.0.1';

mysql >delete from mysql.user where mysql.user.user='';

mysql> flush privileges;

mysql> exit

使用zabbix登陸mysql,依次導入三個sql數據,順序不要亂

# mysql -uzabbix –p

mysql> use zabbix;

mysql> source /mnt/zabbix-2.0.0/database/mysql/schema.sql;

mysql> source /mnt/zabbix-2.0.0/database/mysql/data.sql;

mysql> source /mnt/zabbix-2.0.0/database/mysql/images.sql;

# cd /mnt/zabbix-2.0.0

編譯安裝zabbix

# ./configure --prefix=/usr/local/zabbix --enable-server --enable-agent --enable-proxy --with-mysql=/usr/bin/mysql_config --with-net-snmp --with-libcurl

# make && make install

# cat &gt;&gt; /etc/services <&lt;EOF

> zabbix_agent 10050/tcp

&gt; zabbix_trap 10051/tcp

&gt; EOF

# cp -a frontends/php/* /var/www/html/

修改/etc/httpd/conf/httpd.conf

DirectoryIndex index.html index.html.var index.php

# /etc/init.d/httpd start

修改/usr/local/zabbix/etc/zabbix_server.conf參數:

DBName=zabbix

DBUser=zabbix

DBPassword=123123

# cp /mnt/zabbix-2.0.0/misc/init.d/redhat/8.0/zabbix_server /etc/init.d/

# cp /mnt/zabbix-2.0.0/misc/init.d/redhat/8.0/zabbix_agentd /etc/init.d/

# chmod +x /etc/init.d/zabbix_*

# vim /etc/init.d/zabbix_server

修改

progdir="/usr/local/zabbix/bin/"

progdir="/usr/local/zabbix/sbin/"

# vim /etc/init.d/zabbix_agentd

修改

progdir="/usr/local/zabbix/bin/"

progdir="/usr/local/zabbix/sbin/"

啓動服務

# /etc/init.d/zabbix_server start

# /etc/init.d/zabbix_agentd start

設置開機啓動

# chkconfig --add zabbix_server

# chkconfig --add zabbix_agentd

# chkconfig --level 35 zabbix_server on

# chkconfig --level 35 zabbix_agentd on

# vim /etc/php.ini

date.timezone = Asia/Shanghai

post_max_size = 32M

max_execution_time = 300

max_input_time = 300

默認的日誌文件在

/tmp/zabbix_server.log

/tmp/zabbix_agentd.log

訪問:

http://10.1.1.7/

clip_image002

clip_image004

clip_image006

clip_image008

clip_image010

 clip_image012

clip_image014

這裏有個fail是由於conf目錄沒有寫權限

# chmod 777 /var/www/html/conf

clip_image016

clip_image018

到這裏安裝就算完成了!(ps:chrome貌似有點問題,使用ie登錄)

Username:admin

Password:zabbix

若是想要看中文界面的話,點擊右上角profile

clip_image020

clip_image022

相關文章
相關標籤/搜索