\lstset{language=bash}
\begin{lstlisting}
-$ ./configure --prefix=$HOME --enable-logging
+$ ./configure --prefix=$PREFIX --enable-logging
$ make
$ make install
\end{lstlisting}
-After installing GNUnet you have to set the \lstinline|GNUNET_PREFIX|
-environmental variable used by GNUnet to detect it's installation
-directory and add your GNUnet installation to your path environmental
-variable. This configuration is only valid for the current shell
-session, so you should add \lstinline|export GNUNET_PREFIX=$HOME| to
-your \lstinline|.bash_rc| or \lstinline|.profile| to be sure the
-environment variable is always set. In addition you have to create the
-\lstinline|.gnunet| directory in your home directory where GNUnet
-stores it's data and an empty GNUnet configuration file:
+After installing GNUnet you have to add your GNUnet installation to your path
+environmental variable. In addition you have to create the \lstinline|.gnunet|
+directory in your home directory where GNUnet stores it's data and an empty
+GNUnet configuration file:
\lstset{language=bash}
\begin{lstlisting}
-$ export GNUNET_PREFIX=$HOME
-$ export PATH=$PATH:$GNUNET_PREFIX/bin
-$ echo export GNUNET_PREFIX=$HOME >> ~/.bashrc
-$ echo export PATH=$GNUNET_PREFIX/bin:$PATH >> ~/.bashrc
+$ export PATH=$PATH:$PREFIX/bin
+$ echo export PATH=$PREFIX/bin:\\$PATH >> ~/.bashrc
$ mkdir ~/.gnunet/
$ touch ~/.gnunet/gnunet.conf
\end{lstlisting}
\begin{lstlisting}
$ which gnunet-arm
\end{lstlisting}
-should return \lstinline|$GNUNET_PREFIX/bin/gnunet-arm|. It should be
+should return \lstinline|$PREFIX/bin/gnunet-arm|. It should be
located in your GNUnet installation and the output should not be
empty. If you see an output like:
\begin{lstlisting}
/bin/bash: line 5: 19449 Aborted (core dumped) ${dir}$tst
FAIL: test_program
\end{lstlisting}
-double check your {\tt GNUNET\_PREFIX} environmental variable and double check the steps performed in ~\ref{sub:install}
+double check the steps performed in ~\ref{sub:install}
\section{Background: GNUnet Architecture}
GNUnet is organized in layers and services. Each service is composed of a
\section{First Steps with GNUnet}
\subsection{Configure your peer}
-First of all we need to configure your peer. Each peer is started with a configuration containing settings for GNUnet itself and it's services. This configuration is based on the default configuration shipped with GNUnet and can be modified. The default configuration is located in the {\tt \$GNUNET\_PREFIX/share/gnunet/config.d} directory. When starting a peer, you can specify a customized configuration using the the {\tt$-c$} command line switch when starting the ARM service and all other services. When using a modified configuration the default values are loaded and only values specified in the configuration file will replace the default values.
+First of all we need to configure your peer. Each peer is started with a configuration containing settings for GNUnet itself and it's services. This configuration is based on the default configuration shipped with GNUnet and can be modified. The default configuration is located in the {\tt \$PREFIX/share/gnunet/config.d} directory. When starting a peer, you can specify a customized configuration using the the {\tt$-c$} command line switch when starting the ARM service and all other services. When using a modified configuration the default values are loaded and only values specified in the configuration file will replace the default values.
Since we want to start additional peers later, we need
some modifications from the default configuration. We need to create a separate service home and a file containing our modifications for this peer:
A peers configuration file is by default located in {\tt ~/.gnunet/gnunet.conf}.
This file is typically very short or even empty as only the differences to the
defaults need to be specified. The defaults are located in
-many files in the {\tt \$GNUNET\_PREFIX/share/gnunet/config.d} directory.
+many files in the {\tt \$PREFIX/share/gnunet/config.d} directory.
To configure the second peer, use the files {\tt
- \$GNUNET\_PREFIX/share/gnunet/config.d} as a template for your main
+ \$PREFIX/share/gnunet/config.d} as a template for your main
configuration file:
%
\lstset{language=bash}
\begin{lstlisting}
-$ cat $GNUNET_PREFIX/share/gnunet/config.d/*.conf > peer2.conf
+$ cat $PREFIX/share/gnunet/config.d/*.conf > peer2.conf
\end{lstlisting}
Now you have to edit {\tt peer2.conf} and change:
\begin{itemize}
$ svn checkout https://gnunet.org/svn/gnunet-ext/
$ cd gnunet-ext/
$ ./bootstrap
-$ ./configure --prefix=$HOME --with-gnunet=$GNUNET_PREFIX
+$ ./configure --prefix=$PREFIX --with-gnunet=$PREFIX
$ make
$ make install
$ make check