扫二维码与项目经理沟通
我们在微信上24小时期待你的声音
解答本文疑问/技术咨询/运营咨询/技术建议/互联网交流
zabbix由2部分构成,zabbix server与可选组件zabbix agent。
创新互联建站成立十余年来,这条路我们正越走越好,积累了技术与客户资源,形成了良好的口碑。为客户提供网站制作、成都做网站、网站策划、网页设计、域名注册、网络营销、VI设计、网站改版、漏洞修补等服务。网站是否美观、功能强大、用户体验好、性价比高、打开快等等,这些对于网站建设都非常重要,创新互联建站通过对建站技术性的掌握、对创意设计的研究为客户提供一站式互联网解决方案,携手广大客户,共同发展进步。
安装zabbix依赖包 shell> yum install net-snmp-devel curl-devel 创建zabbix用户 shell> groupadd zabbix shell> useradd -r -g zabbix zabbix 解压zabbix安装包 shell> tar zxvf zabbix-2.4.5.tar.gz shell> cd zabbix-2.4.5/ 创建zabbix数据库库并导入初始化数据 MySQL> create database zabbix character set utf8; Query OK, 1 row affected (0.02 sec) mysql> grant all on zabbix.* to zabbix@localhost identified by '123@qwe'; Query OK, 0 rows affected (0.01 sec) mysql> flush privileges; Query OK, 0 rows affected (0.00 sec) shell> mysql -u zabbix -p zabbix < database/mysql/schema.sql shell> mysql -u zabbix -p zabbix < database/mysql/images.sql shell> mysql -u zabbix -p zabbix < database/mysql/data.sql 编译安装zabbix shell> ./configure --prefix=/usr/local/zabbix --enable-server --enable-proxy --enable-agent \ --with-mysql=/db/mysql/bin/mysql_config --with-net-snmp --with-libcurl shell> make && make install shell> ln -s /usr/local/zabbix/sbin/* /usr/local/sbin/ shell> ln -s /usr/local/zabbix/bin/* /usr/local/bin/
添加zabbix server端口 shell> grep zabbix /etc/services zabbix-agent 10050/tcp # Zabbix Agent zabbix-agent 10050/udp # Zabbix Agent zabbix-trapper 10051/tcp # Zabbix Trapper zabbix-trapper 10051/udp # Zabbix Trapper 更改zabbix-server.conf配置文件中关于数据库部分。 shell> vi /usr/local/zabbix/etc/zabbix_server.conf ============================================================== DBHost=localhost DBName=zabbix DBUser=zabbix DBPassword=123@qwe DBSocket=/tmp/mysql.sock DBPort=3306 ListenIP=127.0.0.1 AlertScriptsPath=/usr/local/zabbix/share/zabbix/alertscripts ============================================================== 更改zabbix_agent.conf配置文件中关于数据库部分 shell> vi /usr/local/zabbix/etc/zabbix_agentd.conf ============================================================== Include=/usr/local/etc/zabbix_agentd.conf.d/ UnsafeUserParameters=1 ==============================================================
拷贝zabbix前端到web目录下 shell> cp -a frontends/php/* /usr/local/nginx/html/zabbix/ shell> chown -R nginx.nginx /usr/local/nginx/html/ 添加zabbix到开机启动脚本并修改 shell> cp misc/init.d/fedora/zabbix_agentd /etc/init.d/ shell> cp misc/init.d/fedora/zabbix_server /etc/init.d/ 修改/etc/init.d/zabbix_server、/etc/init.d/zabbix_agentd中BASEDIR=/usr/local/zabbix shell> /etc/init.d/zabbix_agentd start Starting zabbix_agentd: [确定] shell> /etc/init.d/zabbix_server start Starting zabbix_server: [确定]
修改php配置文件参数 shell> vi /usr/local/php/lib/php.ini ============================================================== date.timezone = Asia/Shanghai post_max_size =32M max_execution_time =300 max_input_time =300 ============================================================== 启动php-fpm、nginx shell> /usr/local/php/sbin/php-fpm shell> /usr/local/nginx/nginx
在浏览器中输入http:///zabbix/setup.php,会显示
使用默认账号:admin 密码:zabbix 登录
参考:
https://www.zabbix.com/documentation/2.4/manual/installation/install
http://coolnull.com/217.html
http://www.osyunwei.com/archives/7984.html
Svoid
2015-07-02
我们在微信上24小时期待你的声音
解答本文疑问/技术咨询/运营咨询/技术建议/互联网交流