什么是twister?
twister是基于Bitcoin协议的去中心化的类twitter的社交系统
源码:
https://github.com/miguelfreitas/twister-core
我修改过的: https://github.com/youngqqcn/twister-core
Ubuntu编译安装
ubuntu编译安装是最简单的, 参考源码目录下的: doc/building-on-ubuntu-debian.md
# Ubuntu / Debian building instructions
Tested on a pristine:
- Ubuntu 13.10 amd64
## Install
1. sudo apt-get update
1. sudo apt-get install git autoconf libtool build-essential libboost-all-dev libssl-dev libdb++-dev libminiupnpc-dev automake
1. git clone https://github.com/miguelfreitas/twister-core.git
1. cd twister-core
1. ./autotool.sh
1. ./configure
1. make
## Configuration & web gui
1. mkdir ~/.twister
1. echo -e "rpcuser=user\nrpcpassword=pwd" > ~/.twister/twister.conf
1. chmod 600 ~/.twister/twister.conf
1. git clone https://github.com/miguelfreitas/twister-html.git ~/.twister/html
## Start
1. cd twister-core
1. ./twisterd -rpcuser=user -rpcpassword=pwd -rpcallowip=127.0.0.1
1. Open http://127.0.0.1:28332/index.html and use the user/pwd credentials
1. Create your account !
CentOS 编译
以centos7为例, 腾讯云: 1核2G
yum install dnf -y
sudo dnf install gcc-c++ libtool make autoconf automake openssl-devel libevent-devel libdb-devel libdb-cxx-devel
git clone https://github.com/youngqqcn/twister-core.git
cd twister/
./autotool.sh
./configure
make
make install
因为我的机子只有2G内存(太小), 编译时回遇到错误gcc: internal compiler error: Killed (program cc1plus)
, 可以增加需要增加交换区来解决:
sudo mkdir -p /var/cache/swap/
sudo dd if=/dev/zero of=/var/cache/swap/swap0 bs=1M count=1024
sudo chmod 0600 /var/cache/swap/swap0
sudo mkswap /var/cache/swap/swap0
sudo swapon /var/cache/swap/swap0
其他的步骤和ubuntu编译一样
## Configuration & web gui
1. mkdir ~/.twister
1. echo -e "rpcuser=user\nrpcpassword=pwd" > ~/.twister/twister.conf
1. chmod 600 ~/.twister/twister.conf
1. git clone https://github.com/miguelfreitas/twister-html.git ~/.twister/html
## Start
1. cd twister-core
1. ./twisterd -rpcuser=user -rpcpassword=pwd -rpcallowip=127.0.0.1
1. Open http://127.0.0.1:28332/index.html and use the user/pwd credentials
1. Create your account !
如果需要对外, 则可以将127.0.0.1改为 0.0.0.0.
提示: 原版是不支持HTTP对外(本机), 必须使用
rpcssl
, 我已经修改了代码
浏览器打开网页后, 可以看到同步区块, 待区块同步完成之后, 就可以新建账号, 然后发送推文了.