Now you want to make sure that the bin folder containing the nodejs directory is in your $PATH environment variable, so open the ~/.profile file in your home directory. This will create a symlink from the nodejs folder in your home directory to the bin directory (meaning that any updates to the directory in your home folder are reflected in the folder elsewhere via the symbolic link). I used my home directory so it is only available to me, but you could also easily do: $ ln -s ~/nodejs /usr/local/bin/nodejs Obviously, this can go to any bin location you want. ![]() Then you want to create a symlink to one of your bin locations so that the binaries can be used from your shell without writing out the full path.Īssuming you put the nodejs folder in your home directory you can now do: $ ln -s ~/nodejs ~/bin/nodejs ![]() If you would like to be able to easily update your node version, then move the nodejs folder somewhere you can keep track of it ( ~/nodejs perhaps?). If you are not interested in keeping node updated, then simply move this folder into one of your bin locations (I use ~/bin), and skip the next step. ![]() Now I would rename the folder to something a bit easier to keep track of $ mv node-v4.2.2-linux-圆4 nodejs If you have a look in the bin folder you will see the binaries you need for node and npm: $ ls node-v4.2.2-linux-圆4/bin tar.gz from their website and cd into that dir (the name of the file is obviously specific to my download): $ tar -xzvf node-v4.2.2-linux-圆4.tar.gz ![]() I have not had any problems doing this on Jessie.ĭownload the. This will also mean you have an updated version of npm. You can download the latest version of Node ( 4.2.2) from their website, instead of using the package Debian provides ( 0.12).
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |