当前位置: 首页 > news >正文

网站收录软件南京seo网站管理

网站收录软件,南京seo网站管理,wordpress 动态主题下载,常做网站首页的文件名ELK大家应该很了解了#xff0c;废话不多说开始部署 kafka在其中作为消息队列解耦和让logstash高可用 kafka和zk 的安装可以参考这篇文章 深入理解Kafka3.6.0的核心概念#xff0c;搭建与使用-CSDN博客 第一步、官网下载安装包 需要 elasticsearch-8.10.4 logstash-8.…ELK大家应该很了解了废话不多说开始部署 kafka在其中作为消息队列解耦和让logstash高可用 kafka和zk 的安装可以参考这篇文章 深入理解Kafka3.6.0的核心概念搭建与使用-CSDN博客 第一步、官网下载安装包 需要 elasticsearch-8.10.4 logstash-8.10.4 kibana-8.10.4 kafka_2.13-3.6.0 apache-zookeeper-3.9.1-bin.tar filebeat-8.10.4-linux-x86_64.tar 第二步: 环境配置每一台都做 创建es用户   useradd es 配置主机名、配置IP地址、每台主机配置/etc/hosts名称解析 192.168.1.1 es1 192.168.1.2 es2 192.168.1.3 es3 将Linux系统的软硬限制最大文件数改为65536将所有用户的最大线程数修改为65536 打开/etc/security/limits.conf文件添加以下配置每一台都做 vim  /etc/security/limits.conf* soft nofile 65536 * hard nofile 65536* soft nproc 65536 * hard nproc 65536es hard core unlimited #打开生成Core文件 es soft core unlimited es soft memlock unlimited #允许用户锁定内存 es hard memlock unlimitedsoft xxx : 代表警告的设定可以超过这个设定值但是超过后会有警告。 hard xxx : 代表严格的设定不允许超过这个设定的值。 nproc : 是操作系统级别对每个用户创建的进程数的限制 nofile : 是每个进程可以打开的文件数的限制 soft nproc 单个用户可用的最大进程数量(超过会警告); hard nproc单个用户可用的最大进程数量(超过会报错); soft nofile 可打开的文件描述符的最大数(超过会警告); hard nofile 可打开的文件描述符的最大数(超过会报错);修改/etc/sysctl.conf文件添加下面这行并执行命令sysctl  -p使其生效 vim /etc/sysctl.confvm.max_map_count262144 #限制一个进程可以拥有的VMA(虚拟内存区域)的数量es要求最低65536 net.ipv4.tcp_retries25 #数据重传次数超过 tcp_retries2 会直接放弃重传关闭 TCP 流解压安装包进入config文件夹修改elasticsearch.yml 配置文件  cluster.name: elk #集群名称 node.name: node1 #节点名称 node.roles: [ master,data ] #节点角色 node.attr.rack: r1 #机架位置一般没啥意义这个配置 path.data: /data/esdata path.logs: /data/eslog bootstrap.memory_lock: true #允许锁定内存 network.host: 0.0.0.0 http.max_content_length: 200mb network.tcp.keep_alive: true network.tcp.no_delay: true http.port: 9200 http.cors.enabled: true #允许http跨域访问es_head插件必须开启 http.cors.allow-origin: * #允许http跨域访问es_head插件必须开启 discovery.seed_hosts: [ypd-dmcp-log01, ypd-dmcp-log02] cluster.initial_master_nodes: [ypd-dmcp-log01, ypd-dmcp-log02] xpack.monitoring.collection.enabled: true #添加这个配置以后在kibana中才会显示联机状态否则会显示脱机状态 xpack.security.enabled: true #xpack.security.enrollment.enabled: true xpack.security.http.ssl.enabled: true xpack.security.http.ssl.keystore.path: elastic-certificates.p12 #我把文件都放在config下。所以直接写文件名放在别处需要写路径 xpack.security.http.ssl.truststore.path: elastic-certificates.p12 xpack.security.transport.ssl.enabled: true xpack.security.transport.ssl.verification_mode: certificate xpack.security.transport.ssl.keystore.path: elastic-certificates.p12k xpack.security.transport.ssl.truststore.path: elastic-certificates.p12配置jvm内存大小  修改 jvm.options -Xms6g #你服务器内存的一半最高32G -Xmx6g #你服务器内存的一半最高32G 改好文件夹准备生成相关key 创建ca证书什么也不用输入两次回车即可会在当前目录生成名为elastic-stack-ca.p12的证书文件 bin/elasticsearch-certutil ca 使用之前生成的ca证书创建节点证书过程三次回车会在当前目录生成一个名为elastic-certificates.p12的文件 bin/elasticsearch-certutil cert --ca elastic-stack-ca.p12 生成http证书根据提示信息进行操作主要是下面几步 bin/elasticsearch-certutil httpGenerate a CSR? [y/N]n Use an existing CA? [y/N]y CA Path: /usr/local/elasticsearch-8.10.4/config/certs/elastic-stack-ca.p12 Password for elastic-stack-ca.p12: 直接回车不使用密码 For how long should your certificate be valid? [5y] 50y#过期时间 Generate a certificate per node? [y/N]n Enter all the hostnames that you need, one per line. #输入es的节点 两次回车确认 When you are done, press ENTER once more to move on to the next step. es1 es2 es3You entered the following hostnames.- es1- es2- es3Is this correct [Y/n]yWhen you are done, press ENTER once more to move on to the next step. #输入es的ip 两次回车确认192.168.1.1 192.168.1.2 192.168.1.3You entered the following IP addresses.- 192.168.1.1- 192.168.1.2- 192.168.1.3Is this correct [Y/n]yDo you wish to change any of these options? [y/N]n 接下来一直回车然后会在当前目录生成名为elasticsearch-ssl-http.zip的压缩文件 解压缩http证书文件到config下证书在http文件夹里。名字是http.p12mv出来到config下 确保elasticsearch目录下所有文件的归属关系都是es用户 chown -R es:es /home/es/elasticsearch-8.10.4 启动es su - es #到es用户下 bin/elasticsearch 初次可以前台启动 没问题就放后台 bin/elasticsearch -d 复制整个es文件夹到es2es3 只需要修改 node.name: es2 #节点名称network.host: 192.168.1.2 #节点ipnode.name: es3 #节点名称network.host: 192.168.1.3 #节点ip 浏览器访问一下es的web ui https://192.168.1.1:9200  生成账户密码 bin/elasticsearch-setup-passwords interactivewarning: ignoring JAVA_HOME/usr/local/java/jdk1.8.0_361; using bundled JDK ****************************************************************************** Note: The elasticsearch-setup-passwords tool has been deprecated. This command will be removed in a future release. ******************************************************************************Initiating the setup of passwords for reserved users elastic,apm_system,kibana,kibana_system,logstash_system,beats_system,remote_monitoring_user. You will be prompted to enter passwords as the process progresses. Please confirm that you would like to continue [y/N]yEnter password for [elastic]: Reenter password for [elastic]: Enter password for [apm_system]: Reenter password for [apm_system]: Enter password for [kibana_system]: Reenter password for [kibana_system]: Enter password for [logstash_system]: Reenter password for [logstash_system]: Enter password for [beats_system]: Reenter password for [beats_system]: Enter password for [remote_monitoring_user]: Reenter password for [remote_monitoring_user]: Changed password for user [apm_system] Changed password for user [kibana_system] Changed password for user [kibana] Changed password for user [logstash_system] Changed password for user [beats_system] Changed password for user [remote_monitoring_user] Changed password for user [elastic]这个时候就可以使用账号密码访问了 创建一个给kibana使用的用户 bin/elasticsearch-users useradd kibanauser kibana不能用es超级用户此处展示一下用法 bin/elasticsearch-users roles -a superuser kibanauser 加两个角色 不然没有监控权限 bin/elasticsearch-users roles -a kibana_admin kibanauser bin/elasticsearch-users roles -a monitoring_user kibanauser然后配置kibana 解压然后修改kibana.yml server.port: 5601 server.host: 0.0.0.0server.ssl.enabled: true server.ssl.certificate: /data/elasticsearch-8.10.4/config/client.cer server.ssl.key: /data/elasticsearch-8.10.4/config/client.key elasticsearch.hosts: [https://192.168.1.1:9200] elasticsearch.username: kibanauser elasticsearch.password: kibanauser elasticsearch.ssl.certificate: /data/elasticsearch-8.10.4/config/client.cer elasticsearch.ssl.key: /data/elasticsearch-8.10.4/config/client.key elasticsearch.ssl.certificateAuthorities: [ /data/elasticsearch-8.10.4/config/client-ca.cer ] elasticsearch.ssl.verificationMode: certificate i18n.locale: zh-CN xpack.encryptedSavedObjects.encryptionKey: encryptedSavedObjects1234567890987654321 xpack.security.encryptionKey: encryptionKeysecurity1234567890987654321 xpack.reporting.encryptionKey: encryptionKeyreporting1234567890987654321启动 bin/kibana 访问 https://ip:5601  配置logstash 解压后在conf下创建一个配置文件我取名logstash.conf input {kafka {bootstrap_servers 192.168.1.1:9092group_id logstash_testclient_id 1 #设置相同topic,设置相同groupid,设置不同clientid,实现LogStash多实例并行消费kafkatopics [testlog]consumer_threads 2 #等于 topic分区数codec json { #添加json插件filebeat发过来的是json格式的数据charset UTF-8}decorate_events false #此属性会将当前topic、offset、group、partition等信息也带到message中type testlog #跟topics不重合。因为output读取不了topics这个变量 }} filter {mutate {remove_field version #去掉一些没用的参数remove_field eventremove_field fields} }output {elasticsearch {cacert /data/elasticsearch-8.10.4/config/client-ca.cerssl truessl_certificate_verification falseuser elasticpassword 123456action indexhosts https://192.168.1.1:9200index %{type}-%{YYYY.MM.dd} }}修改jvm.options -Xms6g #你服务器内存的一半最高32G -Xmx6g #你服务器内存的一半最高32G 启动logstash bin/logstash -f conf/logstash.conf 最后去服务器上部署filebeat  filebeat.inputs: - type: filestream 跟以前的log类似。普通的日志选这个就行了id: testlog1 enabled: truepaths:- /var/log/testlog1.logfield_under_root: true #让kafka的topic: %{[fields.log_topic]}取到变量值fields:log_topic: testlog1 #跟id不冲突id输出取不到变量值multiline.pattern: ^\d(4) # 设置多行合并匹配的规则意思就是不以4个连续数字比如2023开头的 视为同一条multiline.negate: true # 如果匹配不上multiline.match: after # 合并到后面- type: filestream id: testlog2enabled: truepaths:- /var/log/testlog2field_under_root: true fields:log_topic: testlog2multiline.pattern: ^\d(4) multiline.negate: truemultiline.match: afterfilebeat.config.modules:path: ${path.config}/modules.d/*.yml reload.enabled: true #开启运行时重载配置#reload.period: 10s path.home: /data/filebeat-8.10.4/ #指明filebeat的文件夹。启动多个时需要 path.data: /data/filebeat-8.10.4/data/ path.logs: /data/filebeat-8.10.4/logs/processors:- drop_fields: #删除不需要显示的字段fields: [agent,event,input,log,type,ecs]output.kafka:enabled: truehosts: [10.8.74.35:9092] #kafka地址可配置多个用逗号隔开topic: %{[fields.log_topic]} #根据上面添加字段发送不同topic 初步的部署这就完成了。后面的使用才是大头路漫漫其修远兮
http://www.tj-hxxt.cn/news/131987.html

