Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to build Block chain Environment in ubuntu

2025-01-21 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/02 Report--

This article introduces you how to build a blockchain environment in ubuntu, the content is very detailed, interested friends can refer to, I hope it can be helpful to you.

1. Ubuntu sets root login

Set the password for root through sudo passwd root

Switch to root user via su root

Enter the / usr/share/lightdm/lightdm.conf.d directory and enter gedit 50-unity-greeter.conf & to open the configuration file

Add the following to the file

User-session = ubuntugreeter-show-manual-login = trueall-guest = false

5. Enter reboot to restart

6. Error reading / root/.profile is the solution to finding errors

Vi / root/.profile, modify the behavior of mesg n tty-s & & mesg n | | true then save and exit

Log in using remote tools

Enter sudo apt-get install openssh-server to install SSH

Enter ufw disable to turn off the firewall

Enter / etc/ssh/sshd_config to modify the configuration file

Change PermitRootLogin to yes, open PasswordAuthentication comments, save and exit

Enter service sshd restart to restart the ssh service, and you can log in with CRT, XShell and other remote tools

Third, build beego under ubuntu

Type tar-zxvf go1.10.3.linux-amd64.tar.gz in the / usr/local/go directory to extract the tar package of go

Create the directory required by GOPATH (that is, the go development directory)

Mkdir / home/goStudymkdir / home/goStudy/srcmkdir / home/goStudy/binmkdir / home/goStudy/pkg

3. Enter the vi / etc/profile configuration environment variable, add the following, save and exit

Export GOROOT=/usr/local/goexport GOPATH=/home/goStudyexport PATH=$PATH:$GOROOT/bin:$GOPATH/bin

4. Input. / etc/profile to make the configuration effective, enter go version to test whether the environment variable configuration is ok

5. Enter api-get install git to install git

6. Enter the / home/goStudy/src directory and enter git clone https://github.com/MXi4oyu/golang.org.git and git clone https://github.com/open-falcon/mymon.git to solve the problem of domestic network restrictions

7. Enter go get github.com/astaxie/beego to install beego

8. Enter go get github.com/beego/bee to download and install the bee tool

9. Enter the / home/goStudy/src directory and type bee new study to automatically create the project to test whether the bee tool is installed successfully

10. Enter vi / home/goStudy/src/study/conf/app.conf to modify the configuration file, add the IP address httpaddr = 192.168.227.130, save and exit

11. Enter bee run study to start the study project

twelve。 Enter 192.168.227.130 beego 8080 in the address bar to access the test and verify that the installation is successful.

4. Install Bitcoin under ubuntu

Enter cp / etc/apt/sources.list / etc/apt/sources.list.bak backup software source configuration file

Enter vi / etc/apt/sources.list to modify the software source

Empty the contents of the sources.list file, replace it with the contents of the configuration file in https://mirror.tuna.tsinghua.edu.cn/help/ubuntu/, and save and exit

Enter apt-get update to update the software source

Install all required dependency packages (apt-get install make, apt-get install gcc, apt-get install gathers +, apt-get install libdb-dev, apt-get install libdb++-dev, apt-get install aptitude, aptitude install libboost-all-dev, apt-get install zlib1g-dev, apt-get install libssl-dev, apt-get install build-essential, apt-get install libminiupnpc-dev, apt-get install autoconf, apt-get install libevent-dev, apt-get install libtool)

Enter apt-get install libqt5jgui5 libqt5core5a libqt5dbus5 qttools5-dev qttools5-dev-tools libprotobuf-dev protobuf-compiler, apt-get install libqrencode-dev, apt install qt4* to install QT library

Enter git clone https://github.com/bitcoin/bitcoin.git to install bitcoin source code

Create a db4 directory to store Berkeley DB 4.8 (mkdir / home/bitcoin/db4)

Enter the db4 directory and type wget http://download.oracle.com/berkeley-db/db-4.8.30.NC.tar.gz to download the tar package

Enter tar-zxvf to extract the tar package

Enter cd / home/bitcoin/db4/db-4.8.30.NC/build_unix/ to enter the directory

Enter.. / dist/configure-- enable-cxx-- disable-shared-- with-pic-- prefix=/home/bitcoin/db4/

Enter make & & make install to compile and install

Enter the cd / home/bitcoin/ directory

Enter. / autogen.sh to perform verification

Enter. / configure LDFLAGS= "- L/home/bitcoin/db4/lib/" CPPFLAGS= "- l/home/bitcoin/db4/include/"-- with-incompatible-bdb-- with-gui=qt4

Enter make & & make install to compile and install

