Author [EN] [ZH] [ES] [PT] [IT] [DE] [FR] [NL] [TR] [SR] [AR] [RU] [EN] [ZH] [ES] [PT] [IT] [DE] [FR] [NL] [TR] [SR] [AR] [RU] [EN] [ZH] [ES] [PT] [IT] [DE] [FR] [NL] [TR] [SR] [AR] [RU] Topic: ubuntu1404 编译 bitshares_client及运行web_wallet的步骤  (Read 1959 times)

0 Members and 1 Guest are viewing this topic.

Offline alt


1. 安装 ubuntu1404,注意现在只支持64位版本
2. 安装以下依赖包
Code: [Select]
aptitude install git cmake g++ zlib1g-dev libreadline6-dev libdb++-dev libboost-all-dev libssl-dev uuid-dev
3. git 迁出 bitshares_toolkit 代码,并编译
Code: [Select]
    git submodule init
    git submodule update
    mkdir build && cd build
    cmake ..
    make
运行
Code: [Select]
cd programs/client
  cp ../../../tests/genesis.json ./
 ./bitshares_client --server --httpport 9989
4. git 迁出 web_wallet 代码
5. 下载 node , 地址 http://www.nodejs.org/download/ ,下载 linux 下 64位版本并安装
6. 使用超级用户安装 lineman
Code: [Select]
sudo -i
npm install lineman
exit
7. 安装其它依赖包,注意要在 web_wallet 目录下运行
Code: [Select]
cd web_wallet
npm install protractor jasmine-given coffee-script lineman-angular lineman-less
8. 然后编辑 ~/.BitsharesXTS/config.json,注意要配置用户名、密码及htdocs这三项
Code: [Select]
{
  "rpc": {
    "rpc_user": "alt",
    "rpc_password": "alt",
    "rpc_endpoint": "127.0.0.1:0",
    "httpd_endpoint": "0.0.0.0:0",
    "htdocs": "/home/alt/workspace/web_wallet/generated/"
  },
  "default_peers": [
    "107.170.30.182:8764"
  ],
  "ignore_console": false
}
9. 启动 web 钱包服务器
Code: [Select]
lineman run
10. 重新运行 bitshares_client
11. 浏览器内输入 http://localhost:9989 就可以访问 web 钱包了。
如果想在手机上访问,需要把 config.json 中的httpd_endpoint 改为0.0.0.0:0
« Last Edit: June 05, 2014, 11:49:32 PM by alt »

Offline dexinwong

  • Sr. Member
  • ****
  • Posts: 232
    • View Profile
Re: ubuntu1404 编译 bitshares_client及运行web_wallet的步骤
« Reply #1 on: June 05, 2014, 01:03:28 PM »
谢谢ALT

Offline sudo

  • Hero Member
  • *****
  • Posts: 2244
    • View Profile
  • BTS: ags
Re: ubuntu1404 编译 bitshares_client及运行web_wallet的步骤
« Reply #2 on: June 05, 2014, 01:24:10 PM »
web钱包我之前没搞定
这下有教程了 太好了

会提示这个哦
Code: [Select]
[email protected]:~/bitshares_toolkit/programs/client$ ./bitshares_client --server --httpport 9989
================================================================
=                                                              =
=             Welcome to BitShares XTS                         =
=                                                              =
=  This software is in alpha testing and is not suitable for   =
=  real monetary transactions or trading.  Use at your own     =
=  risk.                                                       =
=                                                              =
=  Type 'help' for usage information.                          =
================================================================
Logging to file "/home/jerry/.BitSharesXTS/default.log"
Logging RPC to file "/home/jerry/.BitSharesXTS/rpc.log"
Loading config "/home/jerry/.BitSharesXTS/config.json"
{
  "rpc": {
    "rpc_user": "",
    "rpc_password": "",
    "rpc_endpoint": "127.0.0.1:0",
    "httpd_endpoint": "127.0.0.1:0",
    "htdocs": "./htdocs"
  },
  "default_peers": [
    "107.170.30.182:8764"
  ],
  "ignore_console": false
}
Loading blockchain from "/home/jerry/.BitSharesXTS/chain"
Using genesis block from file "/home/jerry/bitshares_toolkit/programs/client/genesis.json"
Error starting RPC server
You specified --server on the command line,
but did not provide a username or password to authenticate RPC connections.
You can provide these by using --rpcuser=username and --rpcpassword=password on the
command line, or by setting the "rpc_user" and "rpc_password" properties in the
config file
« Last Edit: June 05, 2014, 01:27:27 PM by sudo »

