Ubuntu20.04安装zabbix以及Cannot create the configuration file解决
生活随笔
收集整理的這篇文章主要介紹了
Ubuntu20.04安装zabbix以及Cannot create the configuration file解决
小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.
添加zabbix的擴展源
echo 'deb http://mirrors.aliyun.com/zabbix/zabbix/5.0/ubuntu/dists/ focal main' >> /etc/apt/sources.list
echo 'deb-src http://mirrors.aliyun.com/zabbix/zabbix/5.0/ubuntu/dists/ focal main' >> /etc/apt/sources.list
apt update
安裝zabbix服務(wù)相關(guān)包
apt install zabbix-server-mysql zabbix-frontend-php zabbix-apache-conf zabbix-agent
安裝mysql
apt install -y mysql-server
初始化數(shù)據(jù)庫
mysql_secure_installation
創(chuàng)建zabbix用戶并授權(quán)
mysql -uroot -p
Enter password:create database zabbix character set utf8 collate utf8_bin;
create user zabbix@192.168.1.103 identified by 'zabbix';
grant all privileges on zabbix.* to zabbix@192.168.1.103;
更改mysql配置文件
vim /etc/mysql/mysql.conf.d/mysqld.cnf
bind-address = 192.168.1.103
mysqlx-bind-address = 192.168.1.103systemctl restart mysql.service
導(dǎo)入數(shù)據(jù)表結(jié)構(gòu)
zcat /usr/share/doc/zabbix-server-mysql/create.sql.gz |mysql -uzabbix -pzabbix -h192.168.1.103 -Dzabbix
編輯zabbix_server
vim /etc/zabbix/zabbix_server.conf
DBHost=192.168.1.103
DBPassword=zabbix
編輯apache配置文件
vim /etc/zabbix/apache.conf
php_value date.timezone Asia/Shanghai
修改web文件夾權(quán)限防止Cannot create the configuration file.錯誤
chmod 777 /usr/share/zabbix/conf
配置zabbix-agent
Server=192.168.1.103 被動模式
ServerActive=192.168.1.103 主動模式
vim /etc/zabbix/zabbix_agentd.conf
Server=192.168.1.103
ServerActive=192.168.1.103
Hostname=zabbix
systemctl restart zabbix-agent
重啟服務(wù)
systemctl restart zabbix-server zabbix-agent apache2systemctl enable zabbix-server zabbix-agent apache2
安裝中文語言包
apt-get -y install language-pack-zh-hant language-pack-zh-hans
感謝:博主Professorboy,借鑒博主Professorboy
打開瀏覽器配置zabbix
點擊用戶設(shè)置修改語言
總結(jié)
以上是生活随笔為你收集整理的Ubuntu20.04安装zabbix以及Cannot create the configuration file解决的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: Ubuntu更换阿里源以及由于没有公钥,
- 下一篇: Ubuntu使用wget下载zabbix