Enter bitcoin-qt to start the client (Note: this command needs to be entered inside the virtual machine and is not valid through the remote tool)

5. Install btcd under ubuntu

Environment above go1.8 is required

Type go get-u github.com/Masterminds/glide to download go's package management tool

Enter git clone https://github.com/btcsuite/btcd $GOPATH/src/github.com/btcsuite/btcd clone source code

Enter cd $GOPATH/src/github.com/btcsuite/btcd to enter the directory

Enter vi glide.yaml to modify part of the configuration file (- package: golang.org/x/crypto repo: https://github.com/golang/crypto.git vcs:git subpackages:-bcrypt) to save and exit

Enter glide update to update

Enter glide install to install

Enter go install. . / cmd/...

Enter cd $GOPATH/src/github.com/btcsuite/btcd to enter the directory

Enter git pull & & glide install

Enter go install. . / cmd/...

Enter the $GOPATH/bin directory and type. / btcd to run btcd

Enter btcd-- version to view the version

Enter btcd-- help to view help

6. Building Etay Square under ubuntu

First of all, you need a go environment. Check the version through go version.

Enter apt-get update to update the software source

Git is required, which can be viewed through git-- version

Enter apt-get-y install curl to install the curl file transfer tool

Enter curl-sL https://deb.nodesource.com/setup_4.x | sudo-E bash-

Enter apt-get-y install nodejs and apt-get-y install npm to install nodejs and npm package management tools, respectively

Enter apt-get-y install software-properties-common to start building the Etay Square environment.

Enter add-apt-repository-y ppa:ethereum/ethereum

Enter add-apt-repository-y ppa:ethereum/ethereum-dev

Enter apt-get update

Enter apt-get-y install ethereum to complete the construction of Etay Square

Install solc (solidity compilation environment) and type add-apt-repository-y ppa:ethereum/ethereum

Enter apt-get update

Enter apt-get-y install solc

Enter npm install-g truffle to install truffle

Enter npm install-g ethereumjs-testrpc to install testrpc

Use the ethernet square wallet

Open the website https://www.myetherwallet.com/

Switch the language to simplified Chinese

Set the wallet password

Download and save Keystore File

Select Keystore / JSON File, import the Keystore File file downloaded above, and enter the wallet password to unlock it.

8. Build EOS environment under ubuntu

Enter git clone https://github.com/EOSIO/eos-- recursive to download the EOS source code

Enter cd / home/eos to enter the directory and execute. / eosio_build.sh to automatically compile the script for eos

Enter 1 enter to install the related package

Enter the / home/eos/build directory, enter make test for verification, and verify that the construction is complete.

9. Use EOS wallet

Enter the / home/eos/build/programs/cleos/ directory

Enter. / cleos wallet create to create a default wallet

Enter the. / cleos wallet create-n wallet name to create a wallet with the specified name

Enter. / cleos wallet list to view all the wallets

Enter cd ~ / eosio-wallet/, to find the wallet you created and copy it to a secure medium for backup

Build a super ledger under ubuntu

Enter apt-get update to update the software source

Enter apt-get install docker to install docker

Enter apt-y install docker.io to install docker.io

Enter apt-get-y install python-pip, pip install docker-compose to install Docker-Compose

Type cd / home, and then download the Fabric source code from the current directory git clone https://github.com/hyperledger/fabric.git

Enter the / home/fabric/examples/e2e_cli/ directory and enter source download-dockerimages.sh-c x86room64-1.0.0-f x86room64-1.0.0 to download the Fabric Docker image

Enter docker images to check the list of downloaded images

Enter. / network_setup.sh up to start the Fabric network

11. Ethernet Square 1. Background: it is hoped that blockchain technology can be applied in areas other than cryptocurrency 2. Concept: decentralized distributed application platform 3. Running environment: EVM4, advantages and disadvantages

(1) accounts (external accounts and contract accounts): space saving, high substitutability, simple coding, light client

(2) consensus algorithm: memory difficulty algorithm

(3) Intelligent contract: in the computer field, it is an agreement with self-execution and self-verification capabilities.

5. Built-in currency: total amount of Ethernet coins = ICO issued during the period + block reward + uncle block award + uncle block quote reward 6. TPS: transaction throughput per second, that is, the number of transactions per second that can be processed by Ethernet Fong. 7, GAS and GasPrice: fuel and fuel unit price 8, solidity introduction: Turing device programming language, class js on how to build a blockchain environment in ubuntu, that's it. I hope the above content can be of some help to you and learn more knowledge. If you think the article is good, you can share it for more people to see.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report