CENTOS安装 graylog5.0

我们直接开始 

CENTOS安装 graylog5.0_第1张图片

 

  • 基础环境和java
sudo yum install epel-release 
并安装带有
sudo yum install pwgen
 
yum install java-1.8.0-openjdk-headless.x86_64
  • MONGODB 安装数据库 6.0

[mongodb-org-6.0]
name=MongoDB Repository
baseurl=https://repo.mongodb.org/yum/redhat/$releasever/mongodb-org/6.0/$basearch/
gpgcheck=1
enabled=1
gpgkey=https://www.mongodb.org/static/pgp/server-6.0.asc
  • 安装数据库
sudo yum install -y mongodb-org
##启动并允许开启自启
sudo systemctl daemon-reload
sudo systemctl enable mongod
sudo systemctl start mongod
sudo systemctl status mongod
  • 安装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
  • 配置文件根据情况调整/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
  • 在运行时配置内核参数:
sudo sysctl -w vm.max_map_count=262144
sudo echo 'vm.max_map_count=262144' >> /etc/sysctl.conf
  • 可以启动了
sudo systemctl daemon-reload
sudo systemctl enable opensearch
sudo systemctl start opensearch
sudo systemctl status opensearch

你可能感兴趣的:(graylog,mongodb,数据库)