This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -e | |
# Update-ovanje i upgrade-ovanje servera | |
sudo apt update # && sudo apt upgrade -y | |
# Kreiranje novog korisnika i dodavanje tog korisnika u sudo grupu | |
adduser worker | |
usermod -aG sudo worker |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKCPJ3UWYxZKO8ZAAIcqJSwNzuK3Sg6rlr35rjRnkGaO rubyci.prod |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo apt install make gcc dirmngr gpg curl gawk zlib1g-dev libssl-dev unzip | |
sudo apt-get install autoconf bison patch build-essential rustc libssl-dev libyaml-dev libreadline6-dev zlib1g-dev libgmp-dev libncurses5-dev libffi-dev libgdbm6 libgdbm-dev libdb-dev uuid-dev | |
wget https://www.openssl.org/source/openssl-1.1.1g.tar.gz | |
tar zxvf openssl-1.1.1g.tar.gz | |
cd openssl-1.1.1g/ | |
./config --prefix=$HOME/.openssl/openssl-1.1.1g --openssldir=$HOME/.openssl/openssl-1.1.1g | |
make install | |
rm -rf ~/.openssl/openssl-1.1.1g/certs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#Preuzimanje i instalacija dependency-a | |
echo "Preuzimanje i instalacija dependency-a..." | |
sudo DEBIAN_FRONTEND=noninteractive apt-get update | |
sudo DEBIAN_FRONTEND=noninteractive apt-get install -y curl git-core gdebi-core gdebi rar unrar gnupg2 vim qtbase5-dev qtchooser qt5-qmake qtbase5-dev-tools libqt5webkit5-dev gstreamer1.0-plugins-base gstreamer1.0-tools gstreamer1.0-x build-essential libssl-dev libreadline-dev libyaml-dev libxslt1-dev software-properties-common libcurl4 libcurl4-openssl-dev libcurl3-dev | |
#Instalacija imagemagick | |
echo "Preuzimanje i instalacija imagemagick..." | |
sudo DEBIAN_FRONTEND=noninteractive apt-get install -y imagemagick libmagickcore-dev libmagickwand-dev |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
sudo apt install openssh-server | |
#Obezbjedjivanje SSH-a | |
echo "Obezbjedjivanje SSH-a..." | |
sudo sed -i 's/#Port 22/Port 9022/g' /etc/ssh/sshd_config | |
sudo sed -i 's/#PermitRootLogin prohibit-password/PermitRootLogin prohibit-password/g' /etc/ssh/sshd_config | |
sudo sed -i 's/#PasswordAuthentication yes/PasswordAuthentication no/g' /etc/ssh/sshd_config | |
sudo sed -i 's/#PermitEmptyPasswords no/PermitEmptyPasswords no/g' /etc/ssh/sshd_config | |
sudo systemctl restart ssh.service |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
set -e | |
command_exists() { | |
command -v "$@" > /dev/null 2>&1 | |
} | |
if command_exists docker; then | |
echo "Docker already installed" | |
else |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
sudo DEBIAN_FRONTEND=noninteractive apt-get update | |
sudo DEBIAN_FRONTEND=noninteractive apt-get upgrade -y | |
#Preuzimanje i instalacija dependency-a | |
echo "Preuzimanje i instalacija dependency-a..." | |
sudo DEBIAN_FRONTEND=noninteractive apt-get update | |
sudo DEBIAN_FRONTEND=noninteractive apt-get install -y curl git-core gdebi-core gdebi rar unrar gnupg2 vim qtbase5-dev qtchooser qt5-qmake qtbase5-dev-tools libqt5webkit5-dev gstreamer1.0-plugins-base gstreamer1.0-tools gstreamer1.0-x build-essential libssl-dev libreadline-dev libyaml-dev libxslt1-dev software-properties-common libcurl4 libcurl4-openssl-dev libcurl3-dev |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
curl -so wazuh-agent-4.3.10.deb https://packages.wazuh.com/4.x/apt/pool/main/w/wazuh-agent/wazuh-agent_4.3.10-1_amd64.deb && sudo WAZUH_MANAGER='wazuh.kolosek.dev' MANAGER_IP='wazuh.kolosek.dev' dpkg -i ./wazuh-agent-4.3.10.deb | |
sudo systemctl daemon-reload | |
sudo systemctl enable wazuh-agent | |
sudo systemctl start wazuh-agent |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo apt install make gcc dirmngr gpg curl gawk zlib1g-dev libssl-dev unzip | |
wget https://www.openssl.org/source/openssl-1.1.1g.tar.gz | |
tar zxvf openssl-1.1.1g.tar.gz | |
cd openssl-1.1.1g/ | |
./config --prefix=$HOME/.openssl/openssl-1.1.1g --openssldir=$HOME/.openssl/openssl-1.1.1g | |
make install | |
rm -rf ~/.openssl/openssl-1.1.1g/certs | |
ln -s /etc/ssl/certs ~/.openssl/openssl-1.1.1g/certs | |
#ASDF ruby manager |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo sysctl -w vm.max_map_count=262144 | |
sudo apt install apt-transport-https ca-certificates curl software-properties-common | |
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - | |
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu `lsb_release -cs` stable" | |
sudo apt update | |
sudo apt install docker-ce | |
# Docker-compose | |
mkdir -p ~/.docker/cli-plugins/ | |
curl -SL https://github.com/docker/compose/releases/download/v2.3.3/docker-compose-linux-x86_64 -o ~/.docker/cli-plugins/docker-compose |
NewerOlder