首页 > 系统相关 >graylog5.1安装(Centos7)

graylog5.1安装(Centos7)

时间:2023-07-14 15:46:57浏览次数:44  
标签:sudo opensearch mongodb graylog5.1 Centos7 graylog systemctl org 安装

官网安装地址:https://go2docs.graylog.org/5-1/downloading_and_installing_graylog/red_hat_installation.htm?tocpath=Downloading%20and%20Installing%20Graylog%7CInstalling%20Graylog%7C_____6

一、需要安装的组件

  • OpenJDK 17 (5.0以上版本的graylog已内置,无需安装)
  • OpenSearch 1.x, 2.x (or Elasticsearch 7.10.2)
  • MongoDB 5.x or 6.x

二、安装MongoDB

1、编辑mongodb-org.repo文件

sudo vim /etc/yum.repos.d/mongodb-org.repo

输入以下内容

[mongodb-org-6.0]
name=MongoDB Repository
baseurl=https://repo.mongodb.org/yum/redhat/$releasever/mongodb-org/6.0/x86_64/
gpgcheck=1
enabled=1
gpgkey=https://www.mongodb.org/static/pgp/server-6.0.asc

2、安装mongodb

sudo yum install -y mongodb-org

3、启动mongod服务

sudo systemctl daemon-reload
sudo systemctl enable mongod
sudo systemctl start mongod
sudo systemctl status mongod

三、安装openSearch

1、创建opensearch本地仓库,安装openSearch

sudo curl -SL https://artifacts.opensearch.org/releases/bundle/opensearch/2.x/opensearch-2.x.repo -o /etc/yum.repos.d/opensearch-2.x.repo
sudo yum install -y opensearch

2、编辑mongodb-org.repo文件

sudo vim /etc/opensearch/opensearch.yml

输入以下内容

cluster.name: graylog
node.name: ${HOSTNAME}
path.data: /var/lib/opensearch
path.logs: /var/log/opensearch
discovery.type: single-node
network.host: 0.0.0.0
action.auto_create_index: false
plugins.security.disabled: true

3、编辑jvm.options文件,修改Xms和Xmx的大小为系统内存大小的一半

sudo vim /etc/opensearch/jvm.options

若系统内存大小是8g,则修改为Xms=4g,Xmx=4g

 4、配置运行时内核参数

sudo sysctl -w vm.max_map_count=262144
sudo echo 'vm.max_map_count=262144' >> /etc/sysctl.conf

5、启动openSearch服务

sudo systemctl daemon-reload
sudo systemctl enable opensearch
sudo systemctl start opensearch
sudo systemctl status opensearch

四、安装graylog

1、配置graylog镜像及安装

sudo rpm -Uvh https://packages.graylog2.org/repo/packages/graylog-5.1-repository_latest.rpm
sudo yum install graylog-server

2、生成root_password_sha2密钥

echo -n "Enter Password: " && head -1 </dev/stdin | tr -d '\n' | sha256sum | cut -d" " -f1

3、生成password_secret密钥

< /dev/urandom tr -dc A-Z-a-z-0-9 | head -c${1:-96};echo;

4、编辑/etc/graylog/server/server.conf

修改root_password_sha2、password_secret为2,3步生成的密钥

http_bind_address代表graylog服务的访问ip,默认是127.0.0.1/9000

http_bind_address = xxxip:9000

5、启动graylog服务

sudo systemctl daemon-reload
sudo systemctl enable graylog-server.service
sudo systemctl start graylog-server.service
sudo systemctl --type=service --state=active | grep graylog

 

标签:sudo,opensearch,mongodb,graylog5.1,Centos7,graylog,systemctl,org,安装
From: https://www.cnblogs.com/cdafan/p/17545594.html

相关文章

  • nginx安装
    将nginx源码包下载下来,官网下载地址:http://nginx.org/en/download.html,选择stableverson版本,以nginx-1.18.0为例,材料包中已下载,进入存放nginx-1.18.0.tar.gz源码包的目录,用解压命令解压到当前目录tar-xzvfnginx-1.18.0.tar.gz进入解压后的nginx-1.18.0目录里,使用cofigure......
  • mysql主从安装
    #解压tar-xzvfmysql-8.0.28-el7-x86_64.tar.gz新建文件夹datalogtmp#配置用户mysql并赋权groupaddmysqluseradd-r-gmysqlmysqlchown-Rmysql:mysql/data/nstcapp/mysqlchmod-R755/data/nstcapp/mysqlchmod-R755/data/nstcapp/mysql/datachmod-R7......
  • RabbitMQ集群安装
    rpm-Uvh*.rpm--nodeps--force安装依赖(一步步来)rpm-ivherlang-22.2.1-1.el7.x86_64.rpmrpm-ivhsocat-1.7.3.2-2.el7.x86_64.rpm--nodeps--forcerpm-ivhrabbitmq-server-3.8.3-1.el7.noarch.rpm启动RabbitMQsystemctlstartrabbitmq-serversystemctlrest......
  • Windows 11跳过联网安装
    步骤一:在Windows11安装窗口按下“Shift+F10”快捷键,输入命令 oobe\BypassNRO.cmd 回车执行命令之后,win11电脑就会自动重启,重启之后联网界面就会有一个暂时跳过的选项,可以和以前一样离线配置。  ......
  • ubuntu20.04 配置编译安装nginx的systemctl启动命令
    vim/usr/lib/systemd/system/nginx.service[Unit]Description=nginx-highperformancewebserverAfter=network.targetremote-fs.targetnss-lookup.target[Service]Type=forkin......
  • 裸机安装k8s
    环境准备节点数量:3台虚拟机centos7(virtualbox)硬件配置:2G或更多的RAM,2个CPU或更多的CPU,硬盘至少30G以上网络要求:多个节点之间网络互通,每个节点能访问外网集群规划k8s-node1:192.168.33.10k8s-node2:192.168.33.11k8s-node3:192.168.33.12设置主机名$hostnamec......
  • 用VMware Workstation 17 Pro 安装openEuler及常用工具教程
    安装教程VMwareWorkstation17Pro安装openEuler详细教程安装网卡sudoyuminstallnet-tools安装后,可使用ifconfig命令,查看网络配置信息。安装防火墙打开终端并输入以下命令以安装firewalld软件包:sudoyuminstallfirewalld安装完成后,启动firewalld服务并将其设置......
  • docker安装的metabase存储从h2改成mysql
    1、在mysql创建好数据库和相关用户,并授权CREATEDATABASEmetabase;CREATEUSERmetabase@'172.17.0.0/24'IDENTIFIEDBY'123456';GRANTUSAGEONmetabase.*TO'metabase@'172.17.0.0/24';FLUSHPRIVILEGES; 看一下metabase容器的启动命令,history|grep......
  • centos7部署Vsftpd服务
    安装并开启自启yuminstall-yvsftpdsystemctlenablevsftpd修改配置文件配置文件位置:/etc/vsftpd/vsftpd.conf常用的需要修改以下////默认是允许匿名,需要关闭anonymous_enable=No//启用本地用户,默认是开启,这里不需要修改local_enable=YES//设置本地用户登陆......
  • centos 编译安装 protobuf
    1、安装bazel    wgethttps://copr.fedorainfracloud.org/coprs/vbatts/bazel/repo/epel-7/vbatts-bazel-epel-7.repo--no-check-certificate    cpvbatts-bazel-epel-7.repo/etc/yum.repos.d/    ll/etc/yum.repos.d/    yuminstallbazel4......