Linux 에 node. js 환경 설치

1328 단어
Linux 에 node. js 환경 설치
Install git wget vim
yum install -y epel-release
yum install wget git vim -y

Install nodejs
wget http://nodejs.org/dist/v8.12.0/node-v8.12.0-linux-x64.tar.gz
mkdir -p /usr/local/nodejs/nodejs-v8.12.0
tar --strip-components 1 -xzvf node-v* -C /usr/local/nodejs/nodejs-v8.12.0

Config ENV
install vim before better
vim /etc/profile

please use source /etc/profile after change env
export NODE_HOME=/usr/local/nodejs/nodejs-v8.12.0
export PATH=$PATH:${NODE_HOME}/bin

Test node.js
node -v
npm -v

Install yarn
wget https://github.com/yarnpkg/yarn/releases/download/v1.7.0/yarn-v1.7.0.tar.gz
mkdir -p /usr/local/yarn
tar -zxvf yarn-v1.7.0.tar.gz -C /usr/local/yarn

Config ENV
install vim before better
vim /etc/profile

please use source /etc/profile after change env
export PATH=$PATH:/usr/local/yarn/yarn-v1.7.0/bin

Test yarn
yarn -v

SET Intranet NPM
please install git before
npm config set @yylc:registry http://nexus.yingyingwork.com/repository/npm-hosted/

좋은 웹페이지 즐겨찾기