Offline alt

Re: ubuntu1404 编译 bitshares_client及运行web_wallet的步骤
« Reply #3 on: June 05, 2014, 01:31:33 PM »
是的,第一次运行是为了生成那个 config.json,有提示先不用管它,后面改了 config.json 就好了。

Offline sudo

  • Hero Member
  • *****
  • Posts: 2244
    • View Profile
  • BTS: ags
Re: ubuntu1404 编译 bitshares_client及运行web_wallet的步骤
« Reply #4 on: June 05, 2014, 01:36:44 PM »
http://nodejs.org/dist/v0.10.28/node-v0.10.28-linux-x64.tar.gz
下载这个么? 解压开不知道怎满装 囧
apt-get 能搞定就好了 诶
有个 README.md
Code: [Select]
Evented I/O for V8 javascript. [![Build Status](https://secure.travis-ci.org/joyent/node.png)](http://travis-ci.org/joyent/node)
===

### To build:

Prerequisites (Unix only):

    * GCC 4.2 or newer
    * Python 2.6 or 2.7
    * GNU Make 3.81 or newer
    * libexecinfo (FreeBSD and OpenBSD only)

Unix/Macintosh:

    ./configure
    make
    make install

If your python binary is in a non-standard location or has a
non-standard name, run the following instead:

    export PYTHON=/path/to/python
    $PYTHON ./configure
    make
    make install

Windows:

    vcbuild.bat

You can download pre-built binaries for various operating systems from
[http://nodejs.org/download/](http://nodejs.org/download/).  The Windows
and OS X installers will prompt you for the location to install to.
The tarballs are self-contained; you can extract them to a local directory
with:

    tar xzf /path/to/node-<version>-<platform>-<arch>.tar.gz

Or system-wide with:

    cd /usr/local && tar --strip-components 1 -xzf \
                         /path/to/node-<version>-<platform>-<arch>.tar.gz

### To run the tests:

Unix/Macintosh:

    make test

Windows:

    vcbuild.bat test

### To build the documentation:

    make doc

### To read the documentation:

    man doc/node.1

Resources for Newcomers
---
  - [The Wiki](https://github.com/joyent/node/wiki)
  - [nodejs.org](http://nodejs.org/)
  - [how to install node.js and npm (node package manager)](http://www.joyent.com/blog/installing-node-and-npm/)
  - [list of modules](https://github.com/joyent/node/wiki/modules)
  - [searching the npm registry](http://npmjs.org/)
  - [list of companies and projects using node](https://github.com/joyent/node/wiki/Projects,-Applications,-and-Companies-Using-Node)
  - [node.js mailing list](http://groups.google.com/group/nodejs)
  - irc chatroom, [#node.js on freenode.net](http://webchat.freenode.net?channels=node.js&uio=d4)
  - [community](https://github.com/joyent/node/wiki/Community)
  - [contributing](https://github.com/joyent/node/wiki/Contributing)
  - [big list of all the helpful wiki pages](https://github.com/joyent/node/wiki/_pages)

Offline alt

Re: ubuntu1404 编译 bitshares_client及运行web_wallet的步骤
« Reply #5 on: June 05, 2014, 01:46:10 PM »
这种安装包一般解开就能用的。
Code: [Select]
sudo tar -zxvf node-v0.10.28-linux-x64.tar.gz -C /opt
然后新建一个文件  /etc/profile.d/node.sh,内容为:
Code: [Select]
export PATH=/opt/node-v0.10.28-linux-x64/bin:$PATH
重新登录让环境变量生效后,就可以运行node命令了
« Last Edit: June 05, 2014, 01:48:14 PM by alt »

Offline sudo

  • Hero Member
  • *****
  • Posts: 2244
    • View Profile
  • BTS: ags
Re: ubuntu1404 编译 bitshares_client及运行web_wallet的步骤
« Reply #6 on: June 05, 2014, 01:50:06 PM »
这种安装包一般解开就能用的。
Code: [Select]
sudo tar -zxvf node-v0.10.28-linux-x64.tar.gz -C /opt
然后新建一个文件  /etc/profile.d/node.sh,内容为:
Code: [Select]
export PATH=/opt/node-v0.10.28-linux-x64/bin:$PATH
重新登录让环境变量生效后,就可以运行node命令了

 tks
ubuntu基本0基础
新建文件用touch node.sh
然后sudo chmod 777 node.sh
再sudo gpedit node.sh
vi用不惯

nodejs搞定了
npm似乎还是不行啊

 sudo npm install lineman
sudo: npm: command not found



[email protected]:~$ npm -v
1.4.9
[email protected]:~$ node -v
v0.10.28
« Last Edit: June 05, 2014, 02:41:15 PM by sudo »

Offline Harvey

  • Sr. Member
  • ****
  • Posts: 244
    • View Profile
Re: ubuntu1404 编译 bitshares_client及运行web_wallet的步骤
« Reply #7 on: June 05, 2014, 02:59:33 PM »
cool~
BTS       Witness:harvey-xts Seed:128.199.143.47:2015 API:wss://128.199.143.47:2016 
MUSE   Witness:harvey-xts Seed:128.199.143.47:2017 API:ws://128.199.143.47:2018

Offline alt

Re: ubuntu1404 编译 bitshares_client及运行web_wallet的步骤
« Reply #8 on: June 05, 2014, 03:29:23 PM »
tks
ubuntu基本0基础
新建文件用touch node.sh
然后sudo chmod 777 node.sh
再sudo gpedit node.sh
vi用不惯

nodejs搞定了
npm似乎还是不行啊

 sudo npm install lineman
sudo: npm: command not found



[email protected]:~$ npm -v
1.4.9
[email protected]:~$ node -v
v0.10.28
是我想当然了。应该sudo -i 变为root后再运行
Code: [Select]
sudo -i
npm install lineman
« Last Edit: June 05, 2014, 03:31:15 PM by alt »

Offline bts牛

  • Jr. Member
  • **
  • Posts: 28
    • View Profile
Re: ubuntu1404 编译 bitshares_client及运行web_wallet的步骤
« Reply #9 on: June 05, 2014, 03:40:05 PM »
不错啊

Offline Snail

  • Hero Member
  • *****
  • Posts: 749
    • View Profile
    • 比特股之家
  • BTS: snail
Re: ubuntu1404 编译 bitshares_client及运行web_wallet的步骤
« Reply #10 on: June 05, 2014, 04:49:56 PM »
比特股之家(www.bts.hk):比特股及DAC中文第一门户 | 新浪微博:http://weibo.com/mybitshares

Offline sudo

  • Hero Member
  • *****
  • Posts: 2244
    • View Profile
  • BTS: ags
Re: ubuntu1404 编译 bitshares_client及运行web_wallet的步骤
« Reply #11 on: June 05, 2014, 05:05:42 PM »
 mkdir build && cd build

似乎会导致  genesis.json找不到 得手动复制过去

===========
2014年6月6日01:27:16
搞定了 哈哈  多谢楼主的指南
« Last Edit: June 05, 2014, 05:27:45 PM by sudo »

Offline Musewhale

  • Hero Member
  • *****
  • Posts: 2850
  • 丑,实在是太丑了 !
    • View Profile
Re: ubuntu1404 编译 bitshares_client及运行web_wallet的步骤
« Reply #12 on: June 05, 2014, 05:46:16 PM »
哟西
看的我既崇拜又羡慕还略微带点春心荡漾 :-X :-X :-X :-X
MUSE witness:mygoodfriend     vote for me

Offline Overthetop

Re: ubuntu1404 编译 bitshares_client及运行web_wallet的步骤
« Reply #13 on: June 05, 2014, 06:26:04 PM »
 +5%
个人微博账号: Overthetop_万里晴空
“块链创新与创业”交流群: 330378613

Offline alt

Re: ubuntu1404 编译 bitshares_client及运行web_wallet的步骤
« Reply #14 on: June 05, 2014, 10:06:18 PM »
mkdir build && cd build

似乎会导致  genesis.json找不到 得手动复制过去

===========
2014年6月6日01:27:16
搞定了 哈哈  多谢楼主的指南
是的,我习惯代码和build的目录分开,要手动拷贝那个文件,cmake中应该改一下自动拷贝的

 

Google+