Running a full bitcoin node on osx is a good way to familiarize yourself with blockchain administration. You can explore the ledger locally and you don’t suffer any of the risks Simple Payment Verification nodes suffer from. You can “Be your own Bank” or so they say. If you have ~300 GB of free disk space you should try it out.
The steps below will walk you through installing and running a bitcoin node on your osx computer.
You will get a copy of the source code, compile it, configure it, install it to run on startup and verify it’s running.
For those installing bitcoin on a secondary harddrive there are some extra steps.
If you are not using the default location you have to specify the install directory when using the commands, e.g.
bitcoin-cli -datadir=<data location> getblockchaininfo. The configuration file will be read from the install directory.
Note if you choose to run a lightweight node, you cannot look up arbitrary bitcoin transaction info.
These instructions build upon the instructions in github.
brew install automake berkeley-db4 libtool boost miniupnpc openssl pkg-config protobuf python qt libevent qrencode
make(may take > 15 minutes to compile)
sudo make install. You’ll now have
/Users/<user name>/Library/Application Support/Bitcoin. This will be your
<data location>as used in the rest of these instructions. I used
/Volumes/secondDisk/Bitcoinbecause I had a large secondary disk.
bitcoindthis will also begin constructing the configuration files. (If you are not using the default location specify the data location as an argument, i.e.,
bitcoind -datadir=<data location>.)
To learn more about configuring bitcoin see configuring.
cp contrib/init/org.bitcoin.bitcoind.plist ~/Library/LaunchAgents
<string>-datadir=/Volumes/<data location>/Bitcoin/</string>as shown below:
launchctl load ~/Library/LaunchAgents/org.bitcoin.bitcoind.plist
ps aux | grep bitcoindif you see an entry like:
admin 83592 69.5 1.5 4592184 247812 ?? R 1:20AM 0:20.46 /usr/local/bin/bitcoindit means it’s running.
launchctl list) edit the config and reload with
launchctl unload ~/Library/LaunchAgents/org.bitcoin.bitcoind.plistand
launchctl load ~/Library/LauchAgents/org.bitcoin.bitcoind.plist
bitcoin-cli -datadir=<data location> getrawtransaction 10d7c4e022f35288779be6713471151ede967caaa39eecd35296aa36d9c109ec
To stop the bitcoin
launchctl unload ~/Library/LaunchAgents/org.bitcoin.bitcoind.plist.
Let me know if these instructions work for you!
If you need help solving your business problems with software read how to hire me.