<commit_before>#########################################################################
#									#
#									#
#	##	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

(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

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:   ###########

# to run otserver as a foreground process:
$ otserver

to run otserver as a background process, configure it using:
./configure --with-script=chai5 --enable-cxx11 --disable-cxxtr1 --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

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

# to look at an example wallet (WARNING : will reset all user data):
$ mkdir -p ~/.ot && cp -R sample-data/ot-sample-data/* ~/.ot

# also checkout tarball of sample contracts, baskets, server
$ cd /usr/local/share/opentxs
$ tar -xvf user-samples.tar.gz
$ ls

# for python client api support export env variable
$ export PYTHONPATH=/usr/local/lib:$PYTHONPATH
################################################
<commit_msg>Added instructions for updating the password_folder path in the server.cfg file<commit_after>#########################################################################
#									#
#									#
#	##	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

(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

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:   ###########

# to run otserver as a foreground process:
$ otserver

to run otserver as a background process, configure it using:
./configure --with-script=chai5 --enable-cxx11 --disable-cxxtr1 --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

# to look at an example wallet (WARNING : will reset all user data):
$ mkdir -p ~/.ot && cp -R sample-data/ot-sample-data/* ~/.ot

# also checkout tarball of sample contracts, baskets, server
$ cd /usr/local/share/opentxs
$ tar -xvf user-samples.tar.gz
$ ls

# for python client api support export env variable
$ export PYTHONPATH=/usr/local/lib:$PYTHONPATH
################################################

{'fraction_non_alphanumeric': 0.17330831217573683, 'fraction_numerical': 0.008168672038856385, 'mean_word_length': 3.408759124087591, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2950442', 'n_tokens_mistral': 2897, 'n_tokens_neox': 2684, 'n_words': 934}