安裝 zabbix server 4.4 - 初體驗(yàn)

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;

數(shù)據(jù)庫創(chuàng)建
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官方y(tǒng)um數(shù)據(jù)源(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前端正常工作,必須取消注釋和設(shè)置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









最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時請結(jié)合常識與多方信息審慎甄別。
平臺聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點(diǎn),簡書系信息發(fā)布平臺,僅提供信息存儲服務(wù)。

相關(guān)閱讀更多精彩內(nèi)容

  • 第一次全程戴著口罩,舉行招聘的海選會。原本關(guān)注「人臉」就得耗費(fèi)心神的招聘,加上了2/3的覆蓋面積,只能從「眼睛」挖...
    如識我聞閱讀 317評論 0 2
  • 今天分享一下在臺灣醫(yī)院做全身體檢的體驗(yàn)。體檢內(nèi)容涵蓋基礎(chǔ)的全身體檢(血常規(guī)、尿常規(guī)、身高體重體脂肪、胸透、關(guān)鍵部位...
    羅安妮annie閱讀 937評論 1 1
  • 人總要記錄一下生活的,在有幸過上生活的時候,畢竟大部分時間都在為生存而奮鬥。 入行四年第一次出差,居然如此休閑。慢...
    卓明杰Alan閱讀 267評論 0 0
  • 參加香港臨床心理學(xué)家、註冊藝術(shù)治療師、心理創(chuàng)傷專家及培訓(xùn)師、澳洲創(chuàng)造性藝術(shù)治療協(xié)會(ACATA)亞洲區(qū)代表黃曉紅博...
    秋韻無聲閱讀 2,496評論 0 2
  • 肉體到意志肌肉到精神;汗水流進(jìn)心臟呼吸融入靈魂;感受舒暢與堅(jiān)韌。
    JoJoJoJoey閱讀 298評論 0 0

友情鏈接更多精彩內(nèi)容