2
This commit is contained in:
parent
79aea6bf40
commit
5b90ae9e05
@ -3,7 +3,11 @@
|
|||||||
CONFIG_FILE="/etc/opensearch/opensearch.yml"
|
CONFIG_FILE="/etc/opensearch/opensearch.yml"
|
||||||
|
|
||||||
grep 'discovery.type: single-node' "${CONFIG_FILE}" || \
|
grep 'discovery.type: single-node' "${CONFIG_FILE}" || \
|
||||||
echo "discovery.type: single-node" >> "${CONFIG_FILE}"
|
cat >> "${CONFIG_FILE}" <<EOF
|
||||||
|
discovery.type: single-node
|
||||||
|
action.auto_create_index: false
|
||||||
|
plugins.security.disabled: true
|
||||||
|
EOF
|
||||||
|
|
||||||
sed -i -e "s@^#cluster.name:.*@cluster.name: graylog@g" \
|
sed -i -e "s@^#cluster.name:.*@cluster.name: graylog@g" \
|
||||||
-e "s@^cluster.name:.*@cluster.name: graylog@g" \
|
-e "s@^cluster.name:.*@cluster.name: graylog@g" \
|
||||||
|
@ -2,5 +2,5 @@
|
|||||||
|
|
||||||
systemctl daemon-reload
|
systemctl daemon-reload
|
||||||
systemctl enable opensearch.service
|
systemctl enable opensearch.service
|
||||||
systemctl start opensearch.service
|
systemctl restart opensearch.service
|
||||||
systemctl status opensearch.service --no-pager
|
systemctl status opensearch.service --no-pager
|
||||||
|
@ -8,5 +8,5 @@ echo "deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu $(lsb_release
|
|||||||
|
|
||||||
apt update && apt install mongodb-org -y
|
apt update && apt install mongodb-org -y
|
||||||
|
|
||||||
systemctl start mongod
|
systemctl restart mongod
|
||||||
systemctl enable mongod
|
systemctl enable mongod
|
||||||
|
18
0055-configure-graylog.sh
Executable file
18
0055-configure-graylog.sh
Executable file
@ -0,0 +1,18 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
CONFIG_FILE="/etc/graylog/server/server.conf"
|
||||||
|
|
||||||
|
RANDOM_PW=$(pwgen -N 1 -s 96)
|
||||||
|
|
||||||
|
sed -i -e "s@^password_secret =.*@password_secret = ${RANDOM_PW}@g" \
|
||||||
|
-e "s@^#http_bind_address = 127.0.0.1:9000@http_bind_address = 0.0.0.0:9000@g" \
|
||||||
|
-e "s@^http_bind_address = .*@http_bind_address = 0.0.0.0:9000@g" \
|
||||||
|
-e "s@^root_password_sha2 =.*@root_password_sha2 = 8c6976e5b5410415bde908bd4dee15dfb167a9c873fc4bb8a81f6f2ab448a918@" \
|
||||||
|
-e "s@^#elasticsearch_hosts =.*@elasticsearch_hosts = http://127.0.0.1:9200@g" \
|
||||||
|
-e "s@^elasticsearch_hosts =.*@elasticsearch_hosts = http://127.0.0.1:9200@g" \
|
||||||
|
"${CONFIG_FILE}"
|
||||||
|
|
||||||
|
|
||||||
|
systemctl daemon-reload
|
||||||
|
systemctl restart graylog-server
|
||||||
|
systemctl enable graylog-server
|
7
Makefile
7
Makefile
@ -11,8 +11,15 @@ configure-opensearch:
|
|||||||
bash 0015-configure-opensearch.sh
|
bash 0015-configure-opensearch.sh
|
||||||
bash 0019-enable-opensearch.sh
|
bash 0019-enable-opensearch.sh
|
||||||
|
|
||||||
|
test-opensearch:
|
||||||
|
curl -X GET http://localhost:9200
|
||||||
|
|
||||||
|
|
||||||
install-mongodb:
|
install-mongodb:
|
||||||
bash 0020-install-mongodb.sh
|
bash 0020-install-mongodb.sh
|
||||||
|
|
||||||
install-graylog:
|
install-graylog:
|
||||||
bash 0050-install-graylog.sh
|
bash 0050-install-graylog.sh
|
||||||
|
|
||||||
|
configure-graylog:
|
||||||
|
bash 0055-configure-graylog.sh
|
||||||
|
Loading…
Reference in New Issue
Block a user