zabbix搭建之一搭建zabbix
//下载源# rpm -ivh http://repo.zabbix.com/zabbix/2.4/rhel/6/x86_64/zabbix-release-2.4-1.el6.noarch.rpm
//加快yum工具下载安装速度
# yum -y install yum-fastestmirror
//安装mysql
# yum install -y mysql mysql-server zabbix-server-mysql zabbix-web-mysql zabbix-agent
//初始化mysql
# /etc/init.d/mysqld start
//进入mysql
# mysql -uroot
//指定字符集
# create database zabbix character set utf8 collate utf8_bin;
//授权登录用户
# grant all privileges on zabbix.* to zabbix@localhost>
//退出mysql
# exit
//进入create目录
# cd /usr/share/doc/zabbix-server-mysql-2.4.8/create/
//建表
# mysql -uroot zabbix < schema.sql
# mysql -uroot zabbix < images.sql
# mysql -uroot zabbix < data.sql
//编辑zabbix配置文件
# vi /etc/zabbix/zabbix_server.conf
/DBHost=localhost //将前面的#号删除
/DBPassword=zabbix //将前面的#号删除
:wq
//编辑php配置文件,配置php文件,最后添加这句,前面不好分号
# vim /etc/php.ini
php_value max_execution_time 300
php_value memory_limit 128M
php_value post_max_size 16M
php_value upload_max_filesize 2M
php_value max_input_time 300
:wq
//安装ntpdate
# yum install ntpdate-y
//更改时区
# ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
//同步时区
# ntpdate asia.pool.ntp.org
//开机启动httpd
# chkconfig httpd on
//开机自启动server、mysqld、agent
# chkconfig zabbix-server on;chkconfig mysqld on;chkconfig zabbix-agent on
//启动zabbix-server
# /etc/init.d/zabbix-server start
//搜索date.timezone,取消前面不要分号
# vim /etc/php.ini
date.timezone = Asia/Shanghai
:wq
//编辑hosts
# vim /etc/hosts
192.168.2.61zabbix.wtf.local //文本最后添加此句,IP为本机
:wq
//启动httpd
# /etc/init.d/httpdstart
页:
[1]