Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Mastering Blockchain

You're reading from   Mastering Blockchain Distributed ledger technology, decentralization, and smart contracts explained

Arrow left icon
Product type Paperback
Published in Mar 2018
Publisher Packt
ISBN-13 9781788839044
Length 656 pages
Edition 2nd Edition
Languages
Concepts
Arrow right icon
Author (1):
Arrow left icon
Imran Bashir Imran Bashir
Author Profile Icon Imran Bashir
Imran Bashir
Arrow right icon
View More author details
Toc

Table of Contents (21) Chapters Close

Preface 1. Blockchain 101 FREE CHAPTER 2. Decentralization 3. Symmetric Cryptography 4. Public Key Cryptography 5. Introducing Bitcoin 6. Bitcoin Network and Payments 7. Bitcoin Clients and APIs 8. Alternative Coins 9. Smart Contracts 10. Ethereum 101 11. Further Ethereum 12. Ethereum Development Environment 13. Development Tools and Frameworks 14. Introducing Web3 15. Hyperledger 16. Alternative Blockchains 17. Blockchain – Outside of Currencies 18. Scalability and Other Challenges 19. Current Landscape and What's Next 20. Another Book You May Enjoy

Starting up the private network

The initial command to start the private network is shown as follows:

$ ./geth init ~/ethpriv/privategenesis.json --datadir ~/ethpriv/ 

It is assumed that in the home directory there is a directory named ethereprivate which contains the privategenesis.json file.

This will produce an output similar to what is shown in the following screenshot:

Private network initialization

This output indicates that a genesis block has been created successfully. In order for geth to start, the following command can be issued:

$ ./geth --datadir ~/etherprivate/ --networkid 786 --rpc --rpcapi 'web3,eth,net,debug,personal'  --rpccorsdomain '*' 

This will produce the following output:

Starting geth for a private network

Now geth can be attached via Inter-Process Communications (IPC) (IPC is a mechanism to allow communication between processes running...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at ₹800/month. Cancel anytime