[Node.js] Ubuntu에 Node.js 설치하기[Node.js] Ubuntu에 Node.js 설치하기

Posted at 2018. 10. 25. 18:50 | Posted in Node.js
반응형




※ 우분투에 Node.js를 설치하기 위해서는 우선 CURL이 설치되어 있어야 한다.

    CURL이 설치되어 있지 않다면 아래링크를 참조하여 CURL을 먼저 설치하도록 한다.

    http://magic.wickedmiso.com/137





■ 우분투에 Node.js 설치하기




01. 가장 먼저 Node.js 모듈을 컴파일 하기 위해 build-essential을 설치한다.

 $ sudo apt-get install -y build-essential





02. 이제 curl을 이용해서 https://deb.nodesource.com 접속하여 Node.js를 다운받는다.

 $ curl -sl https://deb.nodesource.com/setup_버전 숫자.x | sudo -E bash -





03. 이제 다운받은 Node.js를 설치한다.

 $ sudo apt-get install -y nodejs





04. 설치가 완료되었다면 Node.js가 정상적으로 실행되는지 확인해 보자.

  $ node

 > console.log('Hello Wicked Miso .. !');






※ 기본적으로 Node.js에 관련된 node_modules 디렉토리는 우분투에서는 아래 경로에 자동 생성된다.

 $ cd /usr/lib/node_modules/npm/node_modules

 :/usr/lib/node_modules/npm/node_modules$ ls -al








반응형
//