0

I have installed bitcoin core by using its source code in my amazon server by using the instructions given in the below youtube link

https://www.youtube.com/watch?v=tG_24G7bj_w

Some portion of the commands that i used to install the bitcoin from the source code were given below,

sudo mv ./include/bitcoinconsensus.h /usr/local/include/bitcoinconsensus.h mkdir -p /usr/local/lib sudo mv ./lib/libbitcoinconsensus.so /usr/local/lib/libbitcoinconsensus.so sudo mv ./lib/libbitcoinconsensus.so.0 /usr/local/lib/libbitcoinconsensus.so.0 sudo mv ./lib/libbitcoinconsensus.so.0.0.0 /usr/local/lib/libbitcoinconsensus.so.0.0.0 chmod 644 /usr/local/lib/libbitcoinconsensus.so /usr/local/lib/libbitcoinconsensus.so.0 /usr/local/lib/libbitcoinconsensus.so.0.0.0

Its running fine in my server. Now I need to install bitcoincash also in the same server using the source file. I got the source file of bitcoincash from the below link

https://www.bitcoinunlimited.info/download

But i have a doubt that is there any conflict will occure when we install two coins in the same server,

also from the given commands we can see that we have to move some common folders(eg libbitcoinconsensus.so , libbitcoinconsensus.so.0 ) to the /usr/local/lib/ fiolder and /usr/local/include/ folder for installing both coin.

Then how can i install both coins from the source? Can alyone please give me to solve this problem?

1

install Bitcoin ABC on Ubuntu 14.04.5 LTS, alongside Bitcoin Core, using these instructions:

Note: You have to create a new username because bitcoin and bitcoin cash use the same directory, so it won't work.

  1. Download the appropriate binary from here: https://download.bitcoinabc.org/

    For me, the command would be:

    wget https://download.bitcoinabc.org/0.16.2/linux/bitcoin-abc-0.16.2-x86_64-linux-gnu.tar.gz

  2. Extract the archive:

    tar xzvf bitcoin-abc-0.16.2-x86_64-linux-gnu.tar.gz

  3. Rename the binary files:

    cd bitcoin-abc-0.16.2/bin/; rename 's/bitcoin/bitcoinCash/' *

  4. Install the files into /usr/local/bin:

    sudo install -m 0755 -o root -g root -t /usr/local/bin *

Finally!

bitcoinCashd -version outputs:

Bitcoin ABC Daemon version v0.16.2.0-6af5e93

[...]

bitcoind -version outputs:

Bitcoin Core Daemon version v0.15.1

[..]

ls /usr/local/bin outputs:

bitcoinCash-cli  bitcoinCash-seeder  bitcoind    test_bitcoin
bitcoinCashd     bitcoinCash-tx      bitcoin-qt  test_bitcoinCash
bitcoinCash-qt   bitcoin-cli         bitcoin-tx

Note: You have to edit the default port on bitcoin.conf file, Since Bitcoin-core and Bitcoin-cash will use the same RPC port. rpcport=4523

7
  • Thank you Adam for your reply.But I have a doubt does these two coins bitcoin abc and bitcoincash are same? – Albert Feb 8 '18 at 6:20
  • Finally I installed and run both wallets bitcoin and bitcoincash on same server.I just rename some executable files and connected both wallets on different ports.Thank you... – Albert Feb 10 '18 at 7:39
  • This will cause problems. Both the Bitcoin Core and ABC will try to use the port 8333 – MCCCS Apr 7 '18 at 13:38
  • Yeah, you are right, I forgot to mention that. – Adam Apr 7 '18 at 13:42
  • The bitcoinCashd and bitcoind -version works, but when running it, the commands such as bitcoin-cli getblockchaininfo and bitcoinCash-getinfo both return the first daemon run. Both cant be run at once – Anekdotin Jun 17 '18 at 20:51
0

The necessary settings for bitcoin and bitcoincash to work on the same machine are as follows. Examine all files well grasp the differences between them.

cd /usr/local/bin/
mkdir bitcoin
cd /user

wget https://bitcoincore.org/bin/bitcoin-core-0.20.0/bitcoin-0.20.0-x86_64-linux-gnu.tar.gz

tar -zxvf bitcoin-0.20.0-x86_64-linux-gnu.tar.gz

