forked from okcashpro/electrum-ok-server
-
Notifications
You must be signed in to change notification settings - Fork 2
/
INSTALL
94 lines (61 loc) · 2.79 KB
/
INSTALL
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
The following is a quick installation guide. Please see HOWTO.md for more
detailed information on how to configure your server.
TLDR:
# sudo apt-get install git
# sudo git clone https://github.com/okcashpro/electrum-ok-server
# sudo apt-get install libleveldb-dev
# cd electrum-ok-server
# sudo ./configure
# sudo python setup.py install
# electrum-ok-server start
# electrum-ok-server stop
Note: If you want to run the server without installing it on your
system, just run 'run_electrum_ok_server"
1. Install and run okcashd.
----------------------------
You will need to run okcashd with the config option txindex=1. If you
have not previously done so, you may need to reindex the okcashd
blockchain
Note: you cannot use a ultra-pruning okcashd (forthcoming in 0.9 or
later). A full okcash node is required in order to know for each
address if it has been used. Pruning occurs only at the level of the
Electrum database.
2. Run the 'configure' script
---------------------------
You need to run the script as root:
# sudo ./configure
It will:
* create the configuration file in /etc/electrum-ok.conf
* create a user that will run the daemon
* optionally, download a fresh database from the Electrum-OK Foundry.
If you choose not to use the Foundry, your server will have to build
the database from scratch. This process can take several days. To
speed it up, it is recommended to locate your database in shared
memory, in electrum-ok.conf: path = /run/shm/electrum-ok_db
Note: The 'configure' script does not configure SSL and IRC. You will
need to manually edit the configuration file in order to enable SSL on
your server, and to be visible on IRC.
3. Install the python package
-----------------------------
# sudo python setup.py install
Note: You will need to redo this everytime you pull code from git.
4. Using the server
-------------------
Use 'electrum-ok-server' to start and stop the server:
# electrum-ok-server <start|stop|status|getinfo>
The server will write a log file in its database path.
5. Add electrum-ok-server to your system's services
----------------------------------------------------
If your system supports it, you may add electrum-ok-server to the
/etc/init.d directory. This will ensure that the server is started and
stopped automatically, and that the database is closed safely whenever
your machine is rebooted.
# ln -s `which electrum-ok-server` /etc/init.d/electrum-ok-server
# update-rc.d electrum-ok-server defaults
6. Troubleshooting:
-------------------
* if your server or okcashd is killed because is uses too much
memory, configure okcashd to limit the number of connections
* if you see "Too many open files" errors, you may need to increase
your user's File Descriptors limit. For this, see
http://www.cyberciti.biz/faq/linux-increase-the-maximum-number-of-open-files/