mirror of
https://github.com/kvazar-network/crawler.git
synced 2025-09-09 13:31:50 +00:00
update readme
This commit is contained in:
parent
a4984e892d
commit
1a471020e4
73
README.md
73
README.md
@ -21,12 +21,6 @@ with full-text index storage in the shared [Manticore](https://manticoresearch.c
|
||||
cp example/config.json config.json
|
||||
```
|
||||
|
||||
## Launch
|
||||
|
||||
* `php src/index.php 60` - crawl, check for new blocks every `n` seconds (`60` by default)
|
||||
* `php src/index.php drop` - truncate index
|
||||
* `php src/index.php optimize` - optimize index
|
||||
|
||||
### Manticore
|
||||
|
||||
To prevent data lose on server failures, change default [binlog flush strategy](https://manual.manticoresearch.com/Logging/Binary_logging#Binary-flushing-strategies) to `binlog_flush = 1`
|
||||
@ -35,18 +29,10 @@ To prevent data lose on server failures, change default [binlog flush strategy](
|
||||
|
||||
Remote or local `kevacoind` connection required as the data source for this crawler.
|
||||
|
||||
##### Requirements
|
||||
|
||||
* RAM: 1.5G+
|
||||
* Disk: 2G+ (Kevacoin blockchain size in 2025)
|
||||
|
||||
##### kevacoin.conf
|
||||
|
||||
Before continue with examples below,
|
||||
create new system user: `useradd -m kevacoin` then copy `kevacoind` compiled into the profile root;
|
||||
Create new system user: `useradd -m kevacoin` then copy `kevacoind` compiled into the profile root;
|
||||
make sure `kevacoind` binary has executable permissions: `chmod +x kevacoind`
|
||||
|
||||
To accept RPC connections, create `kevacoin.conf`:
|
||||
To accept RPC connections from crawler, create `kevacoin.conf`:
|
||||
|
||||
``` /home/kevacoin/.kevacoin/kevacoin.conf
|
||||
#/home/kevacoin/.kevacoin/kevacoin.conf
|
||||
@ -55,7 +41,13 @@ rpcpassword=PASSWORD
|
||||
```
|
||||
* make sure `config.json` corresponds `rpcuser` and `rpcpassword` values!
|
||||
|
||||
##### systemd
|
||||
### System
|
||||
|
||||
#### manticore.service
|
||||
|
||||
This unit auto-created on install Manticore from the official repository
|
||||
|
||||
#### kevacoin.service
|
||||
|
||||
``` /etc/systemd/system/kevacoin.service
|
||||
#/etc/systemd/system/kevacoin.service
|
||||
@ -73,6 +65,47 @@ ExecStart=/home/kevacoin/kevacoind -server
|
||||
WantedBy=multi-user.target
|
||||
```
|
||||
|
||||
* `systemctl daemon-reload` - apply `systemd` changes
|
||||
* `systemctl enable kevacoin` - enable on system startup
|
||||
* `systemctl start kevacoin` - launch `kevacoind`
|
||||
#### crawler.service
|
||||
|
||||
``` /etc/systemd/system/crawler.service
|
||||
#/etc/systemd/system/crawler.service
|
||||
[Unit]
|
||||
After=network-online.target manticore.service kevacoin.service
|
||||
Wants=network-online.target manticore.service kevacoin.service
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
User=kevacoin
|
||||
Group=kevacoin
|
||||
ExecStart=/usr/bin/php /home/kevacoin/crawler/src/index.php > /dev/null 2>&1
|
||||
StandardOutput=null
|
||||
StandardError=null
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
```
|
||||
|
||||
**Apply changes**
|
||||
|
||||
* `systemctl daemon-reload`
|
||||
* Enable on system startup:
|
||||
* `systemctl enable kevacoin`
|
||||
* `systemctl enable manticore`
|
||||
* `systemctl enable crawler`
|
||||
* Run:
|
||||
* `systemctl restart kevacoin`
|
||||
* `systemctl restart manticore`
|
||||
* `systemctl restart crawler`
|
||||
* Make sure all services active:
|
||||
* `systemctl status kevacoin`
|
||||
* `systemctl status manticore`
|
||||
* `systemctl status crawler`
|
||||
|
||||
## CLI
|
||||
|
||||
Usually, crawler works on background as the systemd process.
|
||||
If you want to operate tools manually, use following CLI:
|
||||
|
||||
* `php src/index.php 60` - crawl, check for new blocks every `n` seconds (`60` by default)
|
||||
* `php src/index.php drop` - truncate index
|
||||
* `php src/index.php optimize` - optimize index
|
Loading…
x
Reference in New Issue
Block a user