-
Notifications
You must be signed in to change notification settings - Fork 2
Build and Install
martinbtm edited this page Sep 6, 2021
·
1 revision
You can install from release, it offers some releases for 3 main operating system.
Examples:
- bytom-1.0.3-darwin_386.tgz
- bytom-1.0.3-darwin_amd64.tgz
- bytom-1.0.3-linux_386.tgz
- bytom-1.0.3-linux_amd64.tgz
- bytom-1.0.3-windows_386.zip
- bytom-1.0.3-windows_amd64.zip
-
Go version 1.8 or higher, with
$GOPATH
set to your preferred directory
Ensure Go with the supported version is installed properly:
$ go version
$ go env GOROOT GOPATH
$ git clone https://github.com/Bytom/bytom.git $GOPATH/src/github.com/bytom
$ cd $GOPATH/src/github.com/bytom
$ make bytomd # build bytomd
$ make bytomcli # build bytomcli
When successfully building the project, the bytom
and bytomcli
binary should be present in cmd/bytomd
and cmd/bytomcli
directory, respectively.
docker build -t bytom .
docker run -v <Bytom/data/directory/on/host/machine>:/root/.bytom bytom:latest bytomd init --chain_id <chainId>
The default Bytom data directory (on the host) is:
- Mac:
~/Library/Bytom
- Linux:
~/.bytom
- Windows:
%APPDATA%\Bytom
docker run -it -p 9888:9888 -v <Bytom/data/directory/on/host/machine>:/root/.bytom bytom:latest
Then you can use bytomd and bytomcli following Readme
Use exit
to exit Docker's iterative mode
For example,
docker run -d -p 9888:9888 -v <Bytom/data/directory/on/host/machine>:/root/.bytom bytom:latest bytomd node --web.closed --auth.disable
To list the running containners and check their container id, image, corresponding command, created time, status, name and ports being used:
docker container ls
or
docker ps
To execute a command inside a containner, for example:
docker exec -it <containerId> bytomcli create-access-token <tokenId>
To stop a running containner:
docker stop <containerId>
To remove a containner:
docker rm <containerId>