Bitcoin Forum
May 19, 2024, 06:03:41 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: file location after bitcoin-core installation  (Read 85 times)
22bits (OP)
Member
**
Offline Offline

Activity: 63
Merit: 21


View Profile
May 15, 2024, 09:22:59 AM
Merited by LoyceV (4), ABCbits (2)
 #1

I have installed bitcoin-core on with the following environment:
Bitcoin Client Software and Version Number:  bitcoin-25.0-x86_64-linux-gnu
Operating System: Ubuntu 22.04.4 LTS
System Hardware Specs: Intel(R) Core(TM) i5-3470T CPU @ 2.90GHz 1 physical processor; 2 cores; 4 threads, RAM 7909288 KiB

What I am wondering is about file locations.  There is documentation on running the core as a systemd job in the background which I will be able to set up.  There is also information on various paths assumed in the documentation, such as:



Code:
Binary:              /usr/bin/bitcoind
Configuration file:  /etc/bitcoin/bitcoin.conf
Data directory:      /var/lib/bitcoind
PID file:            /var/run/bitcoind/bitcoind.pid (OpenRC and Upstart) or
                     /run/bitcoind/bitcoind.pid (systemd)

Am I correct in thinking after the install I should manually move the specified files from the current location:
Code:
~/snap/bitcoin-core/common/.bitcoin

to the specified directories?  Or is there a problem with the install that the files were not created there?

ranochigo
Legendary
*
Offline Offline

Activity: 2968
Merit: 4193



View Profile
May 15, 2024, 09:26:56 AM
Merited by ABCbits (1), promise444c5 (1)
 #2

You don't have to. During the initialization, if Bitcoin Core doesn't detect a data directory then it would prompt the user to specify a data directory. Else, it would automatically create a data directory for you in the default data directory path.

█████████████████████████
████▐██▄█████████████████
████▐██████▄▄▄███████████
████▐████▄█████▄▄████████
████▐█████▀▀▀▀▀███▄██████
████▐███▀████████████████
████▐█████████▄█████▌████
████▐██▌█████▀██████▌████
████▐██████████▀████▌████
█████▀███▄█████▄███▀█████
███████▀█████████▀███████
██████████▀███▀██████████
█████████████████████████
.
BC.GAME
▄▄░░░▄▀▀▄████████
▄▄▄
██████████████
█████░░▄▄▄▄████████
▄▄▄▄▄▄▄▄▄██▄██████▄▄▄▄████
▄███▄█▄▄██████████▄████▄████
███████████████████████████▀███
▀████▄██▄██▄░░░░▄████████████
▀▀▀█████▄▄▄███████████▀██
███████████████████▀██
███████████████████▄██
▄███████████████████▄██
█████████████████████▀██
██████████████████████▄
.
..CASINO....SPORTS....RACING..
█░░░░░░█░░░░░░█
▀███▀░░▀███▀░░▀███▀
▀░▀░░░░▀░▀░░░░▀░▀
░░░░░░░░░░░░
▀██████████
░░░░░███░░░░
░░█░░░███▄█░░░
░░██▌░░███░▀░░██▌
░█░██░░███░░░█░██
░█▀▀▀█▌░███░░█▀▀▀█▌
▄█▄░░░██▄███▄█▄░░▄██▄
▄███▄
░░░░▀██▄▀


▄▄████▄▄
▄███▀▀███▄
██████████
▀███▄░▄██▀
▄▄████▄▄░▀█▀▄██▀▄▄████▄▄
▄███▀▀▀████▄▄██▀▄███▀▀███▄
███████▄▄▀▀████▄▄▀▀███████
▀███▄▄███▀░░░▀▀████▄▄▄███▀
▀▀████▀▀████████▀▀████▀▀
22bits (OP)
Member
**
Offline Offline

Activity: 63
Merit: 21


View Profile
May 15, 2024, 09:39:42 AM
 #3


Quote
You don't have to. During the initialization, if Bitcoin Core doesn't detect a data directory then it would prompt the user to specify a data directory. Else, it would automatically create a data directory for you in the default data directory path.
That makes sense, but what about the bitcoin-core executable, wouldn't that need to be there or how would it know what to run?
22bits (OP)
Member
**
Offline Offline

Activity: 63
Merit: 21


View Profile
May 15, 2024, 02:49:01 PM
 #4

There is this line in the bitcoind.service systemd file:

Code:
ExecStart=/usr/bin/bitcoind

As far as I understand it the bitcoind mentioned above is a script, not an executable, correct?   Or should it be an executable?  I tried moving an executable to /usr/bin/bitcoind but get an error 203 when starting the service.

What should end up in /usr/bin/bitcoind and is there on in the install instructions somewhere?

reference:  https://github.com/bitcoin/bitcoin/blob/master/contrib/init/bitcoind.service
22bits (OP)
Member
**
Offline Offline

Activity: 63
Merit: 21


View Profile
May 15, 2024, 03:10:41 PM
Last edit: May 15, 2024, 03:21:28 PM by 22bits
 #5

I also found this: https://www.reddit.com/r/Bitcoin/comments/wfhuyy/how_to_setup_bitcoincore_snap_on_ubuntu_2204/ -- the significant quote is:
Quote
I think I may have worked this out. In /snap/bin there is a symlink called bitcoin-core.daemon.

When I run this it creates a directory structure ~/snap/bitcoin-core in the current user account.

Is this something necessary to do during the install to set up the data directories needed for the systemd?:
Code:
Binary:              /usr/bin/bitcoind
Configuration file:  /etc/bitcoin/bitcoin.conf
Data directory:      /var/lib/bitcoind
PID file:            /var/run/bitcoind/bitcoind.pid (OpenRC and Upstart) or
                     /run/bitcoind/bitcoind.pid (systemd)

I did find the reference symlink in /snap/bin

Also from the documentation as referenced the specified directories automatically get created. 
Quote
NOTE: When using the systemd .service file, the creation of the aforementioned directories and the setting of their permissions is automatically handled by systemd. Directories are given a permission of 710, giving the bitcoin group access to files under it if the files themselves give permission to the bitcoin group to do so. This does not allow for the listing of files under the directory.
So to get the systemd service running, I believe I need to know if I can just copy the executable over to /usr/bin/bitcoind or does this need to be a script?
Sorry for question not being too clear, just really beating head against wall on this one Smiley
22bits (OP)
Member
**
Offline Offline

Activity: 63
Merit: 21


View Profile
May 15, 2024, 03:32:44 PM
 #6

Another note:  I think it is a problem with the original snap installation.  I just went to the Ubuntu Software and clicked on the bitcoin-core.  The process is a bit different from the more manual one specified here:
https://blockgeeks.com/install-bitcoin-core/
which includes this:
Quote
We’ll now use the install command to install the necessary components into the /usr/local/bin directory like so:

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

Think this is what I am missing, with check this tomorrow.
22bits (OP)
Member
**
Offline Offline

Activity: 63
Merit: 21


View Profile
May 16, 2024, 05:09:54 AM
 #7

Makes more sense now.  The snap installation and the installation here:
https://bitcoin.org/en/full-node#linux-instructions
do not have the same result. 
I re-did following the above and using the daemon, works fine. 
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!