Browse Source

Merge branch 'shsmith-master'

master
Neil Booth 8 years ago
parent
commit
b7e32c0d81
  1. 0
      contrib/daemontools/env/COIN
  2. 0
      contrib/daemontools/env/DAEMON_URL
  3. 0
      contrib/daemontools/env/DB_DIRECTORY
  4. 0
      contrib/daemontools/env/ELECTRUMX
  5. 0
      contrib/daemontools/env/NETWORK
  6. 0
      contrib/daemontools/env/USERNAME
  7. 0
      contrib/daemontools/log/run
  8. 0
      contrib/daemontools/run
  9. 11
      contrib/python3.6/python-3.6.sh
  10. 24
      contrib/raspberrypi3/install_electrumx.sh
  11. 38
      contrib/raspberrypi3/run_electrumx.sh
  12. 0
      contrib/systemd/electrumx.conf
  13. 0
      contrib/systemd/electrumx.service
  14. 30
      docs/HOWTO.rst

0
samples/daemontools/env/COIN → contrib/daemontools/env/COIN

0
samples/daemontools/env/DAEMON_URL → contrib/daemontools/env/DAEMON_URL

0
samples/daemontools/env/DB_DIRECTORY → contrib/daemontools/env/DB_DIRECTORY

0
samples/daemontools/env/ELECTRUMX → contrib/daemontools/env/ELECTRUMX

0
samples/daemontools/env/NETWORK → contrib/daemontools/env/NETWORK

0
samples/daemontools/env/USERNAME → contrib/daemontools/env/USERNAME

0
samples/daemontools/log/run → contrib/daemontools/log/run

0
samples/daemontools/run → contrib/daemontools/run

11
contrib/python3.6/python-3.6.sh

@ -0,0 +1,11 @@
Installation of Python 3.6
--------------------------
sudo add-apt-repository ppa:jonathonf/python-3.6
sudo apt-get update && sudo apt-get install python3.6 python3.6-dev
cd /home/username
git clone https://github.com/kyuupichan/electrumx.git
cd electrumx
sudo python3.6 setup.py install

24
contrib/raspberrypi3/install_electrumx.sh

@ -0,0 +1,24 @@
###################
# install electrumx
###################
# upgrade raspbian to 'stretch' distribution for python 3.5 support
sudo echo 'deb http://mirrordirector.raspbian.org/raspbian/ testing main contrib non-free rpi' > /etc/apt/sources.list.d/stretch.list
sudo apt-get update
sudo apt-get dist-upgrade
sudo apt-get autoremove
# install electrumx dependencies
sudo apt-get install python3-pip
sudo apt-get install build-essential libc6-dev
sudo apt-get install libncurses5-dev libncursesw5-dev libreadline6-dev
sudo apt-get install libleveldb-dev
sudo apt-get install git
sudo pip3 install plyvel
sudo pip3 install irc
# install electrumx
git clone https://github.com/kyuupichan/electrumx.git
cd electrumx
sudo python3 setup.py install

38
contrib/raspberrypi3/run_electrumx.sh

@ -0,0 +1,38 @@
###############
# run_electrumx
###############
# configure electrumx
export COIN=Bitcoin
export DAEMON_URL=http://rpcuser:rpcpassword@127.0.0.1
export NETWORK=mainnet
export CACHE_MB=400
export DB_DIRECTORY=/home/username/.electrumx/db
export SSL_CERTFILE=/home/username/.electrumx/certfile.crt
export SSL_KEYFILE=/home/username/.electrumx/keyfile.key
export BANNER_FILE=/home/username/.electrumx/banner
export DONATION_ADDRESS=your-donation-address
# connectivity
export HOST=
export TCP_PORT=50001
export SSL_PORT=50002
# visibility
export IRC=
export IRC_NICK=hostname
export REPORT_HOST=hostname.com
export RPC_PORT=8000
# run electrumx
ulimit -n 10000
/usr/local/bin/electrumx_server.py 2>> /home/username/.electrumx/electrumx.log >> /home/username/.electrumx/electrumx.log &
######################
# auto-start electrumx
######################
# add this line to crontab -e
# @reboot /path/to/run_electrumx.sh

