Last active
October 1, 2015 08:17
-
-
Save lidox/efc211c962a8315fac98 to your computer and use it in GitHub Desktop.
Install node without having to sudo. (used for 1und1 server)
This file contains 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 characters
# take ownership of the folders that npm/node use | |
# please don't do this if you don't know what it does! | |
sudo mkdir -p /usr/local/{share/man,bin,lib/node,include/node} | |
sudo chown -R $USER /usr/local/{share/man,bin,lib/node,include/node} | |
# now just a pretty vanilla node install | |
# let it use the default paths, but don't use sudo, since there's no need | |
export PREFIX= | |
mkdir node-install | |
curl http://nodejs.org/dist/node-v0.4.3.tar.gz | tar -xzf - -C node-install | |
cd node-install/* | |
./configure && make && sudo make install | |
# now the npm easy-install: can't get npm to work :( | |
cd .. | |
git clone git://github.com/isaacs/npm.git | |
cd npm | |
sudo PATH=/path/to/node/bin/dir:$PATH make install |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment