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

     

     

  • 相关阅读:
    跨数据库查询——dblink
    进度条
    datagrid 的标题的内容不对应整齐
    ie9table排列不对.td错行,多了一列
    进位方法
    ie9 jscript7 内存不足 页面无响应
    a标签 href触发及传值
    uploadify上传附件 点击保存无效 切F12就可以正常保存
    oracle增加用户密码,cmd导入数据库
    ${}中嵌套${}
  • 原文地址:https://www.cnblogs.com/adtuu/p/5213347.html
Copyright © 2011-2022 走看看