In fact, the environment is built on the Linux system is relatively simple, download the package has been compiled, configure the environment variables. or download the source code, build it yourself.
Here is a note, mainly in the case of node version change rhythm is very block, how to configure the environment variable will not be configured.
Download and unzip node-v0.12.7-linux-x64 binary files,
Directory:
[Email protected] node-v0.12.7-linux-x64]$ pwd
/home/doctor/opt/node-v0.12.7-linux-x64
Configuration file:
[Email protected] ~]$ L.
. . bashrc. Gtkrc-2.0-kde4. pgadmin_histoqueries
.. . cache. IntelliJIdea14. Pgpass
. adobe. config. java. PKI
. Aliedit. Directory. KDE. rediscli_history
. Android. Eclipse. Local. Spring Tool Suite
. attach_pid2075. Esd_auth. m2. thumbnails
. attach_pid2282. fonts.conf. Macromedia. Viminfo
. bash_history. Gitconfig. Mozilla. WebStorm10
. bash_logout. Gnome. npm. Xauthority
. bash_profile. GnuPG. pgadmin3. xsession-errors
[Email protected] ~]$
In the. bashrc file, add the node environment configuration:
Export Node_home=/home/doctor/opt/node
Export path= $NODE _home/bin: $PATH
(The HOME directory above can also be replaced with ${home})
Note: node is configured here instead of the specific version.
In the OPT directory, we use a soft connection to correlate the node directory in the environment file with the specific node version directory:
[Email protected] ~]$ ln-s node-v0.12.7-linux-x64 node
[email protected] opt]$ ll node
lrwxrwxrwx. 1 Doctor doctor 22 July 10:13 node-node-v0.12.7-linux-x64
[Email protected] opt]$
A soft connection has been established.
Execute: [[email protected] opt]$ SOURCE/HOME/DOCTOR/.BASHRC make the configuration take effect.
Verify that:
[Email protected] opt]$ node-v
v0.12.7
[Email protected] opt]$ node
> Console.log (' Hello Doctor ');
Hello Doctor
Undefined
>
When we re-use the new version later, we just need to change the soft connection, unlink node Cancel, and then ln-s node-xxxx-linux-x64 node
Can.
(Of course, to save things, you can just set up the node directory and copy the contents of the new version.) )
Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.
Node under the Fedora 22 System development environment Setup