zoukankan      html  css  js  c++  java
  • nodejs安装

    第一步:安装node

    >git clone https://github.com/joyent/node.git

    >cd node

    >git checkout v0.10.33-release

    >./configure

    >make

    >make install

     

    第二步:安装npm

    mac下使用命令ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

     

    第三步:安装redis

    >wget http://download.redis.io/releases/redis-2.8.17.tar.gz

    tar xzf redis-2.8.17.tar.gz

    >cd redis-2.8.17

    >make

    启动redis服务

    >src/redis-server

     

    第四步:创建package.json

    >cd /data/maturi/current/

    >npm init

    >name: (20141201051425) chat-server

    >version: (1.0.0)

    >description: chat nodejs socket.io

    >entry point: (chat_server.js)

    >test command: chat-server

    >git repository: (https://github.com/monstar-lab/maturi.git)

    >keywords: chat nodejs socket.io

    >author: maturi

    >license: (ISC)

     

    第五步:

    >npm install redis --save

    >npm install socket.io --save

    >npm install socket.io-redis —save

    ->npm install mysql —save

     

     

     

    git clone https://github.com/joyent/node.git

    cd node

    git checkout v0.10.33-release #Try checking nodejs.org for what the stable version is

    ./configure && make && sudo make install

     

    npm

     

     wget http://download.redis.io/releases/redis-2.8.17.tar.gz

    $ tar xzf redis-2.8.17.tar.gz

    $ cd redis-2.8.17

    $ make

    $ src/redis-server


    sudo redis-cli -h localhost shutdown

    cd /data/maturi/current/


    npm init

    >name: (20141201051425) chat-server

    >version: (1.0.0) 

    >description: chat nodejs socket.io

    >entry point: (chat_server.js) 

    >test command: chat-server

    >git repository: (https://github.com/monstar-lab/maturi.git) 

    >keywords: chat nodejs socket.io

    >author: maturi

    >license: (ISC) 

     

    npm install redis —save

    npm install socket.io —save

    npm install socket.io-redis —save

    npm install fs -save

     

     

  • 相关阅读:
    POJ 1556 The Doors (未完)
    setblendstate & setdepthstencilstate
    transparent 的新问题
    texCUBE() to CubemapSampler.Sample()
    error: The shader requires a sampler in slot 0 which hasn't been set [XXXsampler]
    error X3025:global variables are implicitly constant, enable compatibility mode to allow modification
    MSAA
    check environment var
    setDepthStencilState
    sampler state
  • 原文地址:https://www.cnblogs.com/adtuu/p/5213347.html
Copyright © 2011-2022 走看看