0
samples/systemd/electrumx.conf → contrib/systemd/electrumx.conf

0
samples/systemd/electrumx.service → contrib/systemd/electrumx.service

30
docs/HOWTO.rst

@ -108,7 +108,7 @@ to at least 2,500.
Note that setting the limit in your shell does *NOT* affect ElectrumX
unless you are invoking ElectrumX directly from your shell. If you
are using `systemd`, you need to set it in the `.service` file (see
`samples/systemd/electrumx.service`_).
`contrib/systemd/electrumx.service`_).
Using daemontools
@ -136,7 +136,7 @@ you might do::
Then copy the all sample scripts from the ElectrumX source tree there::
cp -R /path/to/repo/electrumx/samples/daemontools ~/scripts/electrumx
cp -R /path/to/repo/electrumx/contrib/daemontools ~/scripts/electrumx
This copies 3 things: the top level server run script, a log/ directory
with the logger run script, an env/ directory.
@ -172,7 +172,7 @@ Using systemd
This repository contains a sample systemd unit file that you can use to
setup ElectrumX with systemd. Simply copy it to :code:`/etc/systemd/system`::
cp samples/systemd/electrumx.service /etc/systemd/system/
cp contrib/systemd/electrumx.service /etc/systemd/system/
The sample unit file assumes that the repository is located at
:code:`/home/electrumx/electrumx`. If that differs on your system, you need to
@ -199,6 +199,24 @@ minutes to flush cached data to disk during initial sync. You should
set TimeoutStopSec to *at least* 10 mins in your `.service` file.
Installing Python 3.6 under Ubuntu
----------------------------------
Many Ubuntu distributions have an incompatible Python version baked in.
Because of this, it is easier to install Python 3.6 rather than attempting
to update Python 3.5.2 to 3.5.3. See `contrib/python3.6/python-3.6.sh`_.
Installing on Raspberry Pi 3
----------------------------
To install on the Raspberry Pi 3 you will need to update to the "stretch" distribution.
See the full procedure in `contrib/raspberrypi3/install_electrumx.sh`_.
See also `contrib/raspberrypi3/run_electrumx.sh`_ for an easy way to configure and
launch electrumx.
Sync Progress
=============
@ -377,10 +395,14 @@ copy of your certificate and key in case you need to restore them.
.. _`ENVIRONMENT.rst`: https://github.com/kyuupichan/electrumx/blob/master/docs/ENVIRONMENT.rst
.. _`samples/systemd/electrumx.service`: https://github.com/kyuupichan/electrumx/blob/master/samples/systemd/electrumx.service
.. _`contrib/systemd/electrumx.service`: https://github.com/kyuupichan/electrumx/blob/master/contrib/systemd/electrumx.service
.. _`daemontools`: http://cr.yp.to/daemontools.html
.. _`runit`: http://smarden.org/runit/index.html
.. _`aiohttp`: https://pypi.python.org/pypi/aiohttp
.. _`pylru`: https://pypi.python.org/pypi/pylru
.. _`IRC`: https://pypi.python.org/pypi/irc
.. _`x11_hash`: https://pypi.python.org/pypi/x11_hash
.. _`contrib/python3.6/python-3.6.sh`: https://github.com/kyuupichan/electrumx/blob/master/contrib/contrib/python3.6/python-3.6.sh
.. _`contrib/raspberrypi3/install_electrumx.sh`: https://github.com/kyuupichan/electrumx/blob/master/contrib/contrib/raspberrypi3/install_electrumx.sh
.. _`contrib/raspberrypi3/run_electrumx.sh`: https://github.com/kyuupichan/electrumx/blob/master/contrib/contrib/raspberrypi3/run_electrumx.sh

Loading…
Cancel
Save