각종 시스템 설치 Node. js
7792 단어 UI
NodeJS 버 전 문 제 를 꼭 주의 하 세 요. 높 을 수록 좋 은 것 이 아 닙 니 다. 현재 환경 cygwin 등 설정 과 조 화 를 이 루어 야 합 니 다. 그렇지 않 으 면 상당히 번 거 로 운 일 을 만 날 수 있 습 니 다!!
Mac
Mac 에서 homebrew 사용 하 는 것 을 좋아한다 면 한 줄 로 만 담 을 수 있 습 니 다.
brew install node
그렇지 않 으 면 수 동 으로 설치 하 는 것 만 고려 할 수 있 습 니 다. 절 차 는 다음 과 같 습 니 다.
git clone git://github.com/joyent/node.git cd node ./configure make sudo make install
Ubuntu
sudo apt-get install g++ curl libssl-dev apache2-utils sudo apt-get install git-core
git clone git://github.com/joyent/node.git cd node ./configure make sudo make install
Windows
cygwin 으로 node 를 설치 합 니 다. 절 차 는 다음 과 같 습 니 다.
git clone git://github.com/joyent/node.git cd node ./configure make sudo make install
Centos
yum install gcc-c++ openssl-devel wget --no-check-certificate https://github.com/joyent/node/tarball/v0.3.3 tar -xzvf ry-node-v0.3.3-0-g57544ba.tar.gz cd ry-node-v0.3.3-0-g57544bac1 ./configure make make install
Hello Node.js!
hello 와 같은 작은 프로그램 을 작성 합 니 다.node. js 설치 가 올 바른 지 확인 하기:
var http = require('http'); http.createServer(function (req, res) { res.writeHead(200, {'Content-Type': 'text/plain'}); res.end('Hello Node.jsn'); }).listen(8124, "127.0.0.1"); console.log('Server running at http://127.0.0.1:8124/');
이 코드 를 node 로 실행 합 니 다.
node hello_node.js Server running at http://127.0.0.1:8124/
현재 브 라 우 저 로 열기http://127.0.0.1:8124/ 좋 은 소식 을 볼 수 있 을 거 예요.
이 내용에 흥미가 있습니까?
현재 기사가 여러분의 문제를 해결하지 못하는 경우 AI 엔진은 머신러닝 분석(스마트 모델이 방금 만들어져 부정확한 경우가 있을 수 있음)을 통해 가장 유사한 기사를 추천합니다:
Application Development in WebOSDevelop applications in WebOS Recognize the abstract class Application The operating system accepts classes that impleme...
텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
CC BY-SA 2.5, CC BY-SA 3.0 및 CC BY-SA 4.0에 따라 라이센스가 부여됩니다.