Download as txt, pdf, or txt
Download as txt, pdf, or txt
You are on page 1of 3

https://www.itzgeek.

com/how-tos/linux/centos-how-tos/how-to-install-graylog-on-
centos-7-rhel-7.html

[root@amrelisteels ~]# yum install -y java-1.8.0-openjdk-headless

[root@amrelisteels ~]# java -version


openjdk version "1.8.0_242"
OpenJDK Runtime Environment (build 1.8.0_242-b08)
OpenJDK 64-Bit Server VM (build 25.242-b08, mixed mode)
[root@amrelisteels ~]#

[root@amrelisteels ~]# rpm --import https://artifacts.elastic.co/GPG-KEY-


elasticsearch
[root@amrelisteels ~]# vi /etc/yum.repos.d/elasticsearch.repo

[elasticsearch-6.x]
name=Elasticsearch repository for 6.x packages
baseurl=https://artifacts.elastic.co/packages/6.x/yum
gpgcheck=1
gpgkey=https://artifacts.elastic.co/GPG-KEY-elasticsearch
enabled=1
autorefresh=1
type=rpm-md

[root@amrelisteels ~]# yum install -y elasticsearch

[root@amrelisteels ~]# systemctl daemon-reload


[root@amrelisteels ~]# systemctl enable elasticsearch
Created symlink from /etc/systemd/system/multi-
user.target.wants/elasticsearch.service to
/usr/lib/systemd/system/elasticsearch.service.
[root@amrelisteels ~]#
[root@amrelisteels ~]# vi /etc/elasticsearch/elasticsearch.yml
cluster.name: graylog

[root@amrelisteels ~]# systemctl restart elasticsearch


[root@amrelisteels ~]# curl -X GET http://localhost:9200
curl: (7) Failed connect to localhost:9200; Connection refused
[root@amrelisteels ~]# curl -X GET http://localhost:9200
{
"name" : "AlEf3JW",
"cluster_name" : "graylog",
"cluster_uuid" : "UlTb40-yQVW1_CMm4iFggQ",
"version" : {
"number" : "6.8.7",
"build_flavor" : "default",
"build_type" : "rpm",
"build_hash" : "c63e621",
"build_date" : "2020-02-26T14:38:01.193138Z",
"build_snapshot" : false,
"lucene_version" : "7.7.2",
"minimum_wire_compatibility_version" : "5.6.0",
"minimum_index_compatibility_version" : "5.0.0"
},
"tagline" : "You Know, for Search"
}
[root@amrelisteels ~]#
[root@amrelisteels ~]# curl -XGET 'http://localhost:9200/_cluster/health?
pretty=true'
{
"cluster_name" : "graylog",
"status" : "green",
"timed_out" : false,
"number_of_nodes" : 1,
"number_of_data_nodes" : 1,
"active_primary_shards" : 0,
"active_shards" : 0,
"relocating_shards" : 0,
"initializing_shards" : 0,
"unassigned_shards" : 0,
"delayed_unassigned_shards" : 0,
"number_of_pending_tasks" : 0,
"number_of_in_flight_fetch" : 0,
"task_max_waiting_in_queue_millis" : 0,
"active_shards_percent_as_number" : 100.0
}
[root@amrelisteels ~]#

[root@amrelisteels ~]# vi /etc/yum.repos.d/mongodb-org-4.0.repo

[root@amrelisteels ~]# yum install -y mongodb-org

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

[root@amrelisteels ~]# systemctl start mongod


[root@amrelisteels ~]# systemctl enable mongod
[root@amrelisteels ~]#
[root@amrelisteels ~]# rpm -Uvh
https://packages.graylog2.org/repo/packages/graylog-3.0-repository_latest.rpm
Retrieving https://packages.graylog2.org/repo/packages/graylog-3.0-
repository_latest.rpm
Preparing... ################################# [100%]
Updating / installing...
1:graylog-3.0-repository-1-6 ################################# [100%]
[root@amrelisteels ~]#
[root@amrelisteels ~]# yum -y install graylog-server

[root@amrelisteels ~]# pwgen -N 1 -s 96


bash: pwgen: command not found...
[root@amrelisteels ~]# yum -y install wget pwgen

[root@amrelisteels ~]# yum install epel-release


[root@amrelisteels ~]# yum install pwgen

4BUBOAbprE6KDnkVHuFENkqHXW6WesjIegJwVMbiFmdZpYtkoL9zLSyLRD8EPCN3xtxsbZfUj7KFpEgf8QW
oE9tTt9BUM3wo

# echo -n admin | sha256sum


[root@amrelisteels ~]# echo -n admin | sha256sum
8c6976e5b5410415bde908bd4dee15dfb167a9c873fc4bb8a81f6f2ab448a918 -

[root@amrelisteels ~]# vi /etc/graylog/server/server.conf


[root@amrelisteels ~]# vi /etc/graylog/server/server.conf
[root@amrelisteels ~]# cd /etc/graylog/server/
[root@amrelisteels server]# ls
log4j2.xml node-id server.conf
[root@amrelisteels server]# cp server.conf server.conf.bkp
[root@amrelisteels server]#

You might also like