forked from Open-Transactions/Open-Transactions
-
Notifications
You must be signed in to change notification settings - Fork 48
/
INSTALL-Debian_Ubuntu.txt
163 lines (110 loc) · 4.58 KB
/
INSTALL-Debian_Ubuntu.txt
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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
#########################################################################
# #
# #
# ## INSTALL - Debian, Ubuntu, other debian based ## #
# #
# #
#########################################################################
## Supports Debian 7 or later ##
## an older guide can be found here:
## https://github.com/Open-Transactions/Open-Transactions/blob/6a96f043977afa1b70c90e8859dab5cb55c48d09/docs/INSTALL-Debian_Ubuntu.txt
######### Debian deps: #########
# install general developer dependencies
$ sudo aptitude install wget git build-essential libtool automake cmake pkg-config
# install Open-Transactions library dependencies
$ sudo aptitude install libzmq-dev libmsgpack-dev libssl-dev
$ sudo aptitude install protobuf-compiler libprotobuf-dev
# On Ubuntu 12.04, or any system without C++11 compiler support
# (GCC version lower than 4.7) you also need boost:
$ sudo aptitude install libboost-all-dev
(NB: may need "libprotoc" if "protobuf-compiler" pkg not available on debian-like sytems)
######### Optional API deps: #########
$ sudo aptitude install ...
SWIG JAVA: openjdk-6-jdk openjdk-6-source
SWIG PERL5: libperl-dev
SWIG PHP: php5-dev
SWIG PYTHON: python-dev
SWIG RUBY: ruby ruby-dev
SWIG TCL: tcl tcl-dev
SWIG CSHARP: mono-mcs monodevelop
SWIG D: gdc
###########################################
## Make a dir for all the stuff ##
cd ~ && mkdir -p dev && cd dev
######## Download opentxs #############
# fetch O-T and prepare your copy for build
# 'stable' (alpha) source tar ball method
$ wget -c http://sourceforge.net/projects/opentxs/files/latest/download
$ tar -zxvf opentxs-*
$ cd opentxs-*
$ ./autogen.sh
### OR ###
# git pull latest development source method
$ git clone git://github.com/Open-Transactions/Open-Transactions.git
$ cd Open-Transactions
$ ./autogen.sh
########################################
$ ./configure
######### Configure Options: #########
Debug Mode: --enable-debug
Signal Handling: --enable-sighandler
Warnings: --enable-warnings
Release Mode: --enable-release
(default)
(Optional)
System Keyring: --with-keyring=ARG
Arguments: gnome, kwallet, windows, mac, or flatfile
opentxs Autocompletion: --with-bashcompletion=
path depending on the system e.g. /etc/bash_completion.d/
Enable OTAPI support for swig wrapper:
Java: --with-java
Perl 5: --with-perl5
PHP: --with-php
Python: --with-python
Ruby: --with-ruby
TCL: --with-tcl
CSHARP: --with-csharp
D: --with-d
Go: --with-go
##########################################
$ sudo make uninstall (cleanup from possible previous build)
$ make
Build Multithreaded, need about 1gb of ram per thread.
-j (int)
Install to system
$ sudo make install
Link the libraries
$ sudo ldconfig
########### Miscellaneous Notes: ###########
## Load some sample data to look at an example wallet
!!! WARNING : will reset all user data !!!
$ mkdir -p ~/.ot && cp -R sample-data/ot-sample-data/* ~/.ot
# also can checkout tarball of sample contracts, baskets, server
$ cd /usr/local/share/opentxs
$ tar -xvf user-samples.tar.gz
$ ls
# to run otserver as a foreground process:
$ otserver
# to run otserver as a background process, configure it using:
$ ./configure --with-keyring=flatfile
# plus any other desired options, compile and install as usual,
$ cp dev/Open-Transactions/sample-data/ot-sample-data/background_server.cfg $HOME/.ot/server.cfg
# and change the password_folder path to a location appropriate for your system.
$ mkdir $HOME/.ot/server_data/passphrase
# Run and create otserver as usual as a foreground process and enter the passphrase when requested.
# Then press Ctrl-c to exit the server,
$ cd to $HOME/.ot/server_data and rm ot.pid
$ cd $HOME/.ot (or any other folder you want to run otserver from and store its log file in)
# The following command will run otserver as a daemon process in the background:
$ nohup otserver &
# All server output will be redirected to a 'nohup.out' file in the folder you
# launch otserver from. The pid of the daemon process will be listed after you
# press return. It is also listed in $HOME/.ot/server_data/ot.pid, in case you forget it.
# To kill the server daemon process, enter:
$ cd $HOME/.ot/server_data
$ cat ot.pid to display the process id <pid> of the daemon process that is running the server
$ kill <pid>
$ rm ot.pid
# for python client api support export env variable
$ export PYTHONPATH=/usr/local/lib:$PYTHONPATH
################################################