我是初学者,不会编译安装只能使用yum安装以下教程@H_301_3@
以下有说错的地方请给位看完纠正一下,谢谢各位。@H_301_3@
Install Zabbix 3.0 (Monitoring Server) on CentOS 7.x
Zabbix is a free and open source monitoring tool which is used to monitor and track the availability & performance of servers,network devices and other IT assets which are on network.@H_301_3@
Zabbix uses database like MysqL,MariaDB,Oracle and IBM DB2 to store its data. Zabbix web interface is written in PHP.@H_301_3@
@H_301_3@
Some of its key features are listed below :
Monitor everything which is on network like Servers,applications,database instance and network devices.@H_301_3@
Zabbix provides Web based administration interface.@H_301_3@
Monitoring cpu utilization of a particular process or a group of process ( proc.cpu.util)@H_301_3@
Using low-level discovery rules,zabbix can discover Vmware hypervisor ( ESXI ) and Virtual machines.@H_301_3@
Zabbix also supports agentless monitoring@H_301_3@
Monitoring of database servers like MysqL,Postgresql,Oracle and Microsoft sql Server.@H_301_3@
Zabbix can also perform the task of capacity planning for your environment.@H_301_3@
Zabbix is Open Source so no cost involved and can be deployed on small and large environment.@H_301_3@
Hardware Monitoring using Zabbix via IPMI credentials.@H_301_3@
Network Device monitoring using snmp agents.@H_301_3@
这是我安装zabbix的系统及网络环境@H_301_3@
开始安装前先更新一下现有系统@H_301_3@
[root@zabbix~]#yum-yupdate [root@zabbix~]#reboot
第一步启用EPEL zabbix 库
@H_301_3@
Zabbix package is not available in the default yum repository,so we will enable zabbix and epel repository using below commands.@H_301_3@
[root@zabbix~]#yuminstallepel-release [root@zabbix~]#rpm-ivhhttp://repo.zabbix.com/zabbix/3.0/rhel/7/x86_64/zabbix-release-3.0-1.el7.noarch.rpm
第二步安装zabbix Server,database(数据库)Web服务器我使用的是Apache PHP@H_301_3@
使用下面命令安装
@H_301_3@
[root@zabbix~]#yum-yinstallzabbix-server-MysqLzabbix-web-MysqLMysqLmariadb-serverhttpdPHP
Start the Database (MariaDB) service@H_301_3@
[root@zabbix~]#systemctlstartmariadb [root@zabbix~]#systemctlenablemariadb ln-s'/usr/lib/systemd/system/mariadb.service''/etc/systemd/system/multi-user.target.wants/mariadb.service' [root@zabbix~]#
运行MysqL_secure_installation会执行几个设置:@H_301_3@
为root用户设置密码 ,删除匿名账号取消root用户远程登录,删除test库和对test库的访问权限,刷新授权表使修改生效@H_301_3@
[root@zabbix~]#MysqL_secure_installation
创建zabbix数据库"zabbix_db"和zabbix用户“zabbix_user”和授予权限给所有在Zabbix数据库用户。
@H_301_3@
[root@zabbix~]#MysqL-uroot-p Enterpassword: WelcometotheMariaDBmonitor.Commandsendwith;or\g. YourMariaDBconnectionidis10 Serverversion:5.5.47-MariaDBMariaDBServer Copyright(c)2000,2015,Oracle,MariaDBCorporationAbandothers. Type'help;'or'\h'forhelp.Type'\c'toclearthecurrentinputstatement. MariaDB[(none)]>createdatabasezabbix_db; QueryOK,1rowaffected(0.00sec) MariaDB[(none)]>grantallprivilegesonzabbix_db.*tozabbix_user@localhostidentifiedby<new_password>; QueryOK,0rowsaffected(0.00sec) MariaDB[(none)]>flushprivileges; QueryOK,0rowsaffected(0.00sec) MariaDB[(none)]>exit Bye [root@zabbix~]#
Now import the database Schema using below commands.@H_301_3@
[root@zabbix~]#cd/usr/share/doc/zabbix-server-MysqL-3.0.1 [root@zabbixzabbix-server-MysqL-3.0.1]#gunzipcreate.sql.gz [root@zabbixzabbix-server-MysqL-3.0.1]#MysqL-uroot-pzabbix_db<create.sql Enterpassword: [root@zabbixzabbix-server-MysqL-3.0.1]#
第四步 编辑zabbix Server 配置文件
@H_301_3@
[root@zabbix~]#vi/etc/zabbix/zabbix_server.conf ................................... DBHost=localhost主机名称 DBName=zabbix_db数据库名称 DBUser=zabbix_user数据库用户名 DBPassword=XXXXXXX数据库密码X---代表自定义 ...................................
Set the below parameters in the PHP config file (/etc/PHP.ini )@H_301_3@
[root@zabbix~]#vi/etc/PHP.ini ................................ max_execution_time=600 max_input_time=600 memory_limit=256M post_max_size=32M upload_max_filesize=16M date.timezone=Asia/Kolkata ...............................
设置防火墙
@H_301_3@
[root@zabbix~]#firewall-cmd--permanent--add-port=10050/tcp success [root@zabbix~]#firewall-cmd--permanent--add-port=10051/tcp success [root@zabbix~]#firewall-cmd--permanent--add-port=80/tcp success [root@zabbix~]#firewall-cmd--reload success [root@zabbix~]#systemctlrestartfirewalld [root@zabbix~]#
Set the below Selinux rule.@H_301_3@
设置Selinux 规则@H_301_3@
[root@zabbix~]#setsebool-Phttpd_can_connect_zabbix=1 [root@zabbix~]#
备注:转上一篇文章关于关闭SELINUX的方法@H_301_3@
查看/etc/selinux/config有以下三个选项选择SELINUX = disabled@H_301_3@
SELINUX= can take one of these three values:@H_301_3@
@H_301_3@
enforcing - SELinux security policy is enforced.@H_301_3@
permissive - SELinux prints warnings instead of enforcing.@H_301_3@
disabled - No SELinux policy is loaded.@H_301_3@
@H_301_3@
启动Zabbix和Web服务器的服务并确保它使整个启动。
@H_301_3@
@H_301_3@
[root@zabbix~]#systemctlstartzabbix-server [root@zabbix~]#systemctlenablezabbix-server ln-s'/usr/lib/systemd/system/zabbix-server.service''/etc/systemd/system/multi-user.target.wants/zabbix-server.service' [root@zabbix~]# [root@zabbix~]#systemctlstarthttpd [root@zabbix~]#systemctlenablehttpd ln-s'/usr/lib/systemd/system/httpd.service''/etc/systemd/system/multi-user.target.wants/httpd.service' [root@zabbix~]#
第五步在浏览器输入http://192.168.12.131/zabbix/ @H_301_3@
请更换你使用zabbix的服务器IP地址或主机名@H_301_3@
@H_301_3@
点击Click on ‘Next step’@H_301_3@
检查zabbix配置@H_301_3@
@H_301_3@
点击‘Next step’配置数据库主机名数据库名称端口数据库用户名密码@H_301_3@
@H_301_3@
Click on ‘Next step’ to continue.@H_301_3@
Specify the Zabbix Server details and Port number.@H_301_3@
Pre-installation summary of Zabbix Servers,click on ‘Next step’ to continue.@H_301_3@
看到下个画面恭喜你安装成功了@H_301_3@
@H_301_3@@H_301_3@当我们点击
‘finish’,它将引导我们Zabbix Web界面控制台。