#!/bin/sh# howto install nodejs v18# require debian 11sudo apt-get update -ysudo apt-get install -y ca-certificates curl gnupgsudo mkdir -p /etc/apt/keyrings# cek nodejspkgs='nodejs'if ! dpkg -s $pkgs >/dev/null 2>&1; then# cek gpg sudah ada apa blumFILE=/etc/apt/keyrings/nodesource.gpgif [ -f "$FILE" ]; thenecho "$FILE exist!"elsecurl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | sudo gpg --dearmor -o /etc/apt/keyrings/nodesource.gpgfiNODE_MAJOR=18echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$NODE_MAJOR.x nodistro main" | sudo tee /etc/apt/sources.list.d/nodesource.listsudo apt-get update -ysudo apt-get install nodejs -yfinodejs -vecho "NodeJS telah terinstall!"
Thursday, September 7, 2023
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment