新聞中心
這里有您想知道的互聯(lián)網(wǎng)營(yíng)銷解決方案
如何在CentOS上安裝和配置Zabbix服務(wù)器
使用yum安裝zabbix-server-mysql,編輯配置文件并啟動(dòng)服務(wù),創(chuàng)建zabbix數(shù)據(jù)庫和用戶,導(dǎo)入模板。
在CentOS上安裝和配置Zabbix服務(wù)器的步驟如下:

1、更新系統(tǒng)軟件包
sudo yum update y
2、安裝EPEL(Extra Packages for Enterprise Linux)倉庫
sudo yum install epelrelease y
3、安裝LAMP(Linux、Apache、MySQL、PHP)堆棧
sudo yum install httpd mariadbserver php phpmysqlnd phpldap phpodbc phppear phpxml phpmbstring phpsnmp phpsoap curl curldevel y
4、啟動(dòng)并設(shè)置開機(jī)啟動(dòng)Apache和MariaDB服務(wù)
sudo systemctl start httpd mariadb sudo systemctl enable httpd mariadb
5、運(yùn)行MariaDB安全安裝腳本,設(shè)置root密碼和其他安全選項(xiàng)
sudo mysql_secure_installation
6、創(chuàng)建Zabbix數(shù)據(jù)庫和用戶
mysql u root p CREATE DATABASE zabbix; GRANT ALL PRIVILEGES ON zabbix.* TO zabbix@localhost IDENTIFIED BY 'zabbix'; FLUSH PRIVILEGES; EXIT;
7、導(dǎo)入Zabbix數(shù)據(jù)庫初始架構(gòu)和數(shù)據(jù)
zcat /usr/share/doc/zabbixservermysql*/create.sql.gz | mysql uzabbix pzabbix zabbix
8、安裝Zabbix服務(wù)器、前端和代理軟件包
sudo yum install zabbixservermysql zabbixwebmysql zabbixapacheconf zabbixagent y
9、編輯Zabbix配置文件/etc/zabbix/zabbix_server.conf,設(shè)置以下參數(shù):
| 參數(shù) | 值 |
| DBHost | localhost |
| DBName | zabbix |
| DBUser | zabbix |
| DBPassword | zabbix |
| PHPType | apache2handler |
| PidFile | /var/run/zabbix/zabbix_server.pid |
| LogFile | /var/log/zabbix/zabbix_server.log |
| SenderFrequency | 60 |
| SourceIP | 127.0.0.1 |
| LogSlowQueries | 1000 |
| StartPollers | 5 |
| MaxHousekeepers | 20 |
| BacgroundPollerInterval | 300 |
| PollerTimeout | 300 |
| HousekeeperInterval | 300 |
| HistoryCacheSize | 80 |
| HistoryIndex | 10 |
| FrontendURL | http://your_server_ip/zabbix |
| ServerActive | On |
| Hostname | your_server_hostname |
| Include | /etc/zabbix/zabbix_server.d/*.conf |
| UserParameter | zabbix, admin |
| WebHooksPath | /usr/lib/zabbix/alertscripts |
| LogLevel | 3 |
| LogVerbosity | 3 |
| UnsafeUserParameters | admin, Zabbix server administrator, Zabbix agent admin, Zabbix monitoring administrator, Zabbix agent, Zabbix agent (active) |
| AllowRoot | no |
| PHPAlwaysEval | Off |
| PHPShortOpenTag | Off |
| PHPIncludePath | /usr/share/zabbixphp |
| PHPExcludePath | /usr/share/zabbixphp |
| SSHKeyAuthentication | On |
| SSHKeyLocation | /etc/zabbix/ssh_host_keys |
| SSHUser | zabbix |
| SSHPassword | zabbix |
| SSHPort | 22 |
| SSHKeyAudit | Off |
| SSHKeyAuditType | fail |
| SSHKeyAuditAction | restart |
| SSHKeyAuditInterval | 3600 |
| SSHKeyAuditMaxRetry | 3 |
| SSHKeyAuditThreshold | 3 |
| SSHKeyAuditSkipUser | root, zabbix, demo, test |
| SSHKeyAuditFailUser | root, zabbix, demo, test |
| SSHKeyAuditSuccessUser | root, zabbix, demo, test |
本文題目:如何在CentOS上安裝和配置Zabbix服務(wù)器
轉(zhuǎn)載來于:http://www.dlmjj.cn/article/djecojh.html


咨詢
建站咨詢
