zabbix2.0.3 安装与配置
1.zabbix安装环境准备zabbix安装需要LAMP环境支持
采用yum源安装LAMP快速构建。
yum -y install httpd php php-devel php-gd php-bcmath php-mbstring mysql mysql-devel mysql-server php-xml php-mysql gd net-snmp net-snmp-devel net-snmp-utils curl-devel
安装后,启动mysql
# /etc/init.d/mysqld start
Initializing MySQL database:Installing MySQL system tables...
OK
Filling help tables...
OK
To start mysqld at boot time you have to copy
support-files/mysql.server to the right place for your system
PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
To do so, start the server, then issue the following commands:
/usr/bin/mysqladmin -u root password 'new-password'
/usr/bin/mysqladmin -u root -h zabbix111 password 'new-password'
Alternatively you can run:
/usr/bin/mysql_secure_installation
which will also give you the option of removing the test
databases and anonymous user created by default.This is
strongly recommended for production servers.
See the manual for more instructions.
You can start the MySQL daemon with:
cd /usr ; /usr/bin/mysqld_safe &
You can test the MySQL daemon with mysql-test-run.pl
cd mysql-test ; perl mysql-test-run.pl
Please report any problems with the /usr/bin/mysqlbug script!
The latest information about MySQL is available on the web at
http://www.mysql.com
Support MySQL by buying support/licenses at http://shop.mysql.com
Starting mysqld:
设置mysql密码
# /usr/bin/mysqladmin -u root password '123456'
创建zabbix数据库
# mysql -uroot -p123456
Welcome to the MySQL monitor.Commands end with ; or \g.
Your MySQL connection id is 3
Server version: 5.0.95 Source distribution
Copyright (c) 2000, 2011, 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
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> create database zabbix;
Query OK, 1 row affected (0.06 sec)
创建zabbix用户与组
# groupadd zabbix
# useradd -g zabbix -m zabbix
解压zabbix包
# tar zxvf zabbix-2.0.3.tar.gz
导入数据库到mysql
# cd zabbix-2.0.3/database/mysql/
# mysql -uroot -p123456 zabbix <./schema.sql
# mysql -uroot -p123456 zabbix <./images.sql
# mysql -uroot -p123456 zabbix <./data.sql
2.编译安装zabbix
# cd ../../
# ./configure --prefix=/usr/local/zabbix --enable-server --enable-agent --with-mysql --with-net-snmp --with-libcurl
# make install
3.修改配置文件
# vi /etc/services
在最后增加
zabbix-agent 10050/tcp
zabbix-agent 10050/udp
zabbix-trapper10051/tcp
zabbix-trapper10051/udp
4.修改配置文件
服务端修改
# vi /usr/local/zabbix/etc/zabbix_server.conf
DBPassword=123456
本机客户端修改
# vi /usr/local/zabbix/etc/zabbix_agentd.conf
hostname=zabbix111 #主机名
# cd frontends/
# cp -r php /var/www/html/zabbix
修改php配置文件
# vi /etc/php.ini
date.timezone = Asia/Shanghai
max_execution_time = 300
max_input_time = 300
post_max_size = 32M
mbstring.func_overload = 2
修改完成后重启apache
# service httpd restart
# /etc/init.d/iptables stop #防火墙关闭
# chkconfig iptables off
开机启动
# chkconfig mysqld on
# chkconfig httpd on
打开浏览器
Next
Next
Next
Next
Download下来放在/var/www/html/zabbix/conf目录下后面点击Retry后,在点击Finish
# cd /var/www/html/zabbix/conf
用户名: admin密码:zabbix 默认的
说明zabbix服务没有启动
启动zabbix服务端
# /usr/local/zabbix/sbin/zabbix_server
启动zabbix客户端
# /usr/local/zabbix/sbin/zabbix_agentd
页:
[1]