@@ -33,24 +33,26 @@ If bitcoind is run with "-daemon" flag, and no rpcpassword is set, it will
33
33
print a randomly generated suitable password to stderr. You can also
34
34
generate one from the shell yourself like this:
35
35
36
- bash -c 'tr -dc a-zA-Z0-9 < /dev/urandom | head -c32 && echo'
36
+ ` bash -c 'tr -dc a-zA-Z0-9 < /dev/urandom | head -c32 && echo' `
37
37
38
- Once you have a password in hand, set rpcpassword= in /etc/bitcoin/bitcoin.conf
38
+ Once you have a password in hand, set ` rpcpassword= ` in ` /etc/bitcoin/bitcoin.conf `
39
+
40
+ ` conf ` , ` pid ` , and ` wallet ` accept relative paths which are interpreted as
41
+ relative to the data directory. ` wallet ` * only* supports relative paths.
39
42
40
43
For an example configuration file that describes the configuration settings,
41
- see contrib/debian/examples/bitcoin.conf.
44
+ see ` contrib/debian/examples/bitcoin.conf ` .
42
45
43
46
3 . Paths
44
47
---------------------------------
45
48
46
49
All three configurations assume several paths that might need to be adjusted.
47
50
48
- Binary: /usr/bin/bitcoind
49
- Configuration file: /etc/bitcoin/bitcoin.conf
50
- Data directory: /var/lib/bitcoind
51
- PID file: /var/run/bitcoind/bitcoind.pid (OpenRC and Upstart)
52
- /var/lib/bitcoind/bitcoind.pid (systemd)
53
- Lock file: /var/lock/subsys/bitcoind (CentOS)
51
+ Binary: ` /usr/bin/bitcoind `
52
+ Configuration file: ` /etc/bitcoin/bitcoin.conf `
53
+ Data directory: ` /var/lib/bitcoind `
54
+ PID file: ` /var/run/bitcoind/bitcoind.pid ` (OpenRC and Upstart) or ` /var/lib/bitcoind/bitcoind.pid ` (systemd)
55
+ Lock file: ` /var/lock/subsys/bitcoind ` (CentOS)
54
56
55
57
The configuration file, PID directory (if applicable) and data directory
56
58
should all be owned by the bitcoin user and group. It is advised for security
@@ -65,29 +67,29 @@ can then be controlled by group membership.
65
67
66
68
Installing this .service file consists of just copying it to
67
69
/usr/lib/systemd/system directory, followed by the command
68
- " systemctl daemon-reload" in order to update running systemd configuration.
70
+ ` systemctl daemon-reload ` in order to update running systemd configuration.
69
71
70
- To test, run " systemctl start bitcoind" and to enable for system startup run
71
- " systemctl enable bitcoind"
72
+ To test, run ` systemctl start bitcoind ` and to enable for system startup run
73
+ ` systemctl enable bitcoind `
72
74
73
75
4b) OpenRC
74
76
75
77
Rename bitcoind.openrc to bitcoind and drop it in /etc/init.d. Double
76
78
check ownership and permissions and make it executable. Test it with
77
- " /etc/init.d/bitcoind start" and configure it to run on startup with
78
- " rc-update add bitcoind"
79
+ ` /etc/init.d/bitcoind start ` and configure it to run on startup with
80
+ ` rc-update add bitcoind `
79
81
80
82
4c) Upstart (for Debian/Ubuntu based distributions)
81
83
82
- Drop bitcoind.conf in /etc/init. Test by running " service bitcoind start"
84
+ Drop bitcoind.conf in /etc/init. Test by running ` service bitcoind start `
83
85
it will automatically start on reboot.
84
86
85
87
NOTE: This script is incompatible with CentOS 5 and Amazon Linux 2014 as they
86
88
use old versions of Upstart and do not supply the start-stop-daemon utility.
87
89
88
90
4d) CentOS
89
91
90
- Copy bitcoind.init to /etc/init.d/bitcoind. Test by running " service bitcoind start" .
92
+ Copy bitcoind.init to /etc/init.d/bitcoind. Test by running ` service bitcoind start ` .
91
93
92
94
Using this script, you can adjust the path and flags to the bitcoind program by
93
95
setting the BITCOIND and FLAGS environment variables in the file
@@ -99,4 +101,3 @@ setting the BITCOIND and FLAGS environment variables in the file
99
101
Auto respawning is currently only configured for Upstart and systemd.
100
102
Reasonable defaults have been chosen but YMMV.
101
103
102
-
0 commit comments