# download nodejs desired version cd /usr/local/lib sudo wget "https://nodejs.org/dist/v12.16.3/node-v12.16.3-linux-x64.tar.xz" move downloaded tar.xz file inside /usr/local/lib extrac the tar.xz file and rename as like node-v10.16.0 # setup environment cd ./etc/profile.d ls sudo touch nodejs-env.sh sudo nano nodejs-env.sh copy and paste below code inside nodejs-env.sh and save export NODEJS_HOME=/usr/local/lib/nodejs/node-v8.9.4 export PATH=$NODEJS_HOME/bin:$PATH restart you machine. # Done node -v npm -v
Catatan gw seputar ngoding, yg kebanyakan gak jelas. gak usah di baca...