Groestlcoin Forum
Groestl => Tutorials => Topic started by: jackielove4u on October 18, 2018, 10:38:35 PM
The following was tested in Debian 11,
some dependencies can be different in other distros
- apt-get update -y && apt-get upgrade -y && apt-get dist-upgrade -y
- dd if=/dev/zero of=/swapfile bs=1M count=4096
- mkswap /swapfile
- swapon /swapfile
- echo "/swapfile swap swap defaults 0 0" >> /etc/fstab
- apt-get install build-essential libssl-dev libboost-all-dev libdb5.3 libdb5.3-dev libdb5.3++-dev libtool automake libevent-dev bsdmainutils -y
- apt-get install git ntp make g++ gcc autoconf cpp ngrep iftop sysstat autotools-dev pkg-config libminiupnpc-dev libzmq3-dev -y
- apt-get install apt-transport-https ca-certificates curl gnupg2 software-properties-common git screen -y
- curl -fsSL https://download.docker.com/linux/debian/gpg | apt-key add -
- add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/debian $(lsb_release -cs) stable"
- apt-get update
- apt-get install docker-ce -y
- git clone https://github.com/trezor/blockbook
- cd blockbook
- make all-groestlcoin
- cd build
- apt install ./blockbook-g*deb ./backend-g*deb -y
- systemctl start backend-groestlcoin
- cd /opt/coins/data/groestlcoin/backend
- wait till deamon is synced (check with: tail debug.log)
- systemctl restart backend-groestlcoin
- systemctl enable backend-groestlcoin
- screen
- while true; do date; systemctl restart blockbook-groestlcoin; sleep 600; done
- Crtl+A, ctrl+D
- cd /opt/coins/blockbook/groestlcoin/logs/
- wait till blockbook is synced (check with: tail blockbook.INFO)
- systemctl enable blockbook-groestlcoin
- sudo apt-get install certbot
- certbot certonly --standalone -d blockbook.groestlcoin.org
- crontab -e
- Add end of file:
14 3 * * * /usr/sbin/service nginx stop
15 3 * * * /usr/bin/certbot renew --quiet
16 3 * * * /usr/sbin/service nginx start - Crtl+o enter, ctrl X
- systemctl restart blockbook-groestlcoin
- apt-get install nginx
- nano /etc/nginx/sites-available/default
- delete all and paste:
server {
listen 80;
listen 443 ssl;
ssl_certificate /etc/letsencrypt/live/blockbook.groestlcoin.org/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/blockbook.groestlcoin.org/privkey.pem;
server_name blockbook.groestlcoin.org;
# force https-redirects
if ($scheme = http) {
return 301 https://blockbook.groestlcoin.org$request_uri;
}
location / {
add_header Access-Control-Allow-Origin '*' always;
proxy_pass https://localhost:9145;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_set_header X-NginX-Proxy true;
# Enables WS support
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_redirect off;
}
} - systemctl reload nginx