wget -O /etc/yum.repos.d/epel.repohttp://mirrors.aliyun.com/repo/epel-6.repo
[root@linux-node1 ~]#mkdir /home/oldboy/tools
[root@linux-node1 ~]#cd /home/oldboy/tools
[root@linux-node1 tools]# wget -q http://repo.zabbix.com/zabbix/2.4/rhel/6/x86_64/zabbix-release-2.4-1.el6.noarch.rpm
[root@linux-node1 tools]# rpm -ivh zabbix-release-2.4-1.el6.noarch.rpm
yum -y install zabbix zabbix-server zabbix-server-mysql #<==ZABBIXSERVER相关
yum -y install zabbix-web zabbix-web-mysql #<==Apache、Php Web界面环境
yum -y install zabbix-agent #<== ZABBIX客户端
yum -y install mysql-server mysql #<==MySQL客户端与服务端
###安装zabbix依赖的服务软件包
yum -y install zabbix zabbix-server zabbix-server-mysql zabbix-webzabbix-web-mysql zabbix-agent mysql-server mysql
cp /usr/share/mysql/my-medium.cnf /etc/my.cnf
vim /etc/my.conf
###放在[mysql]下面
default-storage-engine = innodb
innodb_file_per_table
collation-server = utf8_general_ci
init-connect = 'SET NAMES utf8'
character-set-server = utf8
启动mysql
/etc/init.d/mysqld start
[root@linux-node1 ~]# mysql -e "create database zabbixcharacter set utf8 collate utf8_bin;"
[root@linux-node1 ~]# mysql -e "grant all on zabbix.* tozabbix@localhost identified by 'zabbix';"
[root@linux-node1 ~]# cd/usr/share/doc/zabbix-server-mysql-2.4.6/create
#导入数据
[root@linux-node1 create]# mysql zabbix<schema.sql
[root@linux-node1 create]# mysql zabbix<images.sql
[root@linux-node1 create]# mysql zabbix<data.sql
[root@linux-node1 create]# mysqladmin -uroot password oldboy
#修改时区
[root@lb01 conf.d]# vim /etc/httpd/conf.d/zabbix.conf
php_value date.timezoneAsia/Shanghai
#启动zabbix-server服务
/etc/init.d/zabbix-server start
yum install zabbix-agent -y
修改配置文件
[root@linux-node1 zabbix]# cat -n /etc/zabbix/zabbix_agentd.conf|grep 85
85 Server=127.0.0.1
185 ### Option: BufferSize
285 #Fullpath to location of agent modules.
[root@linux-node1 ~]# cat /etc/zabbix/zabbix_server.conf |grep -E"DBPassword|DBHost|DBUser"
DBHost=localhost
DBUser=zabbix
DBPassword=zabbix
/etc/zabbix/zabbix_agent start