Mops: Porovnání verzí
Z Poznámkový blok
(→Instalace) |
(→Konfigurace) |
||
(Nejsou zobrazeny 3 mezilehlé verze od stejného uživatele.) | |||
Řádka 17: | Řádka 17: | ||
sudo apt-get install -y git | sudo apt-get install -y git | ||
sudo apt-get install -y build-essential libboost-all-dev libcurl4-openssl-dev libdb5.3-dev libdb5.3++-dev mysql-server python-twisted python-mysqldb python-dev python-setuptools python-memcache python-simplejson python-pip make autoconf libtool g++ build-essential pkg-config unzip libboost-all-dev apache2 memcached php7.0-mysqlnd php7.0-curl php7.0-json php7.0-curl libapache2-mod-php7.0 build-essential make automake gcc php-memcached | sudo apt-get install -y build-essential libboost-all-dev libcurl4-openssl-dev libdb5.3-dev libdb5.3++-dev mysql-server python-twisted python-mysqldb python-dev python-setuptools python-memcache python-simplejson python-pip make autoconf libtool g++ build-essential pkg-config unzip libboost-all-dev apache2 memcached php7.0-mysqlnd php7.0-curl php7.0-json php7.0-curl libapache2-mod-php7.0 build-essential make automake gcc php-memcached | ||
+ | cd /usr/src | ||
wget http://download.oracle.com/berkeley-db/db-4.8.30.zip | wget http://download.oracle.com/berkeley-db/db-4.8.30.zip | ||
unzip db-4.8.30.zip | unzip db-4.8.30.zip | ||
Řádka 26: | Řádka 27: | ||
cd .. | cd .. | ||
echo "Berkeley libs installed" | echo "Berkeley libs installed" | ||
− | cd | + | cd /usr/src |
pip install --upgrade pip | pip install --upgrade pip | ||
sudo easy_install -U distribute | sudo easy_install -U distribute | ||
pip install autobahn | pip install autobahn | ||
+ | echo "Algo github installed" | ||
+ | cd /usr/src | ||
+ | git clone https://github.com/ahmedbodi/stratum-mining.git | ||
git clone https://github.com/Tydus/litecoin_scrypt.git | git clone https://github.com/Tydus/litecoin_scrypt.git | ||
− | |||
git clone https://github.com/ahmedbodi/stratum.git | git clone https://github.com/ahmedbodi/stratum.git | ||
cd stratum-mining | cd stratum-mining | ||
Řádka 38: | Řádka 41: | ||
cd externals/litecoin_scrypt | cd externals/litecoin_scrypt | ||
python setup.py install | python setup.py install | ||
− | cd | + | cd /usr/src |
− | cd | + | cd stratum-mining/externals/stratum |
echo "Now update and remove setup tools and fixes RuntimeError: maximum recursion depth exceeded /root/stratum-mining/externals/stratum/distribute-0.6.28-py2.7.egg" | echo "Now update and remove setup tools and fixes RuntimeError: maximum recursion depth exceeded /root/stratum-mining/externals/stratum/distribute-0.6.28-py2.7.egg" | ||
+ | mv setup.py setup.py.old | ||
+ | |||
cat < setup.py | cat < setup.py | ||
#!/usr/bin/env python | #!/usr/bin/env python | ||
Řádka 59: | Řádka 64: | ||
install_requires=['twisted', 'ecdsa', 'pyopenssl', 'autobahn',] | install_requires=['twisted', 'ecdsa', 'pyopenssl', 'autobahn',] | ||
) | ) | ||
+ | |||
EOF | EOF | ||
python setup.py install | python setup.py install | ||
− | cd | + | cd /usr/src |
cp stratum-mining/conf/config_sample.py stratum-mining/conf/config.py | cp stratum-mining/conf/config_sample.py stratum-mining/conf/config.py | ||
+ | echo "MPOS install" | ||
cd /var/www/html | cd /var/www/html | ||
git clone https://github.com/MPOS/php-mpos.git MPOS | git clone https://github.com/MPOS/php-mpos.git MPOS | ||
Řádka 93: | Řádka 100: | ||
Poté skript spustíme: | Poté skript spustíme: | ||
sudo bash mops-install | sudo bash mops-install | ||
+ | |||
+ | == Konfigurace == | ||
+ | Nejdůležitější soubor je /MPOS/include/config/global.inc.php Zde je potřeba provést nastavení jak pro měnu, tak další parametry: | ||
+ | |||
+ | $config['swiftmailer']['type'] = 'smtp'; | ||
+ | |||
+ | $config['swiftmailer']['smtp']['host'] = 'mail.slapnet.cz'; | ||
+ | |||
+ | * Změnot emailovou adresu systémového odesilatele, příjemce v souborec: | ||
+ | /var/www/html/MPOS/include/classes/mail.class.php (řádky 29, 76, 77) | ||
+ | /var/www/html/MPOS/include/classes/admin_settings.inc.php (řádky 61, 349) | ||
== Zpět == | == Zpět == |
Aktuální verze z 24. 5. 2018, 19:27
Jedná se o důl zveřejněný na https://github.com/MPOS/php-mpos.
O aplikaci
Vlastní důl oproti Yiimp je určen pro těžbu jen jedné libovolné měny, ale je možná ji spustit výcekrát právě pro různé měny obdobně jak P2Poooly.
Instalace
Na stránkách Crypto & Coffee se mi povedlo nalést následující skript.
Prvně vytvoříme soubor z následujícím obsahem:
nano mops-install
#!/bin/bash cd ~ sudo apt-get update sudo apt-get dist-upgrade -y sudo apt-get install -y git sudo apt-get install -y build-essential libboost-all-dev libcurl4-openssl-dev libdb5.3-dev libdb5.3++-dev mysql-server python-twisted python-mysqldb python-dev python-setuptools python-memcache python-simplejson python-pip make autoconf libtool g++ build-essential pkg-config unzip libboost-all-dev apache2 memcached php7.0-mysqlnd php7.0-curl php7.0-json php7.0-curl libapache2-mod-php7.0 build-essential make automake gcc php-memcached cd /usr/src wget http://download.oracle.com/berkeley-db/db-4.8.30.zip unzip db-4.8.30.zip cd db-4.8.30 cd build_unix/ ../dist/configure --prefix=/usr/local --enable-cxx make sudo make install cd .. echo "Berkeley libs installed" cd /usr/src pip install --upgrade pip sudo easy_install -U distribute pip install autobahn echo "Algo github installed" cd /usr/src git clone https://github.com/ahmedbodi/stratum-mining.git git clone https://github.com/Tydus/litecoin_scrypt.git git clone https://github.com/ahmedbodi/stratum.git cd stratum-mining git submodule init git submodule update cd externals/litecoin_scrypt python setup.py install cd /usr/src cd stratum-mining/externals/stratum echo "Now update and remove setup tools and fixes RuntimeError: maximum recursion depth exceeded /root/stratum-mining/externals/stratum/distribute-0.6.28-py2.7.egg" mv setup.py setup.py.old cat < setup.py #!/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',] ) EOF python setup.py install cd /usr/src cp stratum-mining/conf/config_sample.py stratum-mining/conf/config.py echo "MPOS install" cd /var/www/html git clone https://github.com/MPOS/php-mpos.git MPOS cd MPOS git checkout master echo "Enter your MYSQL password you just set" mysql -u root -p -e "create database mpos" echo "Again" mysql -u root -p mpos < sql/000_base_structure.sql sudo chown -R www-data templates/compile templates/cache sudo cp include/config/global.inc.dist.php include/config/global.inc.php cat < /etc/apache2/sites-available/000-default.conf #ServerName www.example.com ServerAdmin webmaster@localhost DocumentRoot /var/www/html ErrorLog ${APACHE_LOG_DIR}/error.log CustomLog ${APACHE_LOG_DIR}/access.log combined Options Indexes FollowSymLinks AllowOverride None Require all granted EOF apache2ctl -k stop; sleep 2; sudo apache2ctl -k start echo "Not using a mysql password, now finish setup here: /var/www/html/MPOS/include/config/global.inc.php" echo "Then check your server"
Poté skript spustíme:
sudo bash mops-install
Konfigurace
Nejdůležitější soubor je /MPOS/include/config/global.inc.php Zde je potřeba provést nastavení jak pro měnu, tak další parametry:
$config['swiftmailer']['type'] = 'smtp'; $config['swiftmailer']['smtp']['host'] = 'mail.slapnet.cz';
- Změnot emailovou adresu systémového odesilatele, příjemce v souborec:
/var/www/html/MPOS/include/classes/mail.class.php (řádky 29, 76, 77) /var/www/html/MPOS/include/classes/admin_settings.inc.php (řádky 61, 349)