您好,登录后才能下订单哦!
密码登录
登录注册
点击 登录注册 即表示同意《亿速云用户服务条款》
zabbix由2部分构成,zabbix server与可选组件zabbix agent。
安装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
免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。