Browse Source

Added install scripts

pull/67/head
Jae Kwon 10 years ago
parent
commit
47f1a91379
5 changed files with 120 additions and 16 deletions
  1. +68
    -0
      INSTALL/README.md
  2. +11
    -0
      INSTALL/install_env.sh
  3. +22
    -0
      INSTALL/install_golang.sh
  4. +19
    -0
      INSTALL/update_tendermint.sh
  5. +0
    -16
      NOTES

+ 68
- 0
INSTALL/README.md View File

@ -0,0 +1,68 @@
### Dependencies
Install the dependencies.
[install_env.sh](https://raw.githubusercontent.com/tendermint/tendermint/master/INSTALL/install_env.sh):
#!/bin/bash
# Run this as super user
# This part is for installing go language and setting up a user account
apt-get update -y
apt-get upgrade -y
apt-get install -y make screen gcc git mercurial libc6-dev pkg-config libgmp-dev
useradd tmuser -d /home/tmuser
usermod -aG sudo tmuser
mkdir /home/tmuser
chown -R tmuser /home/tmuser
su tmuser
### Install Go
Install Go separately, from here: <http://golang.org/doc/install> or
Don't use `apt-get install golang`, it's still on an old version.
[install_golang.sh](https://raw.githubusercontent.com/tendermint/tendermint/master/INSTALL/install_golang.sh):
#!/bin/bash
# Run this as tmuser user
# This part is for installing go
if [ `whoami` != "root" ];
then
cd /home/tmuser
mkdir gocode
wget https://storage.googleapis.com/golang/go1.4.2.src.tar.gz
tar -xzvf go*.tar.gz
cd go/src
./make.bash
cd /home/tmuser
cp /etc/skel/.bashrc .
mkdir -p /home/tmuser/go/src
echo 'export GOROOT=/home/tmuser/go' >> /home/tmuser/.bashrc
echo 'export GOPATH=/home/tmuser/gocode' >> /home/tmuser/.bashrc
echo 'export PATH=$PATH:$GOROOT/bin' >> /home/tmuser/.bashrc
source /home/tmuser/.bashrc
else
echo "should not be root to run install_golang.sh"
fi
### Install/Update Tendermint
#!/bin/bash
# Run this as tmuser user
# This part is for installing Tendermint
if [ `whoami` != "root" ];
then
cd
source /home/tmuser/.bashrc
rm -rf $GOPATH/src/github.com/tendermint/tendermint
go get github.com/tendermint/tendermint
cd $GOPATH/src/github.com/tendermint/tendermint
git checkout develop
git pull
make
else
echo "should not be root to run update_tendermint.sh"
fi
Finally, head back to [Developer Quick Start](https://github.com/tendermint/tendermint/wiki/Developer-Quick-Start) to compile and run Tendermint.

+ 11
- 0
INSTALL/install_env.sh View File

@ -0,0 +1,11 @@
#!/bin/bash
# Run this as super user
# This part is for installing go language and setting up a user account
apt-get update -y
apt-get upgrade -y
apt-get install -y make screen gcc git mercurial libc6-dev pkg-config libgmp-dev
useradd tmuser -d /home/tmuser
usermod -aG sudo tmuser
mkdir /home/tmuser
chown -R tmuser /home/tmuser
su tmuser

+ 22
- 0
INSTALL/install_golang.sh View File

@ -0,0 +1,22 @@
#!/bin/bash
# Run this as tmuser user
# This part is for installing go
if [ `whoami` != "root" ];
then
cd /home/tmuser
mkdir gocode
wget https://storage.googleapis.com/golang/go1.4.2.src.tar.gz
tar -xzvf go*.tar.gz
cd go/src
./make.bash
cd /home/tmuser
cp /etc/skel/.bashrc .
mkdir -p /home/tmuser/go/src
echo 'export GOROOT=/home/tmuser/go' >> /home/tmuser/.bashrc
echo 'export GOPATH=/home/tmuser/gocode' >> /home/tmuser/.bashrc
echo 'export PATH=$PATH:$GOROOT/bin' >> /home/tmuser/.bashrc
source /home/tmuser/.bashrc
else
echo "should not be root to run install_golang.sh"
fi

+ 19
- 0
INSTALL/update_tendermint.sh View File

@ -0,0 +1,19 @@
#!/bin/bash
# Run this as tmuser user
# This part is for installing Tendermint
if [ `whoami` != "root" ];
then
cd
source /home/tmuser/.bashrc
rm -rf $GOPATH/src/github.com/tendermint/tendermint
go get github.com/tendermint/tendermint
cd $GOPATH/src/github.com/tendermint/tendermint
git checkout develop
git pull
make
else
echo "should not be root to run update_tendermint.sh"
fi

+ 0
- 16
NOTES View File

@ -1,16 +0,0 @@
debugging this thing.
Why doesn't the network boot up quicker?
Why does the VI:0 Precommit for height 1 not come around after round 1 and before round 6?
[Vote VI:0 V:Precommit{1/0 4B634C4301EA#PartSet{T:1 67344F9BB237} 9974E3F32592}]
[Vote VI:0 V:Precommit{1/1 4B634C4301EA#PartSet{T:1 67344F9BB237} B600DBFA00B3}]
[Vote VI:0 V:Precommit{1/6 4B634C4301EA#PartSet{T:1 67344F9BB237} 2C51D4B6047C}]
Yet blackshadow did send a Prevote for 1/2 to whiteferret...
DBUG[05-04|14:19:36] Send module=p2p channel=22 connection=MConn{162.243.85.60:52630} msg="[Vote VI:0 V:Prevote{1/2 4B634C4301EA#PartSet{T:1 67344F9BB237} 2CFCF951C4D9}]"
Why did blackshadow not send Prevote{1/2} to any other peer?
Did whiteferret not broadcast the Prevote to anyone else?
What is the capacity of our buffers? (the defaultSendQueueCapcity for the VotesCh is 1. Oops)
Blackshadow was locked, so it did:
INFO[05-04|14:19:36] Signed and added vote module=consensus height=1 round=2 vote="Prevote{1/2 4B634C4301EA#PartSet{T:1 67344F9BB237} 2CFCF951C4D9}"

Loading…
Cancel
Save