From a294ff44cf1c168cede3052c4a3ba63482862c8e Mon Sep 17 00:00:00 2001 From: BRAVO68WEB Date: Wed, 19 Jan 2022 19:51:25 +0530 Subject: [PATCH] Added Base Scripts --- installer.sh | 46 ++++++++++++++++++++++++++++++++++++++++++++++ open-network.sh | 11 +++++++++++ startup.sh | 8 ++++++++ 3 files changed, 65 insertions(+) create mode 100644 installer.sh create mode 100644 open-network.sh create mode 100644 startup.sh diff --git a/installer.sh b/installer.sh new file mode 100644 index 0000000..6c6d616 --- /dev/null +++ b/installer.sh @@ -0,0 +1,46 @@ +#!/bin/sh + +## Installing Cloudpanel +echo "Installing Cloudpanel ..." +apt update && apt -y upgrade && apt -y install curl wget sudo +curl -sSL https://installer.cloudpanel.io/ce/v1/install.sh | sudo bash + +## Installing Docker +echo "Installing Docker ..." +apt install ca-certificates curl gnupg lsb-release -y +curl -fsSL https://download.docker.com/linux/debian/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg +echo \ + "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/debian \ + $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null +apt-get update +apt-get install docker-ce docker-ce-cli containerd.io + +## Installing docker-compose +echo "Installing docker-compose ..." +curl -L "https://github.com/docker/compose/releases/download/1.29.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose +chmod +x /usr/local/bin/docker-compose + +## Installing Portainer +echo "Installing Portainer ..." +docker volume create portainer_data +docker run -d -p 8000:8000 -p 9443:9443 --name portainer --restart=always -v /var/run/docker.sock:/var/run/docker.sock -v portainer_data:/data portainer/portainer-ee:latest + +## Installing Gitea +echo "Installing Gitea ..." +git clone https://github.com/BRAVO68WEB/gitea-installer +cd gitea-installer +bash ./gitea-installer-en.sh + +## Configure Git +echo "Configure Git ..." +git config --global user.name "ecgitsync" +git config --global user.email "team@engineerscradle.com" + +## Insatll basic npm packages +echo "Insatll basic npm packages ..." +yarn global add nodemon + +## Install snapcraft +echo "Install snapcraft ..." +apt install snapd + diff --git a/open-network.sh b/open-network.sh new file mode 100644 index 0000000..302c9d1 --- /dev/null +++ b/open-network.sh @@ -0,0 +1,11 @@ +#!/bin/sh + +iptables-save > ~/iptables-rules +iptables -P INPUT ACCEPT +iptables -P OUTPUT ACCEPT +iptables -P FORWARD ACCEPT +iptables -F + +iptables --flush + +echo "iptables rules applied -> ports are open" \ No newline at end of file diff --git a/startup.sh b/startup.sh new file mode 100644 index 0000000..62f795a --- /dev/null +++ b/startup.sh @@ -0,0 +1,8 @@ +#!/bin/sh + +echo "Installing Debian 10 oven current OS" +sudo apt install curl -y +curl -fLO https://raw.githubusercontent.com/bohanyang/debi/master/debi.sh && chmod a+rx debi.sh +sudo ./debi.sh --version 10 --user root --password "N8@bJggX%fdsJG" +echo "Ready to restart" +sudo shutdown -r now \ No newline at end of file