Compiling the Litecoin daemon from source on Debian: Difference between revisions

From lurkmore wiki
Jump to navigationJump to search
No edit summary
m (9 revisions imported)
 
(7 intermediate revisions by one other user not shown)
Line 1: Line 1:
The process for compiling the '''[[Litecoin]]''' daemon, '''[[litecoind]]''', from the source code is pretty simple. This guide is using [[Debian Linux]], though it should not need many modifications for any distros which are forked from Debian, such as [[Ubuntu]] and [[Xubuntu]].
The process for compiling the '''[[Litecoin]]''' daemon, '''litecoind''', from the source code is pretty simple. This guide is using [[Debian Linux]], though it should not need many modifications for any distros which are forked from Debian, such as [[Ubuntu]] and [[Xubuntu]].


=== Update and install dependencies ===
=== Update and install dependencies ===
Line 5: Line 5:
apt-get install ntp git build-essential libssl-dev libdb-dev libdb++-dev libboost-all-dev libqrencode-dev
apt-get install ntp git build-essential libssl-dev libdb-dev libdb++-dev libboost-all-dev libqrencode-dev


wget http://miniupnp.free.fr/files/download.php?file=miniupnpc-1.8.tar.gz
wget http://miniupnp.free.fr/files/download.php?file=miniupnpc-1.8.tar.gz && tar -zxf download.php\?file\=miniupnpc-1.8.tar.gz && cd miniupnpc-1.8/
tar -zxf download.php\?file\=miniupnpc-1.8.tar.gz
make && make install && cd .. && rm -rf miniupnpc-1.8 download.php\?file\=miniupnpc-1.8.tar.gz</pre>
cd miniupnpc-1.8/
make
make install
cd ..
rm -rf miniupnpc-1.8 download.php\?file\=miniupnpc-1.8.tar.gz</pre>


== Compile the daemon ==
== Compile the daemon ==
=== Add a new user ===
<pre>adduser litecoin
su litecoin</pre>
=== Download the source code ===
=== Download the source code ===
<pre>cd ~
<pre>git clone https://github.com/litecoin-project/litecoin</pre>
git clone https://github.com/litecoin-project/litecoin</pre>


=== Compile litecoind ===
=== Compile litecoind ===
<pre>cd litecoin/src
<pre>cd litecoin/src
make -f makefile.unix USE_UPNP=1 USE_QRCODE=1 USE_IPV6=1
make -f makefile.unix USE_UPNP=1 USE_QRCODE=1 USE_IPV6=1
strip litecoind
strip litecoind</pre>
exit</pre>


== Clean up and run the daemon ==
=== Add a user and move litecoind ===
=== Copy litecoind to the system directory ===
<pre>adduser litecoin && usermod -g users litecoin && delgroup litecoin && chmod 0701 /home/litecoin
<pre>cp /home/litecoin/litecoin/src/litecoind /usr/bin/litecoind</pre>
mkdir /home/litecoin/bin
cp ~/litecoin/src/litecoind /home/litecoin/bin/litecoind
chown -R litecoin:users /home/litecoin/bin
cd && rm -rf litecoin
</pre>


=== Clean up source code and run litecoind ===
== Run the daemon ==
<pre>su litecoin
<pre>su litecoin
cd ~
cd && bin/litecoind</pre>
rm -rf litecoin
litecoind</pre>


On the first run, litecoind will return an error and tell you to make a configuration file, named '''[[litecoin.conf]]''', in order to add a username and password to the file.
On the first run, litecoind will return an error and tell you to make a configuration file, named '''litecoin.conf''', in order to add a username and password to the file.


<pre>nano ~/.litecoin/litecoin.conf</pre>
<pre>nano ~/.litecoin/litecoin.conf && chmod 0600 ~/.litecoin/litecoin.conf</pre>


Add the following to your config file, changing the username and password to something secure:
Add the following to your config file, changing the username and password to something secure:
Line 48: Line 39:
rpcpassword=<secure password></pre>
rpcpassword=<secure password></pre>


You can copy the password that you are given in the error message.
You can just copy the username and password provided by the error message when you first ran litecoind.
 
Run <code>litecoind</code> once more to start the daemon!


=== Using litecoind ===
=== Using litecoind ===
Line 56: Line 49:


== Related articles ==
== Related articles ==
* [[Litecoin]]
* [[Debian Linux cryptocoin mining rig setup guide]]
* [[Debian Linux cryptocoin mining rig setup guide]]


[[Category:Cryptocurrency]][[Category:Software]]
[[Category:Cryptocurrency]][[Category:Software]]

Latest revision as of 00:16, 1 April 2022

The process for compiling the Litecoin daemon, litecoind, from the source code is pretty simple. This guide is using Debian Linux, though it should not need many modifications for any distros which are forked from Debian, such as Ubuntu and Xubuntu.

Update and install dependencies

apt-get update && apt-get upgrade
apt-get install ntp git build-essential libssl-dev libdb-dev libdb++-dev libboost-all-dev libqrencode-dev

wget http://miniupnp.free.fr/files/download.php?file=miniupnpc-1.8.tar.gz && tar -zxf download.php\?file\=miniupnpc-1.8.tar.gz && cd miniupnpc-1.8/
make && make install && cd .. && rm -rf miniupnpc-1.8 download.php\?file\=miniupnpc-1.8.tar.gz

Compile the daemon

Download the source code

git clone https://github.com/litecoin-project/litecoin

Compile litecoind

cd litecoin/src
make -f makefile.unix USE_UPNP=1 USE_QRCODE=1 USE_IPV6=1
strip litecoind

Add a user and move litecoind

adduser litecoin && usermod -g users litecoin && delgroup litecoin && chmod 0701 /home/litecoin
mkdir /home/litecoin/bin
cp ~/litecoin/src/litecoind /home/litecoin/bin/litecoind
chown -R litecoin:users /home/litecoin/bin
cd && rm -rf litecoin

Run the daemon

su litecoin
cd && bin/litecoind

On the first run, litecoind will return an error and tell you to make a configuration file, named litecoin.conf, in order to add a username and password to the file.

nano ~/.litecoin/litecoin.conf && chmod 0600 ~/.litecoin/litecoin.conf

Add the following to your config file, changing the username and password to something secure:

daemon=1
rpcuser=<username>
rpcpassword=<secure password>

You can just copy the username and password provided by the error message when you first ran litecoind.

Run litecoind once more to start the daemon!

Using litecoind

litecoind help

The above command will list all available functions of the Litecoin daemon. To safely stop the daemon, execute litecoind stop.

Related articles