1、防火墙及SELINUX关闭
http://blog.csdn.net/xiegh2014/article/details/53031781
2、yum源配置
http://blog.csdn.net/xiegh2014/article/details/53031894
rpm -ivh http://repo.webtatic.com/yum/el6/latest.rpm
3、安装PHP所需包
yum -y install httpd PHP56w PHP56w-gd PHP56w-MysqL PHP56w-bcmath PHP56w-mbstring PHP56w-xml PHP56w-ldap wget ntpdate net-snmP*
yum install -y gcc MysqL-community-devel libxml2-devel unixODBC-devel net-snmp-devel libcurl-devel libssh2-devel OpenIPMI-devel openssl-devel openldap-devel
4、MysqL安装及账号创建
yum -y install MysqL-server MysqL
yum -y install MysqL MysqL-devel MysqL-server
/etc/init.d/MysqLd restart
MysqL -u root -p
CREATE DATABASE zabbix CHaraCTER SET utf8 COLLATE utf8_bin;
GRANT ALL PRIVILEGES ON zabbix.* TO zabbix@localhost IDENTIFIED BY 'zabbix';
5、下载zabbix3.2.0安装包
链接:http://pan.baidu.com/s/1i492Ywt 密码:ox2x
groupadd zabbix
useradd -g zabbix zabbix
tar -xvf zabbix-3.2.0.tar.gz
cd /data/zabbix-3.2.0/database/MysqL/
MysqL -u zabbix -p zabbix < schema.sql
MysqL -u zabbix -p zabbix < images.sql
MysqL -u zabbix -p zabbix < data.sql
cd ../../
./configure --enable-server --with-MysqL --enable-ipv6 --with-net-snmp --with-libcurl --with-libxml2 --with-unixodbc --with-ssh2 --with-openipmi --with-openssl
make install
vim /usr/local/etc/zabbix_server.conf
dbname=zabbix
DBUser=zabbix
DBPassword=zabbix
mkdir /var/www/html/zabbix
cd /data/zabbix-3.2.0/frontends/PHP/
cp -a . /var/www/html/zabbix/
chcon -Rv --type=httpd_sys_content_t /var/www/html
运行Apache和zabbix访问外网
setsebool -P httpd_can_network_connect=1
setsebool -P zabbix_can_network=1
chown -R apache:apache /var/www/html/zabbix
为zabbix web界面添加权限
chmod +x /var/www/html/zabbix/conf/
cp /data/zabbix-3.2.0/misc/init.d/fedora/core/zabbix_server /etc/init.d/zabbix_server
chkconfig --add /etc/init.d/zabbix_server
启用Zabbix服务器,Apache和MysqL服务启动
chkconfig httpd on
chkconfig zabbix_server on
启动
/etc/init.d/httpd start
service zabbix_server start
vim /etc/PHP.ini
post_max_size=16M
max_execution_time=300
max_input_time=300
date.timezone=Asia/Shanghai
always_populate_raw_post_data=-1
/etc/init.d/httpd restart
用浏览器打开 下一步 输入数据库密码
http://172.16.8.100/zabbix/
zabbix客户端安装
yum -y install http://repo.zabbix.com/zabbix/3.2/rhel/6/x86_64/zabbix-release-3.2-1.el6.noarch.rpm
yum install zabbix-agent -y
sed -i 's/Server=127.0.0.1/Server=172.16.8.100/' /etc/zabbix/zabbix_agentd.conf
grep -n '^Server=' /etc/zabbix/zabbix_agentd.conf
/etc/init.d/zabbix-agent start
chkconfig zabbix-agent on
可以参考http://blog.csdn.net/xiegh2014/article/details/52038536
[root@qas-zabbix include]# pwd
/var/www/html/zabbix/include
[root@qas-zabbix include]# vi defines.inc.PHP
#修改第93行
define('ZBX_FONT_NAME','msyh');
#修改第45行改为
define('ZBX_GRAPH_FONT_NAME','msyh')
然后下载微软雅黑字体,改名为msyh传入 /var/www/html/zabbix/fonts目录下即可
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。