JIYIK CN >

Current Location:Home > Learning > OPERATING SYSTEM >

How to install GrayLog on centos

Author:JIYIK Last Updated:2025/04/06 Views:

Installing Graylog on CentOS requires the following steps:

1. Add EPEL and MongoDB repositories:

sudo yum install epel-release -y
sudo rpm -Uvh https://repo.mongodb.org/yum/redhat/7/mongodb-org/4.4/x86_64/RPMS/mongodb-org-server-4.4.4-1.el7.x86_64.rpm
sudo rpm -Uvh https://repo.mongodb.org/yum/redhat/7/mongodb-org/4.4/x86_64/RPMS/mongodb-org-shell-4.4.4-1.el7.x86_64.rpm
sudo rpm -Uvh https://repo.mongodb.org/yum/redhat/7/mongodb-org/4.4/x86_64/RPMS/mongodb-org-mongos-4.4.4-1.el7.x86_64.rpm
sudo rpm -Uvh https://repo.mongodb.org/yum/redhat/7/mongodb-org-tools-4.4.4-1.el7.x86_64.rpm
sudo systemctl enable mongod && sudo systemctl start mongod

2. Add Graylog warehouse:

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

3. Edit the Graylog configuration file /etc/graylog/server/server.conf and set the following parameters to the correct values:

password_secret = <password_secret>
root_password_sha2 = <root_password_sha2>
rest_listen_uri = http://<server_ip>:9000/api/
web_listen_uri = http://<server_ip>:9000/

Where, <password_secret>should be a random string, <root_password_sha2>should be the hashed value of the root user's password. <server_ip>is our server IP address.

4. Start the Graylog service and enable boot:

sudo systemctl enable graylog-server
sudo systemctl start graylog-server

Use your browser to access http://<server_ip>:9000/, log in as the root user and start using Graylog.

The above are the basic steps to install Graylog on CentOS.

Please note that before installing and configuring Graylog, you also need to meet some prerequisites, such as the installation and configuration of Java and Elasticsearch .

This is because the core component of Graylog needs to use Elasticsearch as its data storage backend. Graylog's log data is sent to the Graylog server via the GELF (Graylog Extended Log Format) protocol, and the Graylog server stores the data in Elasticsearch and searches and analyzes it on the web interface.

Therefore, if we want to use Graylog for log management and analysis, we need to install Elasticsearch and configure it with Graylog. As the data storage backend of Graylog, Elasticsearch provides fast search and analysis performance, while Graylog provides a powerful web interface for searching, filtering, and visualizing data stored in Elasticsearch.

For reprinting, please send an email to 1244347461@qq.com for approval. After obtaining the author's consent, kindly include the source as a link.

Article URL:

Related Articles

Restart PostgreSQL in Ubuntu 18.04

Publish Date:2025/04/09 Views:72 Category:PostgreSQL

This short article shows how to restart PostgreSQL in Ubuntu. Restart PostgreSQL Server in Ubuntu You can restart Postgres server in Ubuntu using the following command. Order: sudo service postgres restart Sometimes the above command does n

Issues to note when installing Apache on Linux

Publish Date:2025/04/08 Views:78 Category:OPERATING SYSTEM

As the most commonly used web server, Apache can be used in most computer operating systems. As a free and open source Unix-like operating system, Linux and Apache are a golden pair. This article will introduce the installation and use of A

How to decompress x.tar.xz format files under Linux

Publish Date:2025/04/08 Views:186 Category:OPERATING SYSTEM

A lot of software found today is in the tar.xz format, which is a lossless data compression file format that uses the LZMA compression algorithm. Like gzip and bzip2, it supports multiple file compression, but the convention is not to compr

Summary of vim common commands

Publish Date:2025/04/08 Views:115 Category:OPERATING SYSTEM

In Linux, the best editor should be vim. However, the complex commands behind vim's powerful functions also make us daunted. Of course, these commands do not need to be memorized by rote. As long as you practice using vim more, you can reme

Detailed explanation of command return value $? in Linux

Publish Date:2025/04/08 Views:58 Category:OPERATING SYSTEM

? is a special variable. This variable represents the return value of the previous command. That is to say, when we run certain commands, these commands will return a code after running. Generally, if the command is successfully run, the re

Common judgment formulas for Linux script shell

Publish Date:2025/04/08 Views:159 Category:OPERATING SYSTEM

In shell script programming, predicates are often used. There are two ways to use predicates, one is to use test, and the other is to use []. Let's take a look at how to use these two methods through two simple examples. Example 1 # test –

Scan to Read All Tech Tutorials

Social Media
  • https://www.github.com/onmpw
  • qq:1244347461

Recommended

Tags

Scan the Code
Easier Access Tutorial