sudo install -m 0755 -o user -g user -t /usr/local/bin/bitcoin ~/bitcoin-0.20.0/bin/*

rm -rf ~/bitcoin-0.20.0/ bitcoin-0.20.0-x86_64-linux-gnu.tar.gz



cd /usr/local/bin/
mkdir bitcoincash
cd /user    

wget https://github.com/Bitcoin-ABC/bitcoin-abc/releases/download/v0.22.3/bitcoin-abc-0.22.3-x86_64-linux-gnu.tar.gz

tar -zxvf bitcoin-abc-0.22.3-x86_64-linux-gnu.tar.gz

sudo install -m 0755 -o user -g user -t /usr/local/bin/bitcoincash ~/bitcoin-abc-0.22.3/bin/*

rm -rf ~/bitcoin-abc-0.22.3/ bitcoin-abc-0.22.3-x86_64-linux-gnu.tar.gz

cd /usr/local/bin/bitcoincash

mv bitcoin-cli bitcoincash-cli
mv bitcoind bitcoincashd
mv bitcoin-qt bitcoincash-qt
mv bitcoin-seeder bitcoincash-seeder
mv bitcoin-tx bitcoincash-tx
mv bitcoin-wallet bitcoincash-wallet

Bitcoin Conf.

cd /user
mkdir .bitcoin
nano bitcoin.conf

copy and paste code.

regtest=1
server=1
txindex=1
daemon=1
debug=0
datadir=/user/bitcoin
rpcuser=hedehude
rpcpassword=hedehude
rpcbind=127.0.0.1
rpcport=28332
rpcallowip=127.0.0.1/16
zmqpubrawblock=tcp://127.0.0.1:38332
zmqpubrawtx=tcp://127.0.0.1:38332
zmqpubhashtx=tcp://127.0.0.1:38332
zmqpubhashblock=tcp://127.0.0.1:38332
deprecatedrpc=accounts

[test]
rpcbind=127.0.0.1
rpcport=28332
rpcallowip=127.0.0.1/16
zmqpubrawblock=tcp://127.0.0.1:38332
zmqpubrawtx=tcp://127.0.0.1:38332
zmqpubhashtx=tcp://127.0.0.1:38332
zmqpubhashblock=tcp://127.0.0.1:38332

[regtest]
rpcbind=127.0.0.1
rpcport=28332
rpcallowip=127.0.0.1/16
zmqpubrawblock=tcp://127.0.0.1:38332
zmqpubrawtx=tcp://127.0.0.1:38332
zmqpubhashtx=tcp://127.0.0.1:38332
zmqpubhashblock=tcp://127.0.0.1:38332

BitcoinCash Conf.

cd /user
mkdir .bitcoincash
nano bitcoincash.conf

copy and paste code.

regtest=1
server=1
txindex=1
daemon=1
debug=0
datadir=/user/bitcoincash
rpcuser=hedehude
rpcpassword=hedehude
rpcbind=127.0.0.1
rpcport=78332
port=7870
rpcallowip=127.0.0.1/16
zmqpubrawblock=tcp://127.0.0.1:88332
zmqpubrawtx=tcp://127.0.0.1:88332
zmqpubhashtx=tcp://127.0.0.1:88332
zmqpubhashblock=tcp://127.0.0.1:88332
deprecatedrpc=accounts

[test]
rpcbind=127.0.0.1
rpcport=78332
rpcallowip=127.0.0.1/16
zmqpubrawblock=tcp://127.0.0.1:88332
zmqpubrawtx=tcp://127.0.0.1:88332
zmqpubhashtx=tcp://127.0.0.1:88332
zmqpubhashblock=tcp://127.0.0.1:88332

[regtest]
rpcbind=127.0.0.1
rpcport=78332
rpcallowip=127.0.0.1/16
zmqpubrawblock=tcp://127.0.0.1:88332
zmqpubrawtx=tcp://127.0.0.1:88332
zmqpubhashtx=tcp://127.0.0.1:88332
zmqpubhashblock=tcp://127.0.0.1:88332

To run nodes...

For Bitcoin Service

cd /etc/systemd/system/
nano bitcoind.service

copy and paste code.

[Unit]
Description=Bitcoin Daemon
After=network.target

[Service]
User=user
Group=user
Type=forking
PIDFile=/user/bitcoin/bitcoind.pid
ExecStart=/usr/local/bin/bitcoin/bitcoind -pid=/user/bitcoin/bitcoind.pid -conf=/user/.bitcoin/bitcoin.conf -datadir=/user/bitcoin
KillMode=process
Restart=always
TimeoutSec=120
RestartSec=30

[Install]
WantedBy=multi-user.target

For BitcoinCash Service

cd /etc/systemd/system/
nano bitcoincashd.service

copy and paste code.

[Unit]
Description=BitcoinCash Daemon
After=network.target

[Service]
User=user
Group=user
Type=forking
PIDFile=/user/bitcoincash/bitcoincashd.pid
ExecStart=/usr/local/bin/bitcoincash/bitcoincashd -pid=/user/bitcoincash/bitcoincashd.pid -conf=/user/.bitcoincash/bitcoincash.conf
KillMode=process
Restart=always
TimeoutSec=120
RestartSec=30

[Install]
WantedBy=multi-user.target

Run services

sudo systemctl start bitcoind.service
sudo systemctl status bitcoind.service

Status is success...

sudo systemctl enable bitcoind.service

sudo systemctl start bitcoincashd.service
sudo systemctl status bitcoincashd.service

Status is success...

sudo systemctl enable bitcoincashd.service

Now, when querying through the terminal,

For Bitcoin

/usr/local/bin/bitcoin/./bitcoin-cli getblockchaininfo

For BitcoinCash

/usr/local/bin/bitcoincash/./bitcoincash-cli -conf=/user/.bitcoincash/bitcoincash.conf getblockchaininfo

When querying rpc with curl,

For Bitcoin

curl -u hedehude:hedehude --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "getblockchaininfo", "params": []}' -H 'content-type: text/plain;' http://127.0.0.1:28332/

For BitcoinCash

curl -u hedehude:hedehude --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "getblockchaininfo", "params": []}' -H 'content-type: text/plain;' http://127.0.0.1:78332/

It should be running smoothly now ... Good luck.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.