Centos 安装 graylog

安装文档

安装nginx做反向代理 (如果生产环境通过端口管理则用不到)

通过yum安装方便以后升级

yum install nginx 

chkconfig nginx on

service nginx start 

安装mogodb Amazon centos中本身没有mogodb的源

需要去文档上找到yum源对应url添加到yum.repos.d

示例

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

写入

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

执行安装

yum install mongodb-org
chkconfig mongod on
service mongod start

安装elasticsearch

导入gpg-key

rpm --import https://artifacts.elastic.co/GPG-KEY-elasticsearch

添加elasticsearch yum源

vim /etc/yum.repos.d/elasticsearch.repo

写入

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

yum install elasticsearch

将elasticsearch cluster.name 设置为 graylog

vim /etc/elasticsearch/elasticsearch.yml 

修改

cluster.name: graylog

启动

sudo chkconfig --add elasticsearch
service elasticsearch start 

安装graylog

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

修改配置 root_password_sha2 为登录密码 由 echo -n yourpassword | shasum -a 256 生成

root_password_sha2 按照示例子 登录url: http://...:9000/ 用户名:admin 密码:admin

vim /etc/graylog/server/server.conf

修改

password_secret = hjg5nBbZQcgLVW3do5uw1irfbq9UiRwhISZgPie8r96dejt4hgWdHUJcIaK1onQfFFatbrPZ3WV4yEhoqX9ITtaEUmn9SKn2aRT62uCO9KRZGK81q2xrO1aMQnOELPqP
root_password_sha2 = 8c6976e5b5410415bde908bd4dee15dfb167a9c873fc4bb8a81f6f2ab448a918
root_timezone = Asia/Shanghai
rest_listen_uri =  http://***.***.***.***:9000/api/
web_listen_uri = http://***.***.***.***:9000/

启动服务

sudo chkconfig --add graylog-server
service graylog-server start

你可能感兴趣的:(Centos 安装 graylog)