Adjustments, apt key and repo line fixes. Added OpenSearch service parameters.
This commit is contained in:
@ -14,9 +14,8 @@ echo "Installing dependencies..."
|
||||
# Install prerequisites for Graylog, OpenSearch, and MongoDB
|
||||
apt install -y apt-transport-https openjdk-11-jre-headless uuid-runtime pwgen wget gnupg
|
||||
|
||||
# Function to check if the system meets the minimum requirements for Graylog
|
||||
check_system_requirements() {
|
||||
echo "Checking system requirements for Graylog..."
|
||||
echo "Checking the minimum system requirements for Graylog..."1
|
||||
|
||||
# Minimum required RAM (in MB)
|
||||
minimum_ram=4096
|
||||
@ -60,8 +59,8 @@ echo "vm.max_map_count=262144" >> /etc/sysctl.conf
|
||||
|
||||
# Add the OpenSearch repository and its GPG key
|
||||
echo "Adding OpenSearch repository..."
|
||||
wget -qO - https://d3g5vo6xdbdb9a.cloudfront.net/GPG-KEY-opensearch | apt-key add -
|
||||
echo "deb https://d3g5vo6xdbdb9a.cloudfront.net/debian stable main" | tee /etc/apt/sources.list.d/opensearch.list
|
||||
curl -o- https://artifacts.opensearch.org/publickeys/opensearch.pgp | gpg --dearmor --batch --yes -o /usr/share/keyrings/opensearch-keyring
|
||||
echo "deb [signed-by=/usr/share/keyrings/opensearch-keyring] https://artifacts.opensearch.org/releases/bundle/opensearch/2.x/apt stable main" | tee /etc/apt/sources.list.d/opensearch-2.x.list
|
||||
|
||||
# Add the MongoDB repository
|
||||
echo "Adding MongoDB repository..."
|
||||
@ -101,6 +100,11 @@ chown -R opensearch:opensearch /var/log/opensearch
|
||||
chmod -R 2750 /graylog/opensearch/
|
||||
chmod -R 2750 /var/log/opensearch/
|
||||
|
||||
# Add OpenSearch service and set it to start automatically
|
||||
echo "Adding OpenSearch service and enabling autostart..."
|
||||
systemctl enable opensearch
|
||||
systemctl start opensearch
|
||||
|
||||
#Install MongoDB
|
||||
echo "Installing MongoDB"
|
||||
sudo apt install -y MongoDB
|
||||
|
@ -1,3 +1,9 @@
|
||||
# Requirements:
|
||||
|
||||
This script makes no additional requirments other than the following. The script will automatically install all dependencies and make the additional required system modifications.
|
||||
|
||||
# Installation:
|
||||
|
||||
To run this script:
|
||||
|
||||
1. Use wget to grab the latest version:
|
||||
@ -6,10 +12,40 @@ To run this script:
|
||||
|
||||
2. CHMOD the script to make it executable:
|
||||
|
||||
`chmod +x install.sh`
|
||||
`sudo chmod +x install.sh`
|
||||
|
||||
3. Run the script:
|
||||
|
||||
`./install.sh`
|
||||
`sudo ./install.sh`
|
||||
|
||||
# Script Process:
|
||||
|
||||
This script makes the following checks (in order):
|
||||
|
||||
Checks the script is being run as root.
|
||||
|
||||
Installs required dependencies.
|
||||
|
||||
Checks the system meets the minimum system requirements.
|
||||
|
||||
Disables Huge Pages Support if Enabled (OpenSearch).
|
||||
|
||||
Sets Maximum File Count (OpenSearch).
|
||||
|
||||
Adds all required respitory keys & Updates the package index.
|
||||
|
||||
Adds the OpenSearch user.
|
||||
|
||||
Installs OpenSearch.
|
||||
|
||||
Creates required OpenSearch directories & log file. Ensures their permissions.
|
||||
|
||||
Installs MongoDB.
|
||||
|
||||
Installs Graylog
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user