Bitcoin Forum

Bitcoin => Development & Technical Discussion => Topic started by: will_k on January 06, 2020, 10:49:21 AM



Title: Bitcoin Core Linux binaries installation question
Post by: will_k on January 06, 2020, 10:49:21 AM
After extracting bitcoin-0.19.0.1-x86_64-linux-gnu.tar.gz, I see four directories,

Code:
$ tar xf bitcoin-0.19.0.1-x86_64-linux-gnu.tar.gz
$ cd bitcoin-0.19.0.1
$ ls -R
README.md bin       include   lib       share

./bin:
bitcoin-cli    bitcoin-qt     bitcoin-tx     bitcoin-wallet bitcoind       test_bitcoin

./include:
bitcoinconsensus.h

./lib:
libbitcoinconsensus.so       libbitcoinconsensus.so.0     libbitcoinconsensus.so.0.0.0

./share:
man

./share/man:
man1

./share/man/man1:
bitcoin-cli.1    bitcoin-qt.1     bitcoin-tx.1     bitcoin-wallet.1 bitcoind.1

The README.md says to run the binaries like the follow
Code:
Unpack the files into a directory and run:

- `bin/bitcoin-qt` (GUI) or
- `bin/bitcoind` (headless)

I looked around for ways to install it and I found this https://bitcoin.org/en/full-node#linux-instructions
Installing via install
Code:
sudo install -m 0755 -o root -g root -t /usr/local/bin bitcoin-0.18.0/bin/*

I do recall that if I compile from source and install via
Code:
sudo make install
The files do get copied over into include, lib and share.

So my question is, what do I do with the content of include, lib, and share directories and when do I need them?



Title: Re: Bitcoin Core Linux binaries installation question
Post by: jackg on January 06, 2020, 10:55:10 AM
You probably don't...

Is the stuff in the share directory the same as the stuff in the bin one? They're either copies or different versions.

Dot H is a C header file which may or may not be used in the code when it's run (probabky wouldn't suggest deleting it though just to be on the safe side). And the dot so and a few others are probably just other scripts like the header file thst can be run on other devices.

(starting to think I've used the dot 1 stuff before on a certain architecture or something when the original won't run but it might have been a different piece of software I was using at the time)...


Title: Re: Bitcoin Core Linux binaries installation question
Post by: Wind_FURY on January 06, 2020, 11:20:48 AM
OP, just go to the "bin" folder, open a terminal, and type "./bitcoin-qt" to run the client. Then control+C to stop it, then go to /home/"your name"/.bitcoin. Create a bitcoin.conf file, and start with, "debug=net", and "maxmempool=100" without quotes. Configure as your bandwidth allows.

Plus do you have limited disk space? Add "prune=10000".


Title: Re: Bitcoin Core Linux binaries installation question
Post by: will_k on January 06, 2020, 09:55:14 PM
Is the stuff in the share directory the same as the stuff in the bin one? They're either copies or different versions.

I think the content of the share directory is the man files? Like what you'd see if you do "man syscoind" or "man syscoin-qt"



Title: Re: Bitcoin Core Linux binaries installation question
Post by: will_k on January 06, 2020, 09:58:22 PM
OP, just go to the "bin" folder, open a terminal, and type "./bitcoin-qt" to run the client. Then control+C to stop it, then go to /home/"your name"/.bitcoin. Create a bitcoin.conf file, and start with, "debug=net", and "maxmempool=100" without quotes. Configure as your bandwidth allows.

Plus do you have limited disk space? Add "prune=10000".

hey, I have no problem running it directly via "./bitcoin-qt"
I'm just curious about the purpose of those files outside of the bin folder that comes in the tar.gz and the proper way to install it such that I can just do "bitcoin-qt"


Title: Re: Bitcoin Core Linux binaries installation question
Post by: Abdussamad on January 06, 2020, 10:52:01 PM
Add the bin directory it to your path variable if you want it to be globally accessible. I just gave an example for an electrum user in another thread:

https://bitcointalk.org/index.php?topic=5215134.msg53539049#msg53539049


Title: Re: Bitcoin Core Linux binaries installation question
Post by: achow101 on January 06, 2020, 11:50:28 PM
The proper way to install it is to extract everything and copy all of the files into their respective directories in /usr/ So everything in bin goes to /usr/bin; include to /usr/include; lib to /usr/lib; share to /usr/share

You don't really need everything in the bin folder, some of those are the unit test binaries. But just copy everything anyways. The include and lib folders are only needed if you want to write or use a program that is dynamically linked against the libconsensus library provided by Bitcoin Core. I don't think anyone uses that though. The share folder contains the manpages.


Title: Re: Bitcoin Core Linux binaries installation question
Post by: will_k on January 08, 2020, 08:34:10 AM
The include and lib folders are only needed if you want to write or use a program that is dynamically linked against the libconsensus library provided by Bitcoin Core. I don't think anyone uses that though. The share folder contains the manpages.

Oooooh this is what I'm looking for thanks!


Title: Re: Bitcoin Core Linux binaries installation question
Post by: micro4lpha on January 09, 2020, 03:01:54 AM
The proper way to install it is to extract everything and copy all of the files into their respective directories in /usr/ So everything in bin goes to /usr/bin; include to /usr/include; lib to /usr/lib; share to /usr/share
It is recommended to use /usr/local/bin if the binaries were compiled by you to not mix them with system binaries in /usr/bin, just a recommendation though.