Adjust main readme

This commit is contained in:
hunicus 2022-05-03 13:04:02 -04:00
parent 38b2beb9f7
commit 0aca907a67
No known key found for this signature in database
GPG Key ID: 3AA9E3763EBB3B23

View File

@ -6,21 +6,21 @@ It is an open-source project developed and operated for the benefit of the Bitco
![mempool](https://mempool.space/resources/screenshots/v2.3.0-dashboard.png) ![mempool](https://mempool.space/resources/screenshots/v2.3.0-dashboard.png)
## Installation Methods # Installation Methods
Mempool can be self-hosted on a wide variety of your own hardware, ranging from a simple one-click installation on a Raspberry Pi full-node distro all the way to a robust production instance on a powerful FreeBSD server. Mempool can be self-hosted on a wide variety of your own hardware, ranging from a simple one-click installation on a Raspberry Pi full-node distro all the way to a robust production instance on a powerful FreeBSD server.
We support the following installation methods, ranked in order from simple to advanced: We support the following installation methods, ranked in order from simple to advanced:
1) [One-click installation on full-node distros](#one-click-installation) 1) [One-click installation on full-node distros](#one-click-installation)
2) [Docker installation on Linux using docker-compose](./docker/README.md) 2) [Docker installation on Linux using docker-compose](./docker)
3) [Manual installation on Linux or FreeBSD](#manual-installation) 3) [Manual installation on Linux or FreeBSD](#manual-installation)
4) [Production installation on a powerful FreeBSD server](./production/README.md) 4) [Production installation on a powerful FreeBSD server](./production)
This doc offers install notes on the one-click method and manual install method. Follow the links above for install notes on Docker and production installations. This doc offers install notes on the one-click method and manual install method. Follow the links above for install notes on Docker and production installations.
<a id="one-click-installation"></a> <a id="one-click-installation"></a>
### One-Click Installation ## One-Click Installation
Mempool can be conveniently installed on the following full-node distros: Mempool can be conveniently installed on the following full-node distros:
- [Umbrel](https://github.com/getumbrel/umbrel) - [Umbrel](https://github.com/getumbrel/umbrel)
@ -30,24 +30,24 @@ Mempool can be conveniently installed on the following full-node distros:
- [Start9](https://github.com/Start9Labs/embassy-os) - [Start9](https://github.com/Start9Labs/embassy-os)
<a id="manual-installation"></a> <a id="manual-installation"></a>
### Manual Installation ## Manual Installation
The following instructions are for a manual installation on Linux or FreeBSD. You may need to change file and directory paths to match your OS. The following instructions are for a manual installation on Linux or FreeBSD. You may need to change file and directory paths to match your OS.
You will need [Bitcoin](https://github.com/bitcoin/bitcoin), [Electrum](https://github.com/romanz/electrs), [Node.js](https://github.com/nodejs/node), [MariaDB](https://github.com/mariadb/server), and [Nginx](https://github.com/nginx/nginx). Below, we walk through how to configure each of these. You will need [Bitcoin](https://github.com/bitcoin/bitcoin), [Electrum](https://github.com/romanz/electrs), [Node.js](https://github.com/nodejs/node), [MariaDB](https://github.com/mariadb/server), and [Nginx](https://github.com/nginx/nginx). Below, we walk through how to configure each of these.
#### 1. Get Latest Mempool Release ### 1. Get Latest Mempool Release
Clone the Mempool repo, and checkout the latest release tag: Clone the Mempool repo, and checkout the latest release tag:
```bash ```bash
git clone https://github.com/mempool/mempool $ git clone https://github.com/mempool/mempool
cd mempool $ cd mempool
latestrelease=$(curl -s https://api.github.com/repos/mempool/mempool/releases/latest|grep tag_name|head -1|cut -d '"' -f4) $ latestrelease=$(curl -s https://api.github.com/repos/mempool/mempool/releases/latest|grep tag_name|head -1|cut -d '"' -f4)
git checkout $latestrelease $ git checkout $latestrelease
``` ```
#### 2. Configure Bitcoin Core ### 2. Configure Bitcoin Core
Enable RPC and txindex in `bitcoin.conf`: Enable RPC and txindex in `bitcoin.conf`:
@ -57,17 +57,17 @@ Enable RPC and txindex in `bitcoin.conf`:
txindex=1 txindex=1
``` ```
#### 3. Get & Configure MySQL ### 3. Get & Configure MySQL
Install MariaDB from your OS package manager: Install MariaDB from your OS package manager:
```bash ```bash
# Debian, Ubuntu, etc. # Debian, Ubuntu, etc.
apt-get install mariadb-server mariadb-client $ apt-get install mariadb-server mariadb-client
# macOS # macOS
brew install mariadb $ brew install mariadb
mysql.server start $ mysql.server start
``` ```
Create a database and grant privileges: Create a database and grant privileges:
@ -83,21 +83,20 @@ Create a database and grant privileges:
Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec)
``` ```
#### 4. Build Mempool Backend ### 4. Build Mempool Backend
Install mempool dependencies from npm and build the backend: Install Mempool dependencies with npm and build the backend:
```bash ```bash
# backend $ cd backend
cd backend $ npm install --prod
npm install --prod $ npm run build
npm run build
``` ```
In the `backend` folder, make a copy of the sample config: In the `backend` folder, make a copy of the sample config:
```bash ```bash
cp mempool-config.sample.json mempool-config.json $ cp mempool-config.sample.json mempool-config.json
``` ```
Edit `mempool-config.json` with your Bitcoin Core node RPC credentials: Edit `mempool-config.json` with your Bitcoin Core node RPC credentials:
@ -134,7 +133,7 @@ Edit `mempool-config.json` with your Bitcoin Core node RPC credentials:
Start the backend: Start the backend:
```bash ```bash
npm run start $ npm run start
``` ```
When it's running, you should see output like this: When it's running, you should see output like this:
@ -160,37 +159,35 @@ When it's running, you should see output like this:
Updating mempool Updating mempool
``` ```
#### 5. Build Mempool Frontend ### 5. Build Mempool Frontend
Install the Mempool dependencies with npm and build the frontend: Install the Mempool dependencies with npm and build the frontend:
```bash ```bash
# frontend $ cd frontend
cd frontend $ npm install --prod
npm install --prod $ npm run build
npm run build
``` ```
Install the output into the nginx webroot folder: Install the output into the nginx webroot folder:
```bash ```bash
sudo rsync -av --delete dist/ /var/www/ $ sudo rsync -av --delete dist/ /var/www/
``` ```
#### 6. `nginx` + `certbot` ### 6. `nginx` + `certbot`
Install the supplied `nginx.conf` and `nginx-mempool.conf` in `/etc/nginx`: Install the supplied `nginx.conf` and `nginx-mempool.conf` in `/etc/nginx`:
```bash ```bash
# install nginx and certbot # install nginx and certbot
apt-get install -y nginx python3-certbot-nginx $ apt-get install -y nginx python3-certbot-nginx
# install the mempool configuration for nginx # install the mempool configuration for nginx
cp nginx.conf nginx-mempool.conf /etc/nginx/ $ cp nginx.conf nginx-mempool.conf /etc/nginx/
# replace example.com with your domain name # replace example.com with your domain name
certbot --nginx -d example.com $ certbot --nginx -d example.com
``` ```
If everything went well, you should see the beautiful mempool :grin: If everything went well, you should see the beautiful mempool :grin: