Eigenen Stratum und MPOS Miner Portal Server unter Ubuntu 16.04 LTS installieren und konfigurieren

Alles was nicht alltäglich ist und nirgendwo so richtig reinpasst
Post Reply
User avatar
h3rb3rn
Administrator
Posts: 191
Joined: Mon 9. Feb 2015, 23:29

Eigenen Stratum und MPOS Miner Portal Server unter Ubuntu 16.04 LTS installieren und konfigurieren

Post by h3rb3rn »

Fassung vom 10.01.2017

**** ENTWURF ***

Quelle: https://github.com/MPOS/php-mpos/wiki/Quick-Start-Guide

Ich empfehle aufgrund der Datensicherheit eine extra VM anzulegen und die Ubuntu Server 16.04 LTS Version mit voll verschlüsselter LVM Partition zu installieren.

Nach dem ersten Neustart der VM die Netzwerkkonfiguration an die eigenen Gegebenheiten anpassen.

Sobald der Server online ist der Reihenfolge nach die nachfolgenden Codes ausführen.

System aktualisieren

Code: Select all

sudo bash
apt update && dpkg --configure -a && apt --yes --allow-unauthenticated -f install && apt --yes --allow-unauthenticated dist-upgrade && apt --yes --allow-unauthenticated -f install && apt-get --yes --allow-unauthenticated autoremove
Basis Tools für Python-Stratum und MPOS installieren

Code: Select all

sudo apt --yes install git vim htop screen mc openssl ufw fail2ban clamav build-essential autoconf libtool libboost-all-dev libcurl4-openssl-dev libdb5.3-dev libdb5.3++-dev mariadb-server python-twisted python-mysqldb python-dev python-setuptools python-memcache python-simplejson python-pylibmc memcached php-memcached php-mysqlnd php-curl php-json libapache2-mod-php postfix


Stratum Mining Server Software

Code: Select all

easy_install -U distribute

Code: Select all

git clone https://github.com/Tydus/litecoin_scrypt.git
git clone https://github.com/ahmedbodi/stratum-mining.git
git clone https://github.com/ahmedbodi/stratum.git

Code: Select all

cd stratum-mining
git submodule init
git submodule update

cd externals/litecoin_scrypt
sudo python setup.py install

cd ~
cd stratum-mining/externals/stratum
HTTPError: HTTP Error 403: SSL is required

Code: Select all

sudo python setup.py install
#!/usr/bin/env python
from distribute_setup import use_setuptools
use_setuptools()

#python setup.py sdist upload

from setuptools import setup
from stratum import version

setup(name='stratum',
version=version.VERSION,
description='Stratum server implementation based on Twisted',
author='slush',
author_email='info@bitcion.cz',
url='http://blog.bitcoin.cz/stratum',
packages=['stratum',],
py_modules=['distribute_setup',],
zip_safe=False,
install_requires=['twisted', 'ecdsa', 'pyopenssl', 'autobahn',]
)
Lösung:

Code: Select all

sudo apt install python-twisted python-ecdsa python-openssl python-autobahn

Code: Select all

cd ~
rm -rf ~/stratum-mining/externals/stratum/tests
wget https://4noobs.de/download/file.php?id=127
mv file.php?id=127 distribute-0.6.28.tar.gz
tar xzf distribute-0.6.28.tar.gz
cd distribute-0.6.28
mv -f * ~/stratum-mining/externals/stratum
cd ~
rm -rf distribute-0.6.28 distribute-0.6.28.tar.gz
cd stratum-mining/externals/stratum

Code: Select all

sudo python3 setup.py install


Konfiguration

Code: Select all

cd ~
cp stratum-mining/conf/config_sample.py stratum-mining/conf/config.py
vim stratum-mining/conf/config.py
Inhalt anpassen

Code: Select all

CENTRAL_WALLET = 'Your_Valid_Bitcoin_or_Litecoin_Address'
[...]
COINDAEMON_TRUSTED_HOST = 'localhost'
COINDAEMON_TRUSTED_PORT = 19334
COINDAEMON_TRUSTED_USER = 'testnet'
COINDAEMON_TRUSTED_PASSWORD = 'testnet'
COINDAEMON_ALGO = 'scrypt'
COINDAEMON_Reward = 'POW'
COINDAEMON_SHA256_TX = 'no
[...]
HOSTNAME = 'yourservername'
[...]
DATABASE_DRIVER = 'mysql'
DB_MYSQL_HOST = 'localhost'
DB_MYSQL_DBNAME = 'mpos'
DB_MYSQL_USER = 'root'
DB_MYSQL_PASS = 'root'
[...]
POOL_TARGET = 16
[...]
SOLUTION_BLOCK_HASH = True

Start stratum-mining

Code: Select all

cd stratum-mining
twistd -ny launcher.tac

Code: Select all

twistd -y launcher.tac
Attachments
distribute-0.6.28.tar.gz
(612.82 KiB) Downloaded 1292 times
Post Reply