虚拟机两台,一台公网地址为 1.1.1.1,部署 zabbix server,一台公网地址为 1.1.1.2,部署 zabbix proxy,系统为centos7.2。
systemctl start firewalld
systemctl enable firewalld
firewall-cmd --permanent --zone=public --add-rich-rule="rule family="ipv4" source address="1.1.1.2/32" port port="10051" protocol="tcp" accept"
firewall-cmd --permanent --zone=public --add-rich-rule="rule family="ipv4" source address="1.1.1.2/32" port port="123" protocol="udp" accept"
firewall-cmd --reload
setenforce 0
vim /etc/sysconfig/selinux
SELINUX=disabled
rpm -Uvh https://repo.zabbix.com/zabbix/5.0/rhel/7/x86_64/zabbix-release-5.0-1.el7.noarch.rpm
yum clean all
如果出现 curl: (60) The certificate issuer's certificate has expired. Check your system date and time 报错,则需要更新证书
yum install -y ca-certificates
update-ca-trust extract
yum install -y zabbix-server-mysql
yum install -y zabbix-server-pgsql
yum install -y centos-release-scl
vim /etc/yum.repos.d/zabbix.repo
[zabbix-frontend]
enabled=1
yum install -y zabbix-web-mysql-scl zabbix-apache-conf-scl
yum install -y zabbix-web-pgsql-scl zabbix-apache-conf-scl
yum install -y mariadb-server
vim /etc/my.cnf
max_connections = 4096
character-set-server = utf8
systemctl start mariadb
systemctl enable mariadb
mysql_secure_installation 设置root密码为r00tP@ssw0rd
mysql -uroot -p'r00tP@ssw0rd'
mysql> create database zabbix character set utf8 collate utf8_bin;
mysql> create user zabbix@localhost identified by 'z@bbixP@ssw0rd';
mysql> grant all privileges on zabbix.* to zabbix@localhost;
mysql> quit;
zcat /usr/share/doc/zabbix-server-mysql*/create.sql.gz | mysql -uzabbix -p'z@bbixP@ssw0rd' zabbix
yum install -y https://download.postgresql.org/pub/repos/yum/reporpms/EL-7-x86_64/pgdg-redhat-repo-latest.noarch.rpm
yum install -y postgresql14-server
/usr/pgsql-14/bin/postgresql-14-setup initdb
配置
systemctl enable postgresql-14
systemctl start postgresql-14
sudo -u postgres createuser --pwprompt zabbix 设置密码为z@bbixP@ssw0rd
sudo -u postgres createdb -O zabbix zabbix
zcat /usr/share/doc/zabbix-server-pgsql*/create.sql.gz | sudo -u zabbix psql zabbix
tee /etc/yum.repos.d/timescale_timescaledb.repo <<EOL
[timescale_timescaledb]
name=timescale_timescaledb
baseurl=https://packagecloud.io/timescale/timescaledb/el/$(rpm -E %{rhel})/\$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 -y update
yum install -y timescaledb-2-postgresql-14
timescaledb-tune --pg-config=/usr/pgsql-14/bin/pg_config
systemctl restart postgresql-14
sudo -u zabbix psql zabbix
CREATE EXTENSION IF NOT EXISTS timescaledb;
zcat /usr/share/doc/zabbix-server-pgsql*/timescaledb.sql.gz | sudo -u zabbix psql zabbix
修改时区
vim /etc/opt/rh/rh-php72/php-fpm.d/zabbix.conf
php_value[date.timezone] = Asia/Shanghai
修改端口
vim /etc/httpd/conf/httpd.conf
Listen 12345
vim /etc/zabbix/zabbix_server.conf
DBPassword=z@bbixP@ssw0rd
systemctl start zabbix-server httpd rh-php72-php-fpm
systemctl enable zabbix-server httpd rh-php72-php-fpm
访问 http://1.1.1.1:12345/zabbix 按照提示配置,默认密码 Admin/zabbix,立即修改,并限制guest访问
由于agent与server之间时间相差过大容易造成nodata的误告警,强烈建议设置时间同步
yum install –y ntp
vim /etc/ntp.conf
Server ntp.ntsc.ac.cn iburst
systemctl start ntpd
systemctl enable ntpd
检查ntp服务状态
ntpstat
ntpq -p
yum install -y zabbix-agent
systemctl start zabbix-agent
systemctl enable zabbix-agent
systemctl start firewalld
systemctl enable firewalld
firewall-cmd --permanent --zone=public --add-rich-rule="rule family="ipv4" source address="1.1.1.1/32" port port="10050" protocol="tcp" accept"
firewall-cmd --reload
setenforce 0
vim /etc/sysconfig/selinux
SELINUX=disabled
vim /etc/chrony.conf
server 1.1.1.1 iburst
systemctl start chronyd
rpm -ivh https://repo.zabbix.com/zabbix/5.0/rhel/7/x86_64/zabbix-release-5.0-1.el7.noarch.rpm
yum-config-manager --enable rhel-7-server-optional-rpms
yum install -y zabbix-proxy-mysql
如果出现 curl: (60) The certificate issuer's certificate has expired. Check your system date and time 报错,则需要更新证书
yum install -y ca-certificates
update-ca-trust extract
yum install -y mariadb-server
vim /etc/my.cnf
max_connections = 4096
systemctl start mariadb
systemctl enable mariadb
mysql_secure_installation 设置root密码为r00tP@ssw0rd
mysql -uroot -p'r00tP@ssw0rd'
mysql> create database zabbix_proxy character set utf8 collate utf8_bin;
mysql> create user zabbix@localhost identified by 'z@bbixP@ssw0rd';
mysql> grant all privileges on zabbix_proxy.* to zabbix@localhost;
mysql> quit;
zcat /usr/share/doc/zabbix-proxy-mysql*/schema.sql.gz | mysql -uzabbix -p'z@bbixP@ssw0rd' zabbix_proxy
web配置
vim /etc/zabbix/zabbix_proxy.conf
Server=1.1.1.1
Hostname=ZabbixProxy01
DBPassword=z@bbixP@ssw0rd
systemctl start zabbix-proxy
systemctl enable zabbix-proxy
web配置
yum install -y zabbix-agent
vim /etc/zabbix/zabbix_agentd.conf
Hostname=ZabbixProxy01
Server=1.1.1.1
systemctl start zabbix-agent
systemctl enable zabbix-agent
我正在玩HTML5视频并且在ERB中有以下片段:mp4视频从在我的开发环境中运行的服务器很好地流式传输到chrome。然而firefox显示带有海报图像的视频播放器,但带有一个大X。问题似乎是mongrel不确定ogv扩展的mime类型,并且只返回text/plain,如curl所示:$curl-Ihttp://0.0.0.0:3000/pr6.ogvHTTP/1.1200OKConnection:closeDate:Mon,19Apr201012:33:50GMTLast-Modified:Sun,18Apr201012:46:07GMTContent-Type:text/plain
之前在培训新生的时候,windows环境下配置opencv环境一直教的都是网上主流的vsstudio配置属性表,但是这个似乎对新生来说难度略高(虽然个人觉得完全是他们自己的问题),加之暑假之后对cmake实在是爱不释手,且这样配置确实十分简单(其实都不需要配置),故斗胆妄言vscode下配置CV之法。其实极为简单,图比较多所以很长。如果你看此文还配不好,你应该思考一下是不是自己的问题。闲话少说,直接开始。0.CMkae简介有的人到大二了都不知道cmake是什么,我不说是谁。CMake是一个开源免费并且跨平台的构建工具,可以用简单的语句来描述所有平台的编译过程。它能够根据当前所在平台输出对应的m
我试图在rails中了解rubygems是如何变得可以自动使用的,而不是在使用required的文件中gem? 最佳答案 这是通过bundler/setup完成的:http://bundler.io/v1.3/bundler_setup.html.它在您的config/boot.rb文件中是必需的。简而言之,它首先将环境变量设置为指向您的Gemfile:ENV['BUNDLE_GEMFILE']||=File.expand_path('../../Gemfile',__FILE__)然后它通过要求bundler/setup将所有ge
从一开始,我就是一个Windows高手。我从MS-DOS开始。我安装了Windows2.1以及此后的所有Windows。现在,我家里有10台不同的Windows机器在运行,从Windows7Ultimate到各种版本的WindowsServer。我还没有完成Windows8,也不想去那里。我在服务器和各种软件方面都有UNIX经验,但它并不是我的首选环境。但是,我想我正在转换。我试图假装使用Cygwin和MSYS在Windows下运行UNIX。我的目的是搭建一个开发环境。两者都让我失望了。我花了比开发更多的时间来解决一系列技术问题。这是NotAcceptable。到目前为止,我的Ruby
如果特定语言环境中缺少翻译,如何配置i18n以使用en语言环境翻译?当前已插入翻译缺失消息。我正在使用RoR3.1。 最佳答案 找到相似的question这里是答案:#application.rb#railswillfallbacktoconfig.i18n.default_localetranslationconfig.i18n.fallbacks=true#railswillfallbacktoen,nomatterwhatissetasconfig.i18n.default_localeconfig.i18n.fallback
我给自己买了一个新的8gigUSBkey,我正在寻找一个合适的解决方案来拥有一个可移植RoR环境来学习。我在谷歌上搜索了一下,发现了一些可能性,但我很想听听一些现实生活中的经历和意见。谢谢! 最佳答案 我喜欢InstantRails,非常容易使用,无需安装程序,也不会修改您的系统环境。 关于ruby-on-rails-可移植RubyonRails环境,我们在StackOverflow上找到一个类似的问题: https://stackoverflow.com/q
在我的双语Rails4应用程序中,我有一个像这样的LocalesController:classLocalesController用户可以通过此表单更改其语言环境:deflocale_switcherform_tagurl_for(:controller=>'locales',:action=>'change_locale'),:method=>'get',:id=>'locale_switcher'doselect_tag'set_locale',options_for_select(LANGUAGES,I18n.locale.to_s)end这有效。但是,目前用户无法通过URL更改
我在跑Fastlane(适用于iOS的持续构建工具)以执行用于解密文件的自定义shell脚本。这是命令。sh"./decrypt.shENV['ENCRYPTION_P12']"我想不出将环境变量传递给该脚本的方法。显然,如果我将密码硬编码到脚本中,它就可以正常工作。sh"./decrypt.shmypwd"有什么建议吗? 最佳答案 从直接Shell中扩展假设这里的sh是一个faSTLane命令,它以给定的参数作为脚本文本调用shell命令:#asafastlanedirectivesh'./decrypt.sh"$ENCRYPTI
文章目录1.自动驾驶实战:基于Paddle3D的点云障碍物检测1.1环境信息1.2准备点云数据1.3安装Paddle3D1.4模型训练1.5模型评估1.6模型导出1.7模型部署效果附录show_lidar_pred_on_image.py1.自动驾驶实战:基于Paddle3D的点云障碍物检测项目地址——自动驾驶实战:基于Paddle3D的点云障碍物检测课程地址——自动驾驶感知系统揭秘1.1环境信息硬件信息CPU:2核AI加速卡:v100总显存:16GB总内存:16GB总硬盘:100GB环境配置Python:3.7.4框架信息框架版本:PaddlePaddle2.4.0(项目默认框架版本为2.3
我有一个应用程序专门使用Facebook作为身份验证提供程序,并正确设置了生产模式的回调。为了让它工作,您需要为您的Facebook应用程序提供一个站点URL和一个用于回调的站点域,在我的例子中是http://appname.heroku.com和appname。heroku.com分别。问题是我的Controller设置为只允许经过身份验证的session,所以我无法在开发模式下查看我的应用程序,因为Facebook应用程序的域显然没有设置为本地主机。如何在不更改Facebook设置的情况下解决这个问题? 最佳答案 创建另一个域l