This is the previous time under the Linux configuration node environment variables stepped on the pit, and today there are small partners to question the problem, so the record, not only for the new children's shoes for some reference, but also to facilitate future inspection
Before this, believe all have been installed, not installed can view another blogger article---------http://www.cnblogs.com/Halifa/p/5772263.html
There are several ways to configure the node environment variable to be permanent and effective at that time, only the permanent effect is explained here
Enter the topic:
Modify the/etc/profile file to add the following at the end
Export Node_home=/usr/local/node
After the modification is completed, you need to re-login to take effect, or you can execute command source/etc/profile or. /etc/profile come into effect (note.) With a space in/etc/profile)
View Path
View a single environment variable echo $PATH See all environment variables env
This is done, but when using a non-root user, use sudo node to view the version of node, and find the error: Command not found, the workaround is as follows:
Use Vim to enter the/etc/sudoers file, add your desired path to "Secure_path", save the changes, the problem is solved
Configuring node environment variables and issues in Linux