user93369: I am really sorry, please teach.
Please tell me the procedure for installing bitcoin full node in CUI on CentOS.
Currently I installed using the following procedure, but I got an error in RPC authentication.
1.
$ sudo yum install wget
2.
$ sudo wget https://bitcoin.org/bin/bitcoin-core-0.17.1/bitcoin-0.17.1-x86_64-linux-gnu.tar.gz
3.
$ sudo wget https://bitcoin.org/bin/bitcoin-core-0.17.1/SHA256SUMS.asc
4.
$ sudo wget https://bitcoin.org/laanwj-releases.asc
5.
$ sudo gpg --import laanwj-releases.asc
6.
$ sudo tar -zxvf bitcoin-0.17.1-x86_64-linux-gnu.tar.gz
7.
$ sudo install -m 0755 -o USER_NAME -g root -t /usr/local/bin bitcoin-0.17.1/bin/*
8.
$ mkdir ~/.bitcoin
9.
$ vi ~/.bitcoin/bitcoin.conf

Enter the following with vi and save.

mainnet = 1
txindex = 1
server = 1
rest = 1
rpcuser = a
rpcpassword = a
rpcport = 8332

11.
$ cd /DATA_DIR
12.
$ sudo mkdir bitcoin
13.
$ sudo chmod -R 777 bitcoin/
14.
$ bitcoind -daemon -datadir=/DATA_DIR/bitcoin -conf=/.bitcoin/bitcoin.conf
Bitcoin server starting
15.
$ bitcoin-cli getbalance
After this, the following URL error will occur.
error: Authorization failed: Incorrect rpcuser or rpcpassword
error: Authorization failed: Incorrect rpcuser or rpcpassword
Which procedure is wrong and how do I fix it?
I am really sorry, please teach.

user48884: In your bitcoin.conf, remove the spaces before and after the equals (=) sign. I believe the conf file parser does not handle spaces well.
Also, your command has -conf=/.bitcoin/bitcoin.conf, but your conf file is at ~/.bitcoin/bitcoin.conf so it is pointing to the wrong location.

93369: <p>I am really sorry, please teach.
Please tell me the procedure for installing bitcoin full node in CUI on CentOS.
Currently I installed using the following procedure, but I got an error in RPC authentication.</p>

<p>1.
<code>$ sudo yum install wget</code></p>

<p>2.
<code>$ sudo wget https://bitcoin.org/bin/bitcoin-core-0.17.1/bitcoin-0.17.1-x86_64-linux-gnu.tar.gz</code></p>

<p>3.
<code>$ sudo wget https://bitcoin.org/bin/bitcoin-core-0.17.1/SHA256SUMS.asc</code></p>

<p>4.
<code>$ sudo wget https://bitcoin.org/laanwj-releases.asc</code></p>

<p>5.
<code>$ sudo gpg --import laanwj-releases.asc</code></p>

<p>6.
<code>$ sudo tar -zxvf bitcoin-0.17.1-x86_64-linux-gnu.tar.gz</code></p>

<p>7.
<code>$ sudo install -m 0755 -o USER_NAME -g root -t /usr/local/bin bitcoin-0.17.1/bin/*</code></p>

<p>8.
<code>$ mkdir ~/.bitcoin</code></p>

<p>9.
<code>$ vi ~/.bitcoin/bitcoin.conf</code></p>

<ol start="10">
<li>Enter the following with vi and save.</li>
</ol>

<pre><code>mainnet = 1
txindex = 1
server = 1
rest = 1
rpcuser = a
rpcpassword = a
rpcport = 8332
</code></pre>

<p>11.
<code>$ cd /DATA_DIR</code></p>

<p>12.
<code>$ sudo mkdir bitcoin</code></p>

<p>13.
<code>$ sudo chmod -R 777 bitcoin/</code></p>

<p>14.
<code>$ bitcoind -daemon -datadir=/DATA_DIR/bitcoin -conf=/.bitcoin/bitcoin.conf</code></p>

<p><code>Bitcoin server starting</code></p>

<p>15.
<code>$ bitcoin-cli getbalance</code></p>

<p>After this, the following URL error will occur.
<a href="https://bitcoin.stackexchange.com/questions/85705/error-authorization-failed-incorrect-rpcuser-or-rpcpassword">error: Authorization failed: Incorrect rpcuser or rpcpassword</a></p>

<p><code>error: Authorization failed: Incorrect rpcuser or rpcpassword</code></p>

<p>Which procedure is wrong and how do I fix it?
I am really sorry, please teach.</p>
 48884: <p>In your bitcoin.conf, remove the spaces before and after the equals (<code>=</code>) sign. I believe the conf file parser does not handle spaces well.</p>

<p>Also, your command has <code>-conf=/.bitcoin/bitcoin.conf</code>, but your conf file is at <code>~/.bitcoin/bitcoin.conf</code> so it is pointing to the wrong location.</p>
