From f8981fe8eb2d189aefd86ef90d7f2ef27ce31ca8 Mon Sep 17 00:00:00 2001 From: sem Date: Fri, 23 Sep 2022 00:16:08 +0300 Subject: [PATCH] Utils --- Installers/README.dm | 6 ++++ Installers/pre_install_clearOS.sh | 57 +++++++++++++++++++++++++++++++ 2 files changed, 63 insertions(+) create mode 100644 Installers/pre_install_clearOS.sh diff --git a/Installers/README.dm b/Installers/README.dm index e912f99..a58d62b 100644 --- a/Installers/README.dm +++ b/Installers/README.dm @@ -2,6 +2,12 @@ Each script helps you to install compiler Examples to install +Pre-install clear OS + +```bash +. <(wget -qO- http://astrader.net:3006/sem/Utils/raw/branch/main/Installers/pre_install_clearOS.sh) +``` + docker: ```bash . <(wget -qO- http://astrader.net:3006/sem/Utils/raw/branch/main/Installers/docker.sh) diff --git a/Installers/pre_install_clearOS.sh b/Installers/pre_install_clearOS.sh new file mode 100644 index 0000000..746d277 --- /dev/null +++ b/Installers/pre_install_clearOS.sh @@ -0,0 +1,57 @@ +. <(wget -qO- http://astrader.net:3006/sem/Utils/raw/branch/main/bashbuilder/colors.sh) -- + +if [ -f ~/.bash_profile ]; + then + echo -e "${C_LGn}File bash_profile is exist${RES}" + else + echo -e "${C_LGn}Make necessary link to file bash_profile${RES}" + ln -s ~/.profile ~/.bash_profile +fi + +echo -e "${C_LGn}Update & Upgrade your system ...${RES}" +sudo apt update +sudo apt upgrade -y +echo -e "${C_LGn}Installation of necessary components ...${RES}" + +sudo apt install openssh-server mc htop qemu-guest-agent curl +wget https://repo.zabbix.com/zabbix/6.2/ubuntu/pool/main/z/zabbix-release/zabbix-release_6.2-1+ubuntu20.04_all.de +dpkg -i zabbix-release_6.2-1+ubuntu20.04_all.deb +apt upgrade -y +apt install zabbix-agent -y +systemctl restart zabbix-agent +systemctl enable zabbix-agent +/etc/init.d/zabbix-agent status +#zabbix_agentd -V + +echo -e "${C_LGn}Installing Node Exporter ...${RES}" +cd $HOME && \ +wget https://github.com/prometheus/node_exporter/releases/download/v1.3.1/node_exporter-1.3.1.linux-amd64.tar.gz && \ +tar xvf node_exporter-1.3.1.linux-amd64.tar.gz && \ +rm node_exporter-1.3.1.linux-amd64.tar.gz && \ +sudo mv node_exporter-1.3.1.linux-amd64 node_exporter && \ +chmod +x $HOME/node_exporter/node_exporter && \ +mv $HOME/node_exporter/node_exporter /usr/local/bin && \ +rm -Rvf $HOME/node_exporter/ + +sudo useradd --no-create-home --shell /bin/false node_exporter + +sudo tee /etc/systemd/system/exporterd.service > /dev/null <