安裝說明


Type of installation

  1. SSH Tunnel
  2. Linode
  3. Digital Ocean
  4. AWS
  5. AWS Elastic Beanstalk (On-click deploy)

SSH Tunnel

  1. ssh -L [rpcport-for-localhost]:localhost:[rpcport-for-remote-host] [username]@[remote-host]
  2. ssh -L [httpport-for-localhost]:localhost:[httpport-for-remote-host] [username]@[remote-host]
  3. ./build/bin/gptt –testp2p –rpcport [port-for-remote-host] –httpaddr 127.0.0.1:[http-port] –exthttpaddr //localhost:[httpport-for-localhost] –extrpcaddr //localhost:[rpcport-for-localhost]

(in browser) //localhost:[httpport-for-localhost]

Linode

  1. Create Linode with Stackscript ID: 399252 (hsiaochuanheng / p.me-docker (go-pttai))
  2. Launch the console and ensure that the new linode is created successfully.
  3. ssh -L 14779:localhost:14779 admin@[IP]
  4. ssh -L 9774:localhost:9774 admin@[IP]
  5. open browser and connect to //localhost:9774
  6. Update (in admin@[IP]):

sudo -s
docker pull ailabstw/go-pttai:latest
HTTPPORT=9774
APIPORT=14779
docker run -e HTTPPORT=${HTTPPORT} -e APIPORT=${APIPORT} -itd –restart=always -p 9487:9487 -p 127.0.0.1:9774:9774 -p 127.0.0.1:14779:14779 -v /home/admin/pttai.docker:/root/.pttai –name go-pttai ailabstw/go-pttai:latest gptt “–testp2p” “–httpdir” “/static” “–httpaddr” “0.0.0.0:9774” “–rpcaddr” “0.0.0.0” “–exthttpaddr” “//localhost:${HTTPPORT}” “–extrpcaddr” “//localhost:${APIPORT}”

Digital Ocean

  1. Create docker-with-ubuntu in One-click Applications.
  2. Install / Update (in root@[IP]):

sudo -s

docker pull ailabstw/go-pttai:latest

HTTPPORT=9774

APIPORT=14779

docker run -e HTTPPORT=${HTTPPORT} -e APIPORT=${APIPORT} -itd –restart=always -p 9487:9487 -p 127.0.0.1:9774:9774 -p 127.0.0.1:14779:14779 -v /home/admin/pttai.docker:/root/.pttai –name go-pttai ailabstw/go-pttai:latest gptt “–testp2p” “–httpdir” “/static” “–httpaddr” “0.0.0.0:9774” “–rpcaddr” “0.0.0.0” “–exthttpaddr” “//localhost:${HTTPPORT}” “–extrpcaddr” “//localhost:${APIPORT}”

  1. ssh -L 14779:localhost:14779 root@[IP]
  2. ssh -L 9774:localhost:9774 root@[IP]
  3. open browser and connect to //localhost:9774

AWS

  1. Setup Key Pair in AWS ec2 console. (for SSH use)
  2. Setup Security Group in AWS ec2 console
    • Be sure to have port 22, 9487, 9774, 14779 open to 0.0.0.0/0
  3. Create an ECS cluster with the correpsonding Key Pair and Security Group.
  4. Install / Update (in ec2-user@[IP]):
    sudo -s
    docker pull ailabstw/go-pttai:latestHTTPPORT=9774APIPORT=14779docker run -e HTTPPORT=${HTTPPORT} -e APIPORT=${APIPORT} -itd –restart=always -p 9487:9487 -p 127.0.0.1:9774:9774 -p 127.0.0.1:14779:14779 -v /home/admin/pttai.docker:/root/.pttai –name go-pttai ailabstw/go-pttai:latest gptt “–testp2p” “–httpdir” “/static” “–httpaddr” “0.0.0.0:9774” “–rpcaddr” “0.0.0.0” “–exthttpaddr” “//localhost:${HTTPPORT}” “–extrpcaddr” “//localhost:${APIPORT}”
  5. ssh -L 14779:localhost:14779 ec2-user@[IP]
  6. ssh -L 9774:localhost:9774 ec2-user@[IP]
  7. open browser and connect to //localhost:9774

AWS Elastic Beanstalk (On-click deploy)

  1. Setup Key Pair in AWS ec2 console. (for SSH use)
  2. Please remeber where you save the private key in your computer, you will need it at the last step.
  3. Click this link
  4. This will deploy the pre-build p.me docker image for you
  5. Click choice option Upload your code
  6. (Note: the code is already uploaded for you, you only have to click this option. This seems to be a bug of AWS.)