如何在Ubuntu上通过命令行设置tezos节点?
2 个回答
- 投票数
-
- 2019-11-15
这是有关如何构建Tezos节点(新的Ubuntu安装)的更新的分步说明
成为超级用户
sudo su
更新系统
苏多苏 须藤apt更新&& sudo apt升级-y
安装curl
sudo apt-getinstall curl
对所有提示说是
安装docker
sudo apt安装docker.io sudo systemctl启动docker sudo systemctl启用docker
安装docker compose
sudo curl -L" https://github .com/docker/compose/releases/download/1.24.1/docker-compose- $(uname -s)-$(uname -m)" -o/usr/local/bin/docker-compose 须藤chmod + x/usr/local/bin/docker-compose 须藤ln -s/usr/local/bin/docker-compose/usr/bin/docker-compose sudo apt-get docker-compose
对所有提示答复是
下载alphanet脚本
wget -Omainnet.sh https://gitlab.com/tezos/tezos/raw/master/scripts/alphanet.sh chmod + xmainnet.sh
启动主网
./mainnnet.sh开始
(要稍后更新节点,请输入:) ./mainnet.sh重新启动
更新主网
./mainnet.sh update_script
从源构建
所有一行
sudo aptinstall -y rsyncgit m4构建基本补丁解压缩bubblewrap wgetpkg-config libgmp-dev libev-dev libhidapi-dev其中wget https://github.com/ocaml/opam/releases/download/2.0.3/opam-2.0.3- x86_64-linux
sudo cp opam-2.0.3-x86_64-linux/usr/local/bin/opam 须藤chmod a + x/usr/local/bin/opam git clone https://gitlab.com/tezos/tezos.git CD Tezos git checkout主网
为opaminit命令键入"是"
opam初始化-裸 制作build-deps ##注意:进程7需要很长时间 评估$(opamenv) 使 导出PATH=〜/tezos:$ PATH 源./src/bin_client/bash-completion.sh 导出TEZOS_CLIENT_UNSAFE_DISABLE_DISCLAIMER=Y
安装jp
sudo aptinstall -yjq
安装opam
建立构建后缀 使build-dev-deps ##需要一段时间 评估$(opamenv) 做
生成tezos节点ID ##(如果未在/home/〜中安装tezos),搜索tezos
cd/home/'用户名'/tezos/
下载节点快照(节省您的时间)
curl -s https://api.github.com/repos/Phlogi/tezos-snapshots/releases/latest | jq -r" .assets []| select(.name)| .browser_download_url"| grepfull| xargs wget -q --show-progress
找出文件名
ls/
解压缩文件(仅适用于此命令,否则文件将被破坏)
unxz"文件名"
重命名文件,记下块号,您将在下面使用它(通过Gui进行操作就可以了)
创建tezos节点标识,对于--block变量,使用位于
上的块号./tezos-node身份生成
导入快照
./tezos-node快照导入mainnet.full --block"exampleblockBMetLX2em7Q2tbAxcuPbUQNEY4NhRDEZtJCQeoFvWnYwDzb5qGU"
使用端口杀死原始应用
sudo kill -9 $(sudo lsof -t -i:8732)
启动节点
./tezos-node运行--rpc-addr 127.0.0.1
如果文件已锁定,请使用lsof命令,然后使用killall停止进程,或通过在路径中rm锁定文件来解锁文件
等待节点同步(使用此命令观看进度
./tezos-client引导
您完成了!!!
Here are the updated step-by-step instructions on how to build a Tezos node(fresh Ubuntu install)
become superuser
sudo su
update system
sudo su sudo apt update && sudo apt upgrade -y
install curl
sudo apt-get install curl
say yes to all prompts
install docker
sudo apt install docker.io sudo systemctl start docker sudo systemctl enable docker
install docker compose
sudo curl -L "https://github.com/docker/compose/releases/download/1.24.1/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose sudo chmod +x /usr/local/bin/docker-compose sudo ln -s /usr/local/bin/docker-compose /usr/bin/docker-compose sudo apt-get docker-compose
reply yes to all prompts
download the alphanet script
wget -O mainnet.sh https://gitlab.com/tezos/tezos/raw/master/scripts/alphanet.sh chmod +x mainnet.sh
start mainnet
./mainnnet.sh start
(to update node later type:) ./mainnet.sh restart
update mainnet
./mainnet.sh update_script
build from sources
all one line
sudo apt install -y rsync git m4 build-essential patch unzip bubblewrap wget pkg-config libgmp-dev libev-dev libhidapi-dev which wget https://github.com/ocaml/opam/releases/download/2.0.3/opam-2.0.3-x86_64-linux
sudo cp opam-2.0.3-x86_64-linux /usr/local/bin/opam sudo chmod a+x /usr/local/bin/opam git clone https://gitlab.com/tezos/tezos.git cd tezos git checkout mainnet
type "yes" for opam init command
opam init --bare make build-deps ## note: process 7 takes a long time eval $(opam env) make export PATH=~/tezos:$PATH source ./src/bin_client/bash-completion.sh export TEZOS_CLIENT_UNSAFE_DISABLE_DISCLAIMER=Y
install jp
sudo apt install -y jq
install opam
make build-deps make build-dev-deps ##takes a while eval $(opam env) make
generate tezos node ID ## if the tezos wasn't installed in /home/~, do a search for tezos
cd /home/'username'/tezos/
download node snapshot(saves you hours)
curl -s https://api.github.com/repos/Phlogi/tezos-snapshots/releases/latest | jq -r ".assets[] | select(.name) | .browser_download_url" | grep full | xargs wget -q --show-progress
find out the name of the file
ls /
unzip the file(only works with this command, otherwise file will be corrupted)
unxz "name of file"
rename the file, taking note of the block number, you will use it below(do this via Gui is fine)
create the tezos node identity, for the --block variable, use the block number located on the
./tezos-node identity generate
import the snapshot
./tezos-node snapshot import mainnet.full --block "exampleblockBMetLX2em7Q2tbAxcuPbUQNEY4NhRDEZtJCQeoFvWnYwDzb5qGU"
kill original app using the ports
sudo kill -9 $(sudo lsof -t -i:8732)
start the node
./tezos-node run --rpc-addr 127.0.0.1
note use lsof command if file is locked and then killall to stop the process, or unlock the file by rm the lock file in the path
wait for node to sync(watch progress with this command
./tezos-client bootstrapped
Your finished!!!
-
这是从http://tezos.gitlab.io/introduction/howtoget.html复制过来的,这很好,但是请注明出处.并且最好修复CRLF.This is copied over from http://tezos.gitlab.io/introduction/howtoget.html, which is fine, but pls give credit to the source. And preferably fix the CRLFs.
- 1
- 2019-12-03
- Gaia
-
https://medium.com/@tezbaker.io/tezos-mainnet-setting-up-home-baking-4bf258a9fd30https://medium.com/@tezbaker.io/tezos-mainnet-setting-up-home-baking-4bf258a9fd30
- 0
- 2019-12-04
- Mack Baise
-
- 2020-05-25
Tezster-CLI 是回答您查询的理想工具.它将通过简单的步骤在您的系统上设置本地节点.
先决条件: 您必须在系统上安装了docker和nodejs.
要安装docker,请运行以下命令:(在ubuntu上)
sudo apt install docker.io sudo groupadd docker sudo usermod -aG docker $USER newgrp docker
安装tezster-cli软件包:
sudo npm install -g tezster@latest --unsafe-perm=true
设置本地节点
tezster setup
启动和停止本地节点:
tezster start-nodes tezster stop-nodes
使用 Tezster-CLI指南以了解有关tezster使用的更多信息.
Tezster-CLI is the perfect tool to answer for your query. It will setup local nodes on your system in easy steps.
Prerequisite: You must have installed docker and nodejs on your system.
To install docker run the following command: (on ubuntu)
sudo apt install docker.io sudo groupadd docker sudo usermod -aG docker $USER newgrp docker
Install tezster-cli package:
sudo npm install -g tezster@latest --unsafe-perm=true
Setup local nodes:
tezster setup
Start and stop local nodes:
tezster start-nodes tezster stop-nodes
Use Tezster-CLI Guide to learn more about tezster usage.
我想知道是否有人可以让我完全了解如何在Ubuntu上执行此操作,因此Tezos Gitlab页面非常过时.