Created
September 10, 2015 13:33
-
-
Save stolsma/cd5f76b7a32a4c7a02c6 to your computer and use it in GitHub Desktop.
Revisions
-
stolsma created this gist
Sep 10, 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,38 @@ Install first for ubuntu: ```` bash sudo apt-get install build-essential libssl-dev curl git-core ```` Compile the required Node.js version and put in global reach: ```` bash # install Node.js from Github (replace 4.0.0 with required version) git clone https://github.com/nodejs/node.git node4.0.0 cd node4.0.0 git checkout v4.0.0 ./configure --prefix=/usr/local/node4.0.0 make sudo make install cd .. ```` Add `nodejs.sh` script to `/etc/profile.d` ```` # set PATH so it includes Node.js bin export PATH="/usr/local/node/bin":"${PATH}" ```` Link /usr/local/node to correct version: ```` bash sudo ln -s /usr/local/node4.0.0 /usr/local/node ```` Adding/changing `/etc/sudoers.d/secure_path`: ```` bash Defaults secure_path=/usr/local/node/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/X11R6/bin ```` (BTW users capable to use `sudo` need to have the `sudo` group in their group list!!)