|
Though ENTROPY is compiled from the same source tree as well for UNIX systems as for Windows, there are separate descriptions for the pre-requisites and the process of building a binary.
Most Windows users will first have to download and install a developement environment (CYGWIN), while most Linux, *BSD or other Unix flavour users will almost always have the GNU C compiler installed or at least available in their distribution.
The Macintosh OS X BSD subsystem is based directly from FreeBSD. Therefore, basic the basic install is very similar to the Unix section below. Additional information can also be found in the README file of the Entropy distribution.
Required Software
In order to compile Entropy you must download and install the following items:
Once you have installed the required software, follow the information on the CVS page to download a copy of the Entropy source. Stop and return to these instructions after you have performed the initial check out. Note: For convenience, issue the cvs check out command in the "/Applications" directory. This will put Entropy in "/Applications/entropy".
At this point you should have the Entropy source code loaded in "/Applications/entropy". Change to that directory because we now need to tell Entropy a little bit about our system before we can compile.
Edit the Makefile using pico (e.g. "pico Makefile") or a graphical editor like SubEthaEdit.
Near the top you will notice some example settings. Note which one corresponds to your system. If none of them do, choose the closest match.
# Example Settings
#
# PPC YDL 3.x: ARCH=PPC, ALTIVEC=1, PREBIND=0, HAVE_SOCKLEN_T=1, HAVE_MMAP=0
# PPC G3 MAC OS 10.2.x: ARCH=PPC, ALTIVEC=0, PREBIND=1, HAVE_SOCKLEN_T=0, HAVE_MMAP=1
# PPC G4 MAC OS 10.2.x: ARCH=PPC, ALTIVEC=1, PREBIND=1, HAVE_SOCKLEN_T=0, HAVE_MMAP=1
# PPC G5 MAC OS 10.2.x: ARCH=PPC_G5, ALTIVEC=1, PREBIND=1, HAVE_SOCKLEN_T=0, HAVE_MMAP=1
Next, using the information in the example settings, ensure the options are set accordingly. For example: You'll find a line that looks like:
ARCH=X86
followed by a commented line (#):
ARCH=PPC
Just put the comment character (#) in front of the X86 line and remove it from the PPC line. You'll find a line that looks like:
ALTIVEC=0
If you have an Altivec enabled processor, set this to 1:
ALTIVEC=1
Complete the rest of the file in this same manner based upon the example settings. When are done, save the Makefile and, at the command prompt, enter
make
You may see some warning messages. This is normal.
If the compile went okay, now copy entropy.conf-dist to entropy.conf (cp entropy.conf-dist entropy.conf) and edit this copy with your favourite text editor. Be sure to specify you IP address.
You'll also have to copy and edit the distributed seed.txt-dist file. So do a cp seed.txt-dist seed.txt and remove the comment from one or more lines with nodename:port contents. The more you uncomment, the faster your node will start-up.
After setting up those configuration files, you should now run your node with ./run.sh. You should see some messages indicating the startup values. Be patient until you see the command line prompt. At this time Entropy is running. Congratulations! After a few minutes Entropy will become aware of other nodes in the network and establish connections with them.
If you now open the URL http://127.0.0.1:9999/ in your web browser, you should see a gateway page. There you'll see links to the node status page where you can take a look at established connections, information about your nodes store (database), status, and a few other things.
Try to fetch some of the sites listed on the left hand side of the gateway page. Most of the time it will take several retries to get to the content, especially if your node has not yet contacted many other nodes. After several minutes, however, you should be able to retrieve much of the data stored in the network. For optimal results, let your node run overnight. This will result in better performance.
Back to the main index
Besides the C compiler and the libc (tested with GNU C compiler gcc) you'll need the following libraries:
-
Zlib, ZIP compression from http://www.gzip.org/zlib/
You should find this library an almost any system out there. The Makefile expects the "zlib.h" header file either in /usr/include or /usr/local/include. The static library libz.a should reside in /usr/lib/libz.a
-
Expat, XML parser from http://expat.sourceforge.net
I'm using version 1.95.4, but it is only important to have expat library installed in /usr/local/lib/libexpat.a
You can achieve this by configuring expat with ./configure --prefix=/usr/local
Install those libraries according to the README files which you will find after untarring their source code.
ENTROPY comes without automake (ie. without ./configure scripts) but should translate out of the box on *BSD and Linux systems.
The TAR ball can be unpacked with
tar xzf
entropy-0.9.1-439.tgz
(adjust version and build number).
Change into the directory
cd entropy-x.y.z (where x.y.z
is the version number)
and then enter
make
(or gmake if GNU make isn't your default make utility).
If the compile went okay, now copy entropy.conf-dist like cp entropy.conf-dist entropy.conf and edit this copy with your favourite text editor.
You should at least change the domain name for your node (if you have a domain, that is) or enter the IP number of your internet connection. You can get a free domain name for your dynamic IP from several service providers. Take a look at dyndns.org, dhs.org or fnds.net and read about their policies.
You'll also have to copy and edit the distributed seed.txt-dist file. So do a cp seed.txt-dist seed.txt and remove the comment from one or more lines with nodename:port contents. You can also add more nodes, if you know their IPs and port numbers.
Hint: some nodes which are online regularly are eldritch.homeunix.net:37373, 139.30.40.30:37373 and fbi-ny.ath.cx:10101.
After setting up those configuration files, you should now run your node with ./entropy or ./run.sh (which does not do much more, but call entropy with verbos mode on). You should see some messages indicating the startup values. Be patient until the program call returns to the command line prompt. Afterwards you can inspect your process list with ps or ps ax and you should see several processes with the name entropy. Those are some forked instances of entropy, doing the various jobs like accepting connections, searching for outgoing nodes and connecting them, managing the data store etc.
If you now open the URL http://127.0.0.1:9999/ in your web browser, you should see a gateway page. There you'll see links to the node status page where you can take a look at established connections and the store info and status.
Try to fetch some of the linked files or sites. Most of the time it will take some retries to get to the content, especially if your node has not yet contacted many other nodes. After some minutes, however, you should be able to retrieve much of the data stored in the network. For optimal results, let your node run overnight. This will result in better performance.
Back to the main index
Required downloads
You'll have to install a CYGWIN environment to compile entropy. The easiet way to get it is to download the setup.exe from www.cygwin.com and start it on a machine with some free harddisc space.
After starting setup.exe there are some questions to be answered, such as from where to install (from the internet or a local directory), if and what proxy settings to use and where to install the downloaded files. If you're going to download first, without installing, you'll have to restart setup.exe afterwards and the install the defaults.
Here's a suggested list of required packages (besides the ones that setup would install as defaults). You don't need everything, but you need a good part of the development environment to be able to compile expat. Recent versions of CYGWIN had expat included as a library, so you might not need some of the following packages (I haven't tested which ones you don't need):
- Archive
unzip, zip
- Base
bash, cygwin, diff, fileutils, gawk, grep, gzip, login, sed, tar, terminfo, textutils, zlib
- Devel
autoconf, automake, binutils, cvs, expat, gcc, libintl, libintl1, make, mktemp
- Editors
vim
- Interpreters
gawk, m4, perl
- Lib
libintl1
- Libs
ncurses, openssl, popt, termcap, w32api, zlib
- Net
inetutils, openssh, openssl, rsync
- Shells
bash, sh-utils
- Text
less
- Utils
bzip2, cygutils, time
- Web
lynx, wget
It is sufficient to click on the respective packages in the list (expand the folders first) so that install (or reinstall) is activ. Sometimes setup might show a version number and sometimes this number might even be 0.0 -- just ignore these details and install abovementioned packages. You can also download and/or install the sources, but you won't need them.
The rest of the installation should continue without too much trouble. If you selected to (only) download files first, you now have to restart setup.exe and choose 'install from local directory' this time. Choose 'install all' (by setting the 'All' folder to install or reinstall) and you should have everything you need.
Getting the Entropy source code from my CVS server
If stop1984.com is reachable, which happens to be the case most of the time, you can now logon to the CVS repository with the following command:
cvs -d :pserver:anonymous@stop1984.com:/home/cvs login
Answer the question for a password by just hitting ENTER. Next you run the checkout command (also only for this first time) for cvs by entering:
cvs -z2 -d :pserver:anonymous@stop1984.com:/home/cvs co entropy
Now you should see the sources being downloaded to a local directory ./entropy. Go there by entering:
cd entropy
There is no configuration required. Entropy should compile on Linux, *BSD and CYGWIN 'out of the box'. Just do a simple
make
and you should be set. You can take a look at the result by entering
ls -l entropy.exe
If you see this file listed, here are my Congratulations! for successfully building your first CYGWIN binary.
If not, then check the above steps again and if everything else fails, pay Entropy forum a visit or in case of serious disorder drop me an email.
Now copy the entropy.conf-dist and seed.txt-dist files to some local entropy.conf and seed.txt files and edit them, as it is described in the files (and in the *nix compile section). In short:
cp entropy.conf-dist entropy.conf
cp seed.txt-dist seed.txt
If you're not familiar with vi, you should perhaps use Window's notepad or some other text editor to make the modifications. From Windows you should find the files at C:\CYGWIN\HOME\USERNAME\... in the entropy subdirectory (USERNAME is your Windows logon name).
Finally you can run your Entropy node by entering:
./run.sh
and you can later halt it with
./stop.sh
Further updates of Entropy
This part is easy, compared to the previously described first time setup. Just start a CYGWIN shell (or stop a running entropy by entering ./stop.sh), go to the entropy directory and type in the following CVS command:
cvs -z2 up -dAP
Then you should do a
make clean
to be sure to compile everything, including things that might have changed in unsuspected ways (if you dare, you can trust the dependency checks of the Makefile rules). Then do a:
make
and start the new build with
./run.sh
again.
That's it!
Back to the main index
|