modified: Install-Bitcoind-from-Source-on-Linux.md
modified: Install-MMGen-on-Microsoft-Windows.md
parent
03401ccac3
commit
9207ce29ff
2 changed files with 149 additions and 117 deletions
|
|
@ -5,17 +5,18 @@ binaries are available for Bitcoin Core, Bitcoin ABC and Litecoin. See the
|
|||
|
||||
### Install dependencies:
|
||||
|
||||
> Make sure the required boost library development packages are installed:
|
||||
> Make sure the required development packages are installed:
|
||||
|
||||
Debian/Ubuntu:
|
||||
|
||||
```text
|
||||
sudo apt-get install libboost-system-dev libboost-filesystem-dev libboost-program-options-dev libboost-chrono-dev libboost-test-dev libboost-thread-dev
|
||||
sudo apt-get install build-essential libtool autotools-dev autoconf pkg-config libssl-dev libdb-dev libdb++-dev libevent-dev libboost-system-dev libboost-filesystem-dev libboost-program-options-dev libboost-chrono-dev libboost-test-dev libboost-thread-dev
|
||||
```
|
||||
|
||||
> You’ll also need the following standard dependencies, if they’re not already on
|
||||
> your system:
|
||||
ArchLinux:
|
||||
|
||||
```text
|
||||
sudo apt-get install build-essential libtool autotools-dev autoconf pkg-config libssl-dev libdb-dev libdb++-dev libevent-dev
|
||||
pacman --sync --needed autoconf automake boost gcc git libevent libtool make pkgconf python sqlite
|
||||
```
|
||||
|
||||
### Compile and install Bitcoin Core:
|
||||
|
|
|
|||
|
|
@ -5,22 +5,26 @@
|
|||
#### [Install MSYS2 and MMGen](#a_m)
|
||||
* [1. Install MSYS2](#a_ms)
|
||||
* [2. Upgrade MSYS2](#a_ug)
|
||||
* [Online users](#a_ug1)
|
||||
* [Online install](#a_ug1)
|
||||
* [Offline install](#a_ug2)
|
||||
* [3. Install MSYS2 MMGen dependencies](#a_md)
|
||||
* [3. Install MMGen MSYS2 dependencies](#a_md)
|
||||
* [Offline install](#a_md1)
|
||||
* [4. Set up your environment](#a_ev)
|
||||
* [5. Install the Python ECDSA library (offline install only)](#a_ec)
|
||||
* [6. Install the standalone scrypt package (required for strong password hashing)](#a_sc)
|
||||
* [7. Clone and copy the secp256k1 library (offline install only)](#a_se)
|
||||
* [8. Install MMGen](#a_mm)
|
||||
* [Stable version](#a_mms)
|
||||
* [Development version](#a_mmd)
|
||||
* [9. Install Python Ethereum dependencies (Ethereum users only)](#a_pe)
|
||||
* [10. Install and launch your coin daemons](#a_cd)
|
||||
* [11. You’re done!](#a_do)
|
||||
|
||||
#### [Keeping your installation up to date](#a_u)
|
||||
* [MSYS2](#a_us)
|
||||
* [MMGen](#a_um)
|
||||
* [Upgrading MSYS2](#a_us)
|
||||
* [Upgrading MMGen](#a_um)
|
||||
* [Upgrade to latest stable version](#a_ums)
|
||||
* [Upgrade to latest development version](#a_umd)
|
||||
|
||||
## <a id="a_i">Introduction</a>
|
||||
|
||||
|
|
@ -33,20 +37,20 @@ improvements such as package management and support for Python 3. The MSYS2
|
|||
project page is located [here][mp] and its wiki [here][mw].
|
||||
|
||||
Before you get started, just a reminder that MMGen must be installed on two
|
||||
computers, one online and one offline, if you want to use it securely. All
|
||||
operations involving private data—wallet generation, address generation and
|
||||
transaction signing—are handled offline, while the online installation takes
|
||||
care of tracking balances and creating and sending transactions.
|
||||
computers, one online and one offline. All operations involving private
|
||||
data—wallet generation, address generation and transaction signing—are handled
|
||||
offline, while the online machine takes care of tracking balances and creating
|
||||
and sending transactions.
|
||||
|
||||
This means that once you’ve finished the install process, the computer you’ve
|
||||
designated for offline use must be taken offline **permanently.** Furthermore,
|
||||
its wi-fi and bluetooth interfaces should be disabled as well to safeguard
|
||||
against the possibility of private data leakage.
|
||||
its wifi and bluetooth interfaces must be disabled as well to safeguard against
|
||||
private data leakage.
|
||||
|
||||
With some extra steps, it’s possible to perform the installation on a machine
|
||||
that’s *already* offline. These steps will be additionally outlined in
|
||||
sections entitled **Offline install.** When doing an online install you may
|
||||
skip over these sections.
|
||||
sections entitled **Offline install.** When doing an online install you will
|
||||
ignore these sections.
|
||||
|
||||
## <a id="a_m">Install MSYS2 and MMGen</a>
|
||||
|
||||
|
|
@ -55,11 +59,10 @@ skip over these sections.
|
|||
Download the MSYS2 executable installer for your architecture from the [MSYS2
|
||||
homepage][mh], but ignore the installation instructions there.
|
||||
|
||||
Run the installer, accepting all defaults. At the end of the installation,
|
||||
Run the installer, accepting all defaults. When installation completes,
|
||||
uncheck ‘Run MSYS2 now’ and click ‘Finish’. From the Start menu, drag the
|
||||
‘MSYS2 UCRT64’ icon to the desktop. This is the icon you will use to launch
|
||||
all MSYS2 terminal sessions from now on. Double-click the icon to launch the
|
||||
terminal.
|
||||
‘MSYS2 UCRT64’ icon to the desktop. You will use it to launch all MSYS2
|
||||
terminal sessions from now on. Double-click the icon to launch the terminal.
|
||||
|
||||
Note that the root of your MSYS2 installation is located in `C:\\msys64`, so the
|
||||
following commands, for example, will produce a listing of the same directory:
|
||||
|
|
@ -71,9 +74,7 @@ $ ls 'C:\\msys64\etc' # the path as seen by Windows
|
|||
|
||||
### <a id="a_ug">2. Upgrade MSYS2</a>
|
||||
|
||||
#### <a id="a_ug1">Online users:</a>
|
||||
|
||||
> Optionally edit your mirror lists as described in **Offline install** below.
|
||||
#### <a id="a_ug1">Online install:</a>
|
||||
|
||||
> Update the package database and core system packages:
|
||||
|
||||
|
|
@ -81,11 +82,7 @@ $ ls 'C:\\msys64\etc' # the path as seen by Windows
|
|||
$ pacman -Syu
|
||||
```
|
||||
|
||||
> Exit and restart the MSYS2 terminal. If you’re using modified mirror lists,
|
||||
> they may have been overwritten by the update operation, in which case you
|
||||
> should restore them from your modified versions.
|
||||
|
||||
> Now complete upgrading the system:
|
||||
> Exit and restart the MSYS2 terminal. Complete upgrading the system:
|
||||
|
||||
```text
|
||||
$ pacman -Su
|
||||
|
|
@ -97,42 +94,29 @@ $ pacman -Su
|
|||
> Internet on your online computer and copy them to your offline box. A USB
|
||||
> flash drive works ideally for this.
|
||||
|
||||
> The mirror list files located in the directory `/etc/pacman.d` specify the
|
||||
> servers to download packages from.
|
||||
|
||||
> The server that’s listed first in these files is the one that will used by
|
||||
> default, so you may wish to edit them and place the server you wish to use
|
||||
> first in the list. For this you may use a text editor such as Notepad or
|
||||
> Nano:
|
||||
|
||||
```text
|
||||
$ nano /etc/pacman.d/mirrorlist.msys
|
||||
... repeat for remaining mirrorlist files ...
|
||||
```
|
||||
|
||||
> You need to update your database files as well. The database files and their
|
||||
> associated signature files can be listed by issuing the following command:
|
||||
> Begin by updating the pacman database. The database files and their
|
||||
> associated signatures can be listed by issuing the following command:
|
||||
|
||||
```text
|
||||
$ ls /var/lib/pacman/sync
|
||||
```
|
||||
|
||||
> Download up-to-date versions of these files from a fast MSYS2 mirror:
|
||||
> Download up-to-date versions of these files from the primary MSYS2 mirror:
|
||||
|
||||
>> <https://mirror.yandex.ru/mirrors/msys2/msys/x86_64/msys.db>
|
||||
>> <https://mirror.yandex.ru/mirrors/msys2/msys/x86_64/msys.db.sig>
|
||||
>> <https://mirror.yandex.ru/mirrors/msys2/mingw/x86_64/mingw64.db>
|
||||
>> <https://mirror.yandex.ru/mirrors/msys2/mingw/x86_64/mingw64.db.sig>
|
||||
>> <https://mirror.yandex.ru/mirrors/msys2/mingw/i686/mingw32.db>
|
||||
>> <https://mirror.yandex.ru/mirrors/msys2/mingw/i686/mingw32.db.sig>
|
||||
>> <https://mirror.yandex.ru/mirrors/msys2/mingw/clang64/clang64.db>
|
||||
>> <https://mirror.yandex.ru/mirrors/msys2/mingw/clang64/clang64.db.sig>
|
||||
>> <https://mirror.yandex.ru/mirrors/msys2/mingw/clang32/clang32.db>
|
||||
>> <https://mirror.yandex.ru/mirrors/msys2/mingw/clang32/clang32.db.sig>
|
||||
>> <https://mirror.yandex.ru/mirrors/msys2/mingw/clangarm64/clangarm64.db>
|
||||
>> <https://mirror.yandex.ru/mirrors/msys2/mingw/clangarm64/clangarm64.db.sig>
|
||||
>> <https://mirror.yandex.ru/mirrors/msys2/mingw/ucrt64/ucrt64.db>
|
||||
>> <https://mirror.yandex.ru/mirrors/msys2/mingw/ucrt64/ucrt64.db.sig>
|
||||
>> <https://mirror.msys2.org/msys/x86_64/msys.db>
|
||||
>> <https://mirror.msys2.org/msys/x86_64/msys.db.sig>
|
||||
>> <https://mirror.msys2.org/mingw/x86_64/mingw64.db>
|
||||
>> <https://mirror.msys2.org/mingw/x86_64/mingw64.db.sig>
|
||||
>> <https://mirror.msys2.org/mingw/i686/mingw32.db>
|
||||
>> <https://mirror.msys2.org/mingw/i686/mingw32.db.sig>
|
||||
>> <https://mirror.msys2.org/mingw/clang64/clang64.db>
|
||||
>> <https://mirror.msys2.org/mingw/clang64/clang64.db.sig>
|
||||
>> <https://mirror.msys2.org/mingw/clang32/clang32.db>
|
||||
>> <https://mirror.msys2.org/mingw/clang32/clang32.db.sig>
|
||||
>> <https://mirror.msys2.org/mingw/clangarm64/clangarm64.db>
|
||||
>> <https://mirror.msys2.org/mingw/clangarm64/clangarm64.db.sig>
|
||||
>> <https://mirror.msys2.org/mingw/ucrt64/ucrt64.db>
|
||||
>> <https://mirror.msys2.org/mingw/ucrt64/ucrt64.db.sig>
|
||||
|
||||
> Copy the files to your offline machine, replacing the originals at
|
||||
> `C:\msys64\var\lib\pacman\sync`.
|
||||
|
|
@ -170,25 +154,24 @@ $ pacman -U packages1/*
|
|||
|
||||
> Now reissue the `pacman -Sup` command, which may or may not generate another
|
||||
> list of URLs. If it does, repeat the same download/copy/install procedure
|
||||
> with the new URLs, only using a new `packages2` directory instead of
|
||||
> with the new URLs, only with a new `packages2` directory instead of
|
||||
> `packages1`.
|
||||
|
||||
> Your system upgrade is now complete.
|
||||
|
||||
### <a id="a_md">3. Install MSYS2 MMGen dependencies</a>
|
||||
### <a id="a_md">3. Install MMGen MSYS2 dependencies</a>
|
||||
|
||||
Now that your system’s fully up to date, you’re ready to install the packages
|
||||
specifically required by MMGen.
|
||||
Now you’re ready to install the packages specifically required by MMGen.
|
||||
|
||||
#### <a id="a_md1">Offline install:</a>
|
||||
|
||||
> As you’ve probably noticed by now, the command `pacman -S <pgknames>`
|
||||
> installs MSYS2 packages and their dependencies, while `pacman -Sp
|
||||
> <pgknames>` prints a list of download URLs for the same packages and
|
||||
> dependencies. So before running the command shown below, you must first
|
||||
> issue it with `-Sp` instead of `-S` to produce a URL list. Then repeat the
|
||||
> above download/copy/install steps once again with the new URLs, replacing
|
||||
> `packages2` with `packages3`.
|
||||
> downloads and installs MSYS2 packages and their dependencies, while `pacman
|
||||
> -Sp <pgknames>` prints a list of download URLs for those same packages and
|
||||
> dependencies. Accordingly, you must issue the command below with `-Sp`
|
||||
> instead of `-S` to produce a URL list. Then repeat the above
|
||||
> download/copy/install steps once again with the new URLs, downloading into
|
||||
> a new directory, say `packages3`.
|
||||
|
||||
Install the MMGen requirements and their dependencies:
|
||||
|
||||
|
|
@ -253,15 +236,15 @@ $ python3 -m pip download ecdsa
|
|||
Copy the downloaded file to your offline machine and install:
|
||||
|
||||
```text
|
||||
$ python3 -m pip install --user ecdsa-*.whl
|
||||
$ python3 -m pip install ecdsa-*.whl
|
||||
```
|
||||
|
||||
### <a id="a_sc">6. Install the standalone scrypt package (required for strong password hashing)</a>
|
||||
|
||||
Thanks to a faulty implementation of the `scrypt` function included in Python’s
|
||||
Due to a faulty implementation of the `scrypt` function included in Python’s
|
||||
`hashlib`, the standalone `scrypt` module is required for stronger-than-default
|
||||
password hashing, i.e. hash presets greater than `3`. Installing the package is
|
||||
therefore highly recommended.
|
||||
password hashing (i.e. hash presets greater than `3`). Installing the package is
|
||||
therefore highly advisable.
|
||||
|
||||
On your online machine, clone the Py-Scrypt repository from Github:
|
||||
|
||||
|
|
@ -269,14 +252,16 @@ On your online machine, clone the Py-Scrypt repository from Github:
|
|||
$ git clone https://github.com/holgern/py-scrypt.git
|
||||
```
|
||||
|
||||
For offline installs, copy the cloned repo to your offline machine.
|
||||
Offline install:
|
||||
|
||||
> Copy the cloned repo to your offline machine.
|
||||
|
||||
Build and install:
|
||||
|
||||
```text
|
||||
$ cd py-scrypt
|
||||
$ python3 -m build --no-isolation
|
||||
$ python3 -m pip install --user dist/*.whl
|
||||
$ python3 -m pip install dist/*.whl
|
||||
```
|
||||
|
||||
### <a id="a_se">7. Clone and copy the secp256k1 library (offline install only)</a>
|
||||
|
|
@ -298,60 +283,84 @@ $ ls ~/.cache/mmgen/secp256k1/autogen.sh # check that files were correctly copie
|
|||
|
||||
### <a id="a_mm">8. Install MMGen</a>
|
||||
|
||||
Now you’re ready to install MMGen itself. On your online machine, clone the
|
||||
repository:
|
||||
Now you’re ready to install MMGen itself.
|
||||
|
||||
#### <a id="a_mms">Stable version:</a>
|
||||
|
||||
Online install:
|
||||
|
||||
```text
|
||||
$ python3 -m pip install mmgen-wallet
|
||||
```
|
||||
|
||||
Offline install:
|
||||
|
||||
```text
|
||||
$ python3 -m pip download mmgen-wallet
|
||||
```
|
||||
|
||||
> Copy the downloaded tar.gz archive to your offline machine.
|
||||
|
||||
```text
|
||||
$ python3 -m pip install --no-build-isolation mmgen-wallet.*tar.gz
|
||||
```
|
||||
|
||||
#### <a id="a_mmd">Development version:</a>
|
||||
|
||||
*Bear in mind that security vulnerabilities are more likely to be present in
|
||||
development code than in a stable release. In addition, while the tip of
|
||||
`master` is always tested on Linux before being pushed to the public repository,
|
||||
it’s not guaranteed to run or even install on MSYS2. Installation or runtime
|
||||
issues may also arise due to missing dependencies or installation steps not yet
|
||||
covered in the documentation.*
|
||||
|
||||
On your online machine, clone the MMGen repository:
|
||||
|
||||
```text
|
||||
$ git clone https://github.com/mmgen/mmgen
|
||||
Cloning into ’mmgen’...
|
||||
```
|
||||
|
||||
If you’re doing an offline install, then copy the cloned mmgen directory to
|
||||
your offline machine.
|
||||
Offline install:
|
||||
|
||||
> Copy the cloned mmgen directory to your offline machine.
|
||||
|
||||
Enter the repo directory, build and install:
|
||||
|
||||
```text
|
||||
$ cd mmgen
|
||||
$ git checkout stable_msys2 # See 'Note' below
|
||||
$ python3 -m build --no-isolation
|
||||
$ python3 -m pip install --user dist/*.whl
|
||||
$ python3 -m pip install dist/*.whl
|
||||
```
|
||||
|
||||
**Note:** if you want to use features that have appeared since the latest
|
||||
`stable_msys2` release, then you can omit the `git checkout stable_msys2`
|
||||
step and remain on the `master` branch. Please bear in mind, however, that
|
||||
security vulnerabilities are more likely to be present in new code than in a
|
||||
stable release. In addition, while the tip of `master` is always tested on
|
||||
Linux before being pushed to the public repository, it’s not guaranteed to
|
||||
install or run on MSYS2. Installation or runtime issues may also arise due
|
||||
to missing dependencies or installation steps not yet covered in the
|
||||
documentation.
|
||||
The `--force` and `--no-deps` options to `pip install` also come in handy on
|
||||
occasion.
|
||||
|
||||
**Install Note:** The `--force` and `--no-deps` options also come in handy on
|
||||
occasion. Note that MMGen has a test suite. Refer to the [Test Suite][ts]
|
||||
wiki page for details.
|
||||
Note that MMGen has a test suite. Refer to the [Test Suite][ts] wiki page for
|
||||
details.
|
||||
|
||||
### <a id="a_pe">9. Install Python Ethereum dependencies (Ethereum users only)</a>
|
||||
|
||||
If you’ll be using MMGen with Ethereum, then you must install a few
|
||||
dependencies. From the MMGen repository root, type the following:
|
||||
|
||||
Online install:
|
||||
|
||||
```text
|
||||
$ python3 -m pip install --no-deps -r eth-requirements.txt
|
||||
```
|
||||
|
||||
For an offline install, do this instead:
|
||||
Offline install:
|
||||
|
||||
```text
|
||||
$ python3 -m pip download --no-deps -r eth-requirements.txt
|
||||
```
|
||||
|
||||
Then transfer the downloaded files to your offline machine, `cd` to the
|
||||
directory containing the files and install them as follows:
|
||||
> Transfer the downloaded files to your offline machine, `cd` to the directory
|
||||
> containing the files and install them:
|
||||
|
||||
```text
|
||||
$ python3 -m pip install --no-deps --user *.whl
|
||||
$ python3 -m pip install --no-deps *.whl
|
||||
```
|
||||
|
||||
### <a id="a_cd">10. Install and launch your coin daemons</a>
|
||||
|
|
@ -394,43 +403,65 @@ Please be aware of the following, however:
|
|||
|
||||
## <a id="a_u">Keeping your installation up to date</a>
|
||||
|
||||
### <a id="a_us">MSYS2</a>
|
||||
### <a id="a_us">Upgrading MSYS2</a>
|
||||
|
||||
You should periodically upgrade your MSYS2 installation, especially when [new
|
||||
releases][mh] of the installer appear. You can check your currently installed
|
||||
version of MSYS2 by issuing the command `pacman -Ss msys2-base`.
|
||||
releases][mh] appear. You can check your currently installed version of MSYS2
|
||||
by issuing the command `pacman -Ss msys2-base`.
|
||||
|
||||
To perform the upgrade, just repeat [Step 3](#a_ug) of this guide. Assuming
|
||||
your currently configured download mirrors are functional, you can skip the
|
||||
parts relating to downloading and editing mirrorlists.
|
||||
To perform the upgrade, just repeat [Step 3](#a_ug) of this guide.
|
||||
|
||||
Note that [Step 4](#a_md) need not be performed, as the MMGen dependencies
|
||||
are already in `pacman`’s database.
|
||||
|
||||
### <a id="a_um">MMGen</a>
|
||||
### <a id="a_um">Upgrading MMGen</a>
|
||||
|
||||
You should periodically upgrade your MMGen installation from the MMGen public
|
||||
You should periodically upgrade your MMGen installation from the public
|
||||
repository, especially when [new releases][mr] appear. You can check your
|
||||
currently installed version of MMGen by issuing the command `mmgen-tool
|
||||
--version`.
|
||||
currently installed version by executing `mmgen-tool --version`.
|
||||
|
||||
To perform the upgrade, enter the MMGen repository root on your online
|
||||
computer and issue the following commands:
|
||||
#### <a id="a_ums">Upgrade to latest stable version:</a>
|
||||
|
||||
Online upgrade:
|
||||
|
||||
```text
|
||||
$ python3 -m pip install --upgrade mmgen-wallet
|
||||
```
|
||||
|
||||
Offline upgrade:
|
||||
|
||||
> On your online machine:
|
||||
|
||||
```text
|
||||
$ python3 -m pip download mmgen-wallet
|
||||
```
|
||||
|
||||
> Copy the downloaded tar.gz archive to your offline machine and execute:
|
||||
|
||||
```text
|
||||
$ python3 -m pip install --no-build-isolation mmgen-wallet.*tar.gz
|
||||
```
|
||||
|
||||
#### <a id="a_umd">Upgrade to latest development version:</a>
|
||||
|
||||
Enter the MMGen repository root on your online computer and issue the following
|
||||
commands:
|
||||
|
||||
Online upgrade:
|
||||
|
||||
```text
|
||||
$ git checkout master
|
||||
$ git pull
|
||||
$ git checkout stable_msys2 # See 'Note' to step 9
|
||||
$ rm -rf dist build *egg-info
|
||||
$ rm -rf /mingw64/lib/python*/site-packages/{mmgen,MMGen}*
|
||||
$ python3 -m build --no-isolation
|
||||
$ python3 -m pip install --user dist/*.whl
|
||||
$ rm -rf dist build *egg-info
|
||||
$ python3 -m pip install dist/*.whl
|
||||
```
|
||||
|
||||
To update your offline installation, copy the updated repository (after `git
|
||||
pull`) to your offline machine, `cd` to the root of the copied repository and
|
||||
continue from the `git checkout stable_msys2` step.
|
||||
Offline upgrade:
|
||||
|
||||
After the `git pull` step above, copy the updated repository to your offline
|
||||
machine, `cd` to the root of the copied repository and perform the remaining
|
||||
steps.
|
||||
|
||||
[mh]: https://www.msys2.org
|
||||
[mp]: https://sourceforge.net/projects/msys2
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue