Last active
February 16, 2019 16:55
-
-
Save trajakovic/ad9f91776dea3b495db0 to your computer and use it in GitHub Desktop.
Revisions
-
trajakovic revised this gist
Apr 19, 2016 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -33,7 +33,7 @@ if [[ ! -e "${NODE_FOLDER}" ]]; then update-alternatives --install /usr/bin/npm npm /usr/lib/${NODE_FOLDER}/bin/npm ${NODE_INT_VERSION} # update $PATH to make `npm install -g` visible cat <<EOF >> /home/${SUDO_USER:-$USER}/.bashrc # added by https://gist.github.com/trajakovic/ad9f91776dea3b495db0 - NodeJs 'installer' export PATH=\$PATH:/usr/lib/${NODE_FOLDER}/bin -
trajakovic revised this gist
Apr 19, 2016 . No changes.There are no files selected for viewing
-
trajakovic revised this gist
Apr 19, 2016 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -8,8 +8,8 @@ func_check_for_root() { func_check_for_root #SETUP PARAMS NODE_VERSION="v5.10.1" NODE_INT_VERSION="5101" NODE_FILE=node-${NODE_VERSION}-linux-x64.tar.gz NODE_FOLDER=node-${NODE_VERSION}-linux-x64 NODE_URI="https://nodejs.org/dist/${NODE_VERSION}/${NODE_FILE}" -
trajakovic revised this gist
Feb 26, 2016 . 1 changed file with 7 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -31,6 +31,13 @@ if [[ ! -e "${NODE_FOLDER}" ]]; then # install alternatives update-alternatives --install /usr/bin/node node /usr/lib/${NODE_FOLDER}/bin/node ${NODE_INT_VERSION} update-alternatives --install /usr/bin/npm npm /usr/lib/${NODE_FOLDER}/bin/npm ${NODE_INT_VERSION} # update $PATH to make `npm install -g` visible cat <<EOF >> /home/${SUDO_USER:-$USER}/.bash_profile # added by https://gist.github.com/trajakovic/ad9f91776dea3b495db0 - NodeJs 'installer' export PATH=\$PATH:/usr/lib/${NODE_FOLDER}/bin EOF else echo Looks like node is already installed: echo "" -
trajakovic revised this gist
Feb 26, 2016 . No changes.There are no files selected for viewing
-
trajakovic revised this gist
Feb 26, 2016 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -8,8 +8,8 @@ func_check_for_root() { func_check_for_root #SETUP PARAMS NODE_VERSION="v5.7.0" NODE_INT_VERSION="570" NODE_FILE=node-${NODE_VERSION}-linux-x64.tar.gz NODE_FOLDER=node-${NODE_VERSION}-linux-x64 NODE_URI="https://nodejs.org/dist/${NODE_VERSION}/${NODE_FILE}" -
trajakovic revised this gist
Nov 9, 2015 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -19,7 +19,7 @@ cd /usr/lib if [[ ! -e "${NODE_FOLDER}" ]]; then #install DevTools for NPM dnf groupinstall -y 'Development Tools' dnf install -y gcc-c++ # get node wget ${NODE_URI} -
trajakovic revised this gist
Nov 8, 2015 . No changes.There are no files selected for viewing
-
trajakovic revised this gist
Nov 2, 2015 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -18,7 +18,7 @@ cd /usr/lib if [[ ! -e "${NODE_FOLDER}" ]]; then #install DevTools for NPM dnf groupinstall -y 'Development Tools' dnf install -qy gcc-c++ # get node -
trajakovic revised this gist
Nov 2, 2015 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -8,8 +8,8 @@ func_check_for_root() { func_check_for_root #SETUP PARAMS NODE_VERSION="v5.0.0" NODE_INT_VERSION="500" NODE_FILE=node-${NODE_VERSION}-linux-x64.tar.gz NODE_FOLDER=node-${NODE_VERSION}-linux-x64 NODE_URI="https://nodejs.org/dist/${NODE_VERSION}/${NODE_FILE}" -
trajakovic revised this gist
Oct 30, 2015 . 1 changed file with 1 addition and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -19,6 +19,7 @@ cd /usr/lib if [[ ! -e "${NODE_FOLDER}" ]]; then #install DevTools for NPM dnf groupinstall -qy 'Development Tools' dnf install -qy gcc-c++ # get node wget ${NODE_URI} -
trajakovic revised this gist
Oct 2, 2015 . No changes.There are no files selected for viewing
-
trajakovic revised this gist
Oct 2, 2015 . 1 changed file with 3 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -31,5 +31,7 @@ if [[ ! -e "${NODE_FOLDER}" ]]; then update-alternatives --install /usr/bin/node node /usr/lib/${NODE_FOLDER}/bin/node ${NODE_INT_VERSION} update-alternatives --install /usr/bin/npm npm /usr/lib/${NODE_FOLDER}/bin/npm ${NODE_INT_VERSION} else echo Looks like node is already installed: echo "" update-alternatives --display node fi -
trajakovic created this gist
Oct 2, 2015 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,35 @@ #!/usr/bin/env bash func_check_for_root() { if [ ! $( id -u ) -eq 0 ]; then echo "ERROR: $0 Must be run as root, Script terminating" ;exit 7 fi } func_check_for_root #SETUP PARAMS NODE_VERSION="v4.1.1" NODE_INT_VERSION="411" NODE_FILE=node-${NODE_VERSION}-linux-x64.tar.gz NODE_FOLDER=node-${NODE_VERSION}-linux-x64 NODE_URI="https://nodejs.org/dist/${NODE_VERSION}/${NODE_FILE}" cd /usr/lib if [[ ! -e "${NODE_FOLDER}" ]]; then #install DevTools for NPM dnf groupinstall -qy 'Development Tools' # get node wget ${NODE_URI} # extract tar xvf ${NODE_FILE} # remove tar rm ${NODE_FILE} -f # install alternatives update-alternatives --install /usr/bin/node node /usr/lib/${NODE_FOLDER}/bin/node ${NODE_INT_VERSION} update-alternatives --install /usr/bin/npm npm /usr/lib/${NODE_FOLDER}/bin/npm ${NODE_INT_VERSION} else echo Looks like node is already installed fi