https://cloud.tencent.com/developer/article/1552272
ZABBIX SERVER
安装软件包
yum install epel-release -y
yum install git -y
yum install wget git -y
yum install tcpdump wget git -y
yum install htop -y
yum install net-snmp-utils -y
yum install tree -y
yum install net-tools -y
yum install traceroute -y
yum install sysstat -y
timescale db 部署
https://docs.timescale.com/latest/getting-started/installation
https://wiki.postgresql.org/wiki/YUM_Installation
yum install https://download.postgresql.org/pub/repos/yum/11/redhat/rhel-7-x86_64/pgdg-redhat-repo-latest.noarch.rpm -y
yum list postgresql*
yum install postgresql11-server -y
ls -la /var/lib/pgsql/11/data
/usr/pgsql-11/bin/postgresql-11-setup initdb
systemctl enable postgresql-11
systemctl start postgresql-11
Add TimescaleDB's third party repository
tee /etc/yum.repos.d/timescale_timescaledb.repo <<EOL
[timescale_timescaledb]
name=timescale_timescaledb
baseurl=https://packagecloud.io/timescale/timescaledb/el/7/\$basearch
repo_gpgcheck=1
gpgcheck=0
enabled=1
gpgkey=https://packagecloud.io/timescale/timescaledb/gpgkey
sslverify=1
sslcacert=/etc/pki/tls/certs/ca-bundle.crt
metadata_expire=300
EOL
yum update -y
yum install timescaledb-postgresql-11 -y
vi /etc/profile
export PATH=${PATH}:/usr/pgsql-11/bin
systemctl restart postgresql-11
su - postgres
alter user postgres WITH PASSWORD 'thank2you';
as root
vi /var/lib/pgsql/11/data/postgresql.conf
listen_addresses = '*'
port = 5432
vi /var/lib/pgsql/11/data/pg_hba.conf
host all all 0.0.0.0/0 md5
systemctl stop postgresql-11
systemctl start postgresql-11
----------------------------------------------------------
su - postgres
psql
create user zabbix with password 'thank2you';
create database zabbix owner zabbix;
grant all privileges on database zabbix to zabbix;
数据库创建
CREATE EXTENSION IF NOT EXISTS timescaledb CASCADE
\q
注意:ZABBIX Server支持TimescaleDB,Zabbix Proxy不支持TimescaleDB。
### client
yum install https://download.postgresql.org/pub/repos/yum/11/redhat/rhel-7-x86_64/pgdg-redhat-repo-latest.noarch.rpm -y
yum list postgresql*
yum install postgresql11 -y
psql -d zabbix -U zabbix -h 192.168.11.233
\q
配置ZABBIX官方yum数据源(zabbix 4.4 集成nginx rpm 包)
rpm -Uvh https://repo.zabbix.com/zabbix/4.4/rhel/7/x86_64/zabbix-release-4.4-1.el7.noarch.rpm
yum install zabbix-nginx-conf.noarch -y
yum install nginx php php-fpm php-mysql -y
systemctl stop nginx
systemctl start nginx
systemctl enable nginx
为了使Zabbix前端正常工作,必须取消注释和设置listen和server_name指令
vi /etc/nginx/conf.d/zabbix.conf
systemctl stop nginx
systemctl start nginx
systemctl start php-fpm
systemctl enable php-fpm
vi /etc/nginx/nginx.conf
# listen 80 default_server;
# listen [::]:80 default_server;
listen 8080 default_server;
listen [::]:8080 default_server;
systemctl restart nginx
netstat -auntlp |grep -w 80
rpm -Uvh https://repo.zabbix.com/zabbix/4.4/rhel/7/x86_64/zabbix-release-4.4-1.el7.noarch.rpm
yum install zabbix-server-pgsql zabbix-web-pgsql -y
yum install zabbix-get -y
egrep -v "*#|^$" /etc/zabbix/zabbix_server.conf |grep DB
DBHost=192.168.99.221
DBName=zabbix
DBUser=zabbix
DBPassword=zabbixpwd123
DBPort=5432
systemctl start zabbix-server
systemctl enable zabbix-server
psql --help
zcat /usr/share/doc/zabbix-server-pgsql*/create.sql.gz | psql -d zabbix -U zabbix -h 192.168.11.233
zcat /usr/share/doc/zabbix-server-pgsql*/timescaledb.sql.gz | psql -d zabbix -U zabbix -h 192.168.11.233
vi /etc/php-fpm.d/zabbix.conf
php_value[date.timezone] = Asia/Shanghai
systemctl stop zabbix-server
systemctl start zabbix-server
systemctl restart php-fpm
vim /etc/selinux/config
SELINUX=disabled
setenforce 0
reboot
tail -100f /var/log/zabbix/zabbix_server.log
===================
zabbix忘记admin登录密码重置密码
psql -d zabbix -U zabbix -h 192.168.11.233
thank2you
select userid,alias,passwd from users;
echo -n admin | openssl md5
(stdin)= 21232f297a57a5a743894a0e4a801fc3
update users set passwd='21232f297a57a5a743894a0e4a801fc3' where userid = '1';
https://cloud.tencent.com/developer/article/1552272
http://www.hmjblog.com/network/7011.html
https://blog.csdn.net/qq_40907977/article/details/103329970
https://blog.51cto.com/12328206/2428106
安裝 zabbix server 4.4 - 初體驗
最后编辑于 :
©著作权归作者所有,转载或内容合作请联系作者
- 文/潘晓璐 我一进店门,熙熙楼的掌柜王于贵愁眉苦脸地迎上来,“玉大人,你说我怎么就摊上这事。” “怎么了?”我有些...
- 文/花漫 我一把揭开白布。 她就那样静静地躺着,像睡着了一般。 火红的嫁衣衬着肌肤如雪。 梳的纹丝不乱的头发上,一...
- 文/苍兰香墨 我猛地睁开眼,长吁一口气:“原来是场噩梦啊……” “哼!你这毒妇竟也来了?” 一声冷哼从身侧响起,我...