Guest User

Untitled

a guest
Feb 8th, 2014
708
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 2.87 KB | None | 0 0
  1.     # setting up the environment
  2.     apt-get update
  3.     apt-get upgrade
  4.     apt-get install install git build-essential memcached libmemcached-dev mysql-client python-twisted python-mysqldb python-dev python-setuptools python-memcache python-simplejson python-setuptools postfix
  5.     easy_install -U distribute
  6.    
  7.     # get stratum-mining source code and build (start in home)
  8.     cd ~
  9.  
  10.     # get stratum-mining source
  11.     git clone https://github.com/peconi/stratum-mining-maxcoin.git
  12.     cd stratum-mining-maxcoin
  13.     git submodule init
  14.     git submodule update
  15.     git submodule foreach git pull origin master
  16.     cd externals/maxcoin-hash/
  17.     python setup.py install
  18.  
  19.     cd ../python-sha3
  20.     git clone https://github.com/peconi/python-sha3.git . ## <— note a . at the end
  21.     python setup.py install
  22.  
  23.     cd ../stratum
  24.     git clone https://github.com/peconi/stratum.git . ## <— note a . at the end
  25.     python setup.py install
  26.    
  27.     cd ../../ # <— exit back to  stratum-mining-maxcoin path
  28.    
  29.     cp conf/config_sample.py conf/config.py
  30.    
  31.     # edit the config file and change some settings
  32.     nano conf/config.py
  33.  
  34.         CENTRAL_WALLET = ‘<your wallet id>’
  35.         COINDAEMON_TRUSTED_HOST = ’<your maxcoind host>’
  36.         COINDAEMON_TRUSTED_PORT = 8669
  37.         COINDAEMON_TRUSTED_USER = ‘maxcoinrpc’
  38.         COINDAEMON_TRUSTED_PASSWORD = ‘<your rpc password>’
  39.  
  40.         COINDAEMON_ALGO = 'keccak'
  41.         COINDAEMON_TX = 'no'
  42.  
  43.         HOSTNAME = '<or ip address of this host?'
  44.  
  45.         PASSWORD_SALT = ‘<password salt>’
  46.  
  47.         DB_MYSQL_HOST = '<your db host>'
  48.         DB_MYSQL_DBNAME = 'pooldb'
  49.         DB_MYSQL_USER = 'pooldb'
  50.         DB_MYSQL_PASS = '<your db pass>'
  51.        
  52.         POOL_TARGET = 16
  53.  
  54.         SOLUTION_BLOCK_HASH = True
  55.        
  56.         # Recommended to set as well
  57.         NOTIFY_EMAIL_TO = ''                    # Where to send Start/Found block notifications
  58.         NOTIFY_EMAIL_TO_DEADMINER = ''          # Where to send dead miner notifications
  59.         NOTIFY_EMAIL_FROM = 'root@localhost'    # Sender address
  60.         NOTIFY_EMAIL_SERVER = 'localhost'       # E-Mail Sender
  61.         NOTIFY_EMAIL_USERNAME = ''          # E-Mail server SMTP Logon
  62.         NOTIFY_EMAIL_PASSWORD = ''
  63.         NOTIFY_EMAIL_USETLS = False     # Change to true if not local server
  64.  
  65.     # install pylib
  66.     easy_install pylibmc
  67.    
  68.     # edit python file
  69.     nano /usr/local/lib/python2.7/dist-packages/stratum-*-py2.7.egg/stratum/websocket_transport.py
  70.  
  71.     # replace: from autobahn.websocket import WebSocketServerProtocol, WebSocketServerFactory
  72.     # with: from autobahn.twisted.websocket import WebSocketServerProtocol, WebSocketServerFactory
  73.     # if found!
  74.    
  75.     TODO: fix this db thing
  76.     # import this stratum DB structure
  77.     # found at https://github.com/peconi/stratum-mining-litecoin/blob/master/sql/stratum_default_layout.sql
  78.     mysql -h <db host> -upooldb pooldb < [sql file you got on the link above] -p
  79.  
  80.     # make sure you’re in stratum-mining-maxcoin folder and run the stratum
  81.     twistd -ny launcher.tac # <— if debugging
  82.     or
  83.     twistd -y launcher.tac # <— if demonized (production)
Advertisement
Add Comment
Please, Sign In to add comment