Sirherobrine23 Dev #157
@@ -4,7 +4,7 @@ set -ex
|
|||||||
apt update
|
apt update
|
||||||
|
|
||||||
# Install Necessary Packages
|
# Install Necessary Packages
|
||||||
apt install -y curl wget git zsh sudo unzip zip jq python python3 screen
|
apt -qq install -y curl wget git zsh sudo unzip zip jq python python3 screen
|
||||||
|
|
||||||
# Install nodejs from github release
|
# Install nodejs from github release
|
||||||
get_current_node_version=$(curl -sL https://api.github.com/repos/nodejs/node/releases/latest | grep tag_name | cut -d '"' -f 4)
|
get_current_node_version=$(curl -sL https://api.github.com/repos/nodejs/node/releases/latest | grep tag_name | cut -d '"' -f 4)
|
||||||
@@ -21,10 +21,10 @@ esac
|
|||||||
mkdir /tmp/Node
|
mkdir /tmp/Node
|
||||||
tar -xJf /tmp/node.tar.xz -C /tmp/Node
|
tar -xJf /tmp/node.tar.xz -C /tmp/Node
|
||||||
rm -rf /tmp/node.tar.xz
|
rm -rf /tmp/node.tar.xz
|
||||||
cp -rfv /tmp/Node/*/* /usr
|
cp -rf /tmp/Node/*/* /usr
|
||||||
|
|
||||||
# Install Build Dependencies and others Packages
|
# Install Build Dependencies and others Packages
|
||||||
apt install -y ca-certificates make build-essential procps lsb-release xdg-utils g++ libatomic1 libnss3 libatk-bridge2.0-0 gconf-service libasound2 libatk1.0-0 libc6 libcairo2 libcups2 libdbus-1-3 libexpat1 libfontconfig1 libgcc1 libgconf-2-4 libgdk-pixbuf2.0-0 libglib2.0-0 libgtk-3-0 libnspr4 libpango-1.0-0 libpangocairo-1.0-0 libstdc++6 libx11-6 libx11-xcb1 libxcb1 libxcomposite1 libxcursor1 libxdamage1 libxext6 libxfixes3 libxrandr2 libxrender1 libxss1 libxtst6 fonts-liberation libnss3 libgbm-dev
|
apt -qq install -y ca-certificates make build-essential procps lsb-release xdg-utils g++ libatomic1 libnss3 libatk-bridge2.0-0 gconf-service libasound2 libatk1.0-0 libc6 libcairo2 libcups2 libdbus-1-3 libexpat1 libfontconfig1 libgcc1 libgconf-2-4 libgdk-pixbuf2.0-0 libglib2.0-0 libgtk-3-0 libnspr4 libpango-1.0-0 libpangocairo-1.0-0 libstdc++6 libx11-6 libx11-xcb1 libxcb1 libxcomposite1 libxcursor1 libxdamage1 libxext6 libxfixes3 libxrandr2 libxrender1 libxss1 libxtst6 fonts-liberation libnss3 libgbm-dev
|
||||||
|
|
||||||
# Update npm
|
# Update npm
|
||||||
npm -g install npm@$(curl -sL https://api.github.com/repos/npm/cli/releases/latest | grep tag_name | cut -d '"' -f 4)
|
npm -g install npm@$(curl -sL https://api.github.com/repos/npm/cli/releases/latest | grep tag_name | cut -d '"' -f 4)
|
||||||
@@ -39,16 +39,17 @@ if ! [ "$(uname -m)" == "x86_64" ];then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# Install openjdk
|
# Install openjdk
|
||||||
case "$(uname -m)" in
|
case `apt search openjdk` in
|
||||||
x86_64 | aarch64 ) apt install -y openjdk-17*;;
|
*openjdk-17* ) apt install -y openjdk-17*;;
|
||||||
* ) apt install -y openjdk-11*;;
|
*openjdk-11* ) apt install -y openjdk-11*;;
|
||||||
|
* ) echo "No openjdk version found, skipping";;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
# Setup non root user
|
# Setup non root user
|
||||||
useradd -m -p "$(perl -e 'print crypt($ARGV[0], "password")' "LucaA1113ba21")" "thebds"
|
useradd -m -p "$(perl -e 'print crypt($ARGV[0], "password")' "LucaA1113ba21")" "thebds"
|
||||||
addgroup thebds sudo
|
addgroup thebds sudo
|
||||||
addgroup thebds root
|
addgroup thebds root
|
||||||
usermod --shell /bin/bash thebds;
|
usermod --shell /usr/bin/zsh thebds;
|
||||||
echo "thebds ALL=(ALL:ALL) NOPASSWD: ALL" >> /etc/sudoers
|
echo "thebds ALL=(ALL:ALL) NOPASSWD: ALL" >> /etc/sudoers
|
||||||
|
|
||||||
# Remove Unnecessary Packages
|
# Remove Unnecessary Packages
|
||||||
|
Reference in New Issue
Block a user