Utils
This commit is contained in:
@@ -2,6 +2,12 @@ Each script helps you to install compiler
|
|||||||
|
|
||||||
Examples to install
|
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:
|
docker:
|
||||||
```bash
|
```bash
|
||||||
. <(wget -qO- http://astrader.net:3006/sem/Utils/raw/branch/main/Installers/docker.sh)
|
. <(wget -qO- http://astrader.net:3006/sem/Utils/raw/branch/main/Installers/docker.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 <<EOF
|
||||||
|
[Unit]
|
||||||
|
Description=Node Exporter
|
||||||
|
Wants=network-online.target
|
||||||
|
After=network-online.target
|
||||||
|
[Service]
|
||||||
|
User=node_exporter
|
||||||
|
Group=node_exporter
|
||||||
|
ExecStart=/usr/local/bin/node_exporter
|
||||||
|
Restart=always
|
||||||
|
RestartSec=3
|
||||||
|
LimitNOFILE=65535
|
||||||
|
[Install]
|
||||||
|
WantedBy=default.target
|
||||||
|
EOF
|
||||||
|
|
||||||
|
|
||||||
|
sudo systemctl daemon-reload
|
||||||
|
sudo systemctl enable exporterd
|
||||||
|
sudo systemctl restart exporterd
|
||||||
Reference in New Issue
Block a user