본문 바로가기
Linux_etc

Rocky 8.7 Graylog install / 로키 리눅스 8.7 gray log 설치

by west_east_circle 2023. 1. 26.
반응형
sudo dnf install java-11-openjdk-devel

java -version # 자바 설치 버전 확인

cat <<EOF | sudo tee /etc/yum.repos.d/elasticsearch.repo
   [elasticsearch-7.x]
   name=Elasticsearch repository for 7.x packages
   baseurl=https://artifacts.elastic.co/packages/7.x/yum
   gpgcheck=1
   gpgkey=https://artifacts.elastic.co/GPG-KEY-elasticsearch
   enabled=1
   autorefresh=1
   type=rpm-md
   EOF
   #### elasticsearch repo 입력 ###
   
   dnf install -y elasticsearch
   
   vi /etc/elasticsearch/elasticsearch.yml
   # 17번 행 cluster.name  : graylog 이름 변경#
   
   vi /etc/elasticsearch/jvm.options
   #jvm 설정 변경 
   -Xms1g #추가
   -Xmx1g #추가
   
systemctl daemon-reload
systemctl enable --now elasticsearch.service

curl http://127.0.0.1:9200 # graylog 버전 및 정보 확인

#몽고db repo 입력
cat <<EOF | sudo tee /etc/yum.repos.d/mongodb-org-4.repo
   [mongodb-org-4]
   name=MongoDB Repository
   baseurl=https://repo.mongodb.org/yum/redhat/8/mongodb-org/4.4/x86_64/
   gpgcheck=1
   enabled=1
   gpgkey=https://www.mongodb.org/static/pgp/server-4.4.asc
   EOF
   dnf install -y mongodb-org
   systemctl enable --now mongod
   systemctl status mongod
   
   dnf install -y mongodb-org
   systemctl enable --now mongod
   systemctl status mongod
   rpm -Uvh https://packages.graylog2.org/repo/packages/graylog-4.1-reposito                                                                                  ry_latest.rpm
   dnf install -y graylog-server
   rpm -qi graylog-server
   dnf install -y epel-release
   dnf install -y pwgen #패스워드 제네레이터 설치
   pwgen -N 1 -s 96 #N = numerals #S ramdom passwords
   echo -n "Enter Password: " && head -1 </dev/stdin | tr -d '\n' | sha256sum | cut -d" " -f1
   vi /etc/graylog/server/server.conf # password 값 입력 pwgen 값, sha 값 입력
   # 58번행 password=secret 입력 ,61번행 주석 제거 (root_username 항목) ,69번행 root_password_sha2 출력값 입력
   # 105번행 http_bind_address = 설치ip 및 포트 입력
   systemctl daemon-reload
   systemctl start graylog-server
   systemctl enable graylog-server
   systemctl status graylog-server
   firewall-cmd --zone=public --add-port=9000/tcp --permanent

http://설치된 ip:9000 로 접근시 위와 같은 화면 출력

 

 

반응형