相关文章:

  • 建设网站需要的编程招聘网站设计论文
  • 优化公司流程大连优化公司
  • 企业网站建设的开发方式深圳松岗做网站的
  • 网站常用布局黄骅海边旅游景区
  • 之路网站建设温州免费建站
  • 咸宁做网站哪家好WordPress二维码动态
  • 做网站的IT行业商城app开发费用多少钱
  • 自己可以模拟装修app杭州百度首页优化
  • 怎么提升网站的排名淮北网站三合一建设公司
  • 网站建设如何添加咨询免费制作封面网站
  • 网络营销建设网站实训珠海百度seo
  • 动易网站制作教程wordpress文章背景音乐
  • 发布课程的网站模板网站开发接入支付宝
  • 东莞模块网站建设淄博网站制作方案
  • 专门做婚庆的网站有哪些如何建造企业网站
  • 做视频资源网站有哪些类似百度的网站
  • 电商网站建设毕业设计海珠区 网站设计
  • python+网站开发+prf网页设计专业公司
  • wordpress首页搭建烟台优化网站建设
  • ts431p 做网站wordpress 值得买主题
  • 网站维护主要需要会什么做指甲的网站叫什么名字来着
  • 长春网站建设外包wordpress管理员表
  • 柳州做网站优化门户网站后台建设模块
  • 黄金网站大全免费列表主题wordpress
  • 宣城网站 建设网站程序调试模式怎么做
  • 个人设计师的网站wordpress分类下的所有文章加密
  • 沈阳网站建设的公司哪家好池州市建设管理处网站
  • 网站一定要服务器吗wordpress dz 整合
  • 国外怎么做网站柯桥做网站
  • 会网站开发如何自己赚wordpress 设置邮箱