Set bitcoind to run in the background at startup in Debian Wheezy, Squeeze and Ubuntu Precise Pangolin
Thank GNUtransfer the loan us a VPS and other resources to write this article.
In this post we present a script to run automatically in the background bitcoind at system startup, the script is here bitcoin-init-0.1.0.tar.bz2
This script works in Debian Squeezy, Debian Wheezy and Ubuntu Precise Pangolin maybe also in other versions but we have not tested.
NOTE: Works with bitcoind 0.6.x, 0.7.x and 0.8.x recommend version 0.8.x can see our previous articles on how to install it on Debian How to install bitcoin 0.8.0 on debian squeeze amd64 How to install bitcoin 0.8.0 on debian wheezy amd64 and Ubuntu install instructions are here
Now if we commence with the installation of the script.
Very first download the script
Then decompress it and entered in the directory bitcoin-init-0.1.0
We can see that there is a script called install-bitcoin-init.sh the script is ready to run I install dependencies, create a user for the daemon, copy the files in the system and configure the script, if you want you can edit and modify these variables
The variables are whether to edit
The script will do the following
1 – Install dependencies
Two – Create a user and the home will put in /var/lib/$
Three – Then create the $
Four – Copy files bitcoin-server.conf and bitcoin.conf in $
Five – Substitute the variables needed in bitcoin-server.conf and bitcoin.conf rpc password generated at the time it
6 – Copy bitcoin-init file in /etc/default
7 – copy bitcoin-init.sh in /usr/local/bin
8 – Create the symbolic link /etc/init.d/bitcoin-init.sh pointing to /usr/local/bin/bitcoin-init.sh
9 – Create System-V links to the commence
Ten – Create the SSL certificate for bitcoind
11 – Copy certified in $
12 – Accommodate permissions
Now run the script output should be similar to the following
If you have a bitcoin wallet should copy to /var/lib/bitcoin/.bitcoin
We now proceed to commence the daemon.
Wait a few minutes and attempt to connect to RPC for that we became the bitcoin user and execute a query
If you want to connect with other users can do the following (example with the user rmalvarez)
Then attempt to connect with that user
They can check the script to see detail the steps that meets your needs.
Keep in mind that bitcoin database updated to be long in some cases more than two days.
Bitcoin 0.8.x accept RPC connections even without the database updated (a few minutes into the very first) in the case of versions 0.7.x and 0.6.x RPC not accept connections until you have fully updated base
Any bug or misconception feel free to leave a comment.