Efarm Project - User's Guide Version 2.0 Efarm-1.0
Efarm Project - User's Guide Version 2.0 Efarm-1.0
Version 2.0
eFarm-1.0
Copyright © www.efarm-project.net
1
Summary
Copyright © www.efarm-project.net
2
1- What is eFarm and how to get it ?
eFarm is an Open-source* project which goal is to develop a server software for handling
private data sharing networks called « Peer-to-peer* » or P2P*.
eFarm is currently developed by four computer sciences students and doesn’t have any
external funding. It is developed in a scholar frame of its developers and with the help and the
computers of their school.
The eFarm project owns a website in which you can find all information about this
project:
http://www.efarm-project.net
You’ll find there all the latest versions of eFarm in the « Downloads » section.
Copyright © www.efarm-project.net
3
Copyright © www.efarm-project.net
4
3- Supported systems
eFarm-1.0 was tested to work on the following systems :
eFarm-1.0 should work on other Unix systems which have integrated « pthread library»
but it wasn’t already tested.
The minimal hardware configuration required for running eFarm, mainly depends on the
number of users which will be able to connect to the server. However, here are two examples
of hardware configuration for two servers with different numbers of connections:
Processor : 1 Ghz
RAM : 512 Mo
Copyright © www.efarm-project.net
5
4- Installation and Configuration of eFarm
a. On Unix/Linux systems
You first have to correctly install and configure your Unix or Linux system with all usual
development software (compilators, libraries, …). If you already did it, just use a shell under
a simple user account to do the installation.
The « root » user is necessary only if you configure eFarm for listening to connections on
a port lower than 1024 and if you do the installation in the default directory.
Then you must extract the tar.gz archive you downloaded on our site, to the directory of
your choice. For doing it, just type the following shell command lines :
These command lines will create a « eFarm-X.Y » directory where « X » and « Y » are
the numbers of the eFarm version. Enter this directory :
$ cd eFarm-y.x
Now you must run the configuration script of the installation program which will
automatically detect your system’s requirements :
$ ./configure
eFarm 1.0
Configuration:
host support............. : yes i586-pc-linux-gnu
module ed2k compile...... : no
module example compile... : no
module httpd compile..... : yes
debug support............ : no
$ ./configure –help
Copyright © www.efarm-project.net
6
When you’ve finished this step, you must compile eFarm for your system as follows :
$ make
When the eFarm’s compilation is finished, you must install it on your system with the
following command line :
$ make install
/usr/local/
/usr/local/lib/
/usr/local/bin/
/usr/local/conf/
If the directories don’t exist, they will be automatically created by the « make install »
command.
But you can define your own directory by bringing the --prefix=/YourFullPath
option to “./configure” .
$ ./configure -–prefix=/home/eFarm
If you aren’t connected as « root » user, you must specify the « --prefix » option to get no
errors when running the « make install » command.
b. On Windows® systems
For all versions next to 0.2a, you must have installed the Unix environment for
Windows® known as Cygwin :
http://www.cygwin.com
When you did it, just see the last section (Unix/Linux) and follow the same steps for the
configuration and compilation.
The eFarm team doesn’t provide any executable (pre-compiled program or binary).
Copyright © www.efarm-project.net
7
5- eFarm’s configuration files
The eFarm’s configuration is now divided into various parts.
The main configuration file is « efarm.conf ». Next, there is a configuration file for each
module, that are « mod_ed2k.conf » and « mod_httpd.conf ».
By default, those files are installed in /usr/local/conf/.
a. efarm.conf file
Here is the detailed description of the fields from the main efarm’s configuration file
« efarm.conf » :
IOBUFSRSIZE= The received/sent data packets from the network, are cut
into slices of IOBUFSRSIZE bytes (very useful for
bandwith optimisations).
PID= Full path to the file where the eFarm’s process ID will
be stored.(eg: /var/run/efarm.pid).
LOGS= Full path to the file where the eFarm’s logs will be
stored.(eg: /var/log/efarm.log).
<Module ed2k_module>
path=/usr/local/lib/eFarm/ed2k.so
TCP_Port=4661
UDP_Port=4665
TCP_Threads=5
UDP_Thread=yes
LOGIN_Thread=yes
MAXCLIENTS=1000
KEEPALIVE=yes
</Module>
<Module httpd_module>
path=/usr/local/lib/eFarm/httpd.so
TCP_Port=8080
TCP_Threads=1
LOGIN_Thread=no
MAXCLIENTS=10
KEEPALIVE=no
</Module>
b. mod_ed2k.conf file
NAME= Name of the eDonkey server (sent to the client)
c. mod_httpd.conf file
Copyright © www.efarm-project.net
9
6- Running eFarm
For running eFarm under Unix/Linux, go to the directory where it was installed :
$ cd /yourpathtoeFarm/bin/
$ ./eFarm
For getting some more information about the eFarm’s command line, type :
$ ./eFarm h
For running efarm, we suggest that you use the « screen » command because the server
has a text console.
Pour getting eFarm running again in the event of a crash, we suggest you use the
following shell script :
$ script.sh file
ulimit -n 100000
while :
do
./eFarm
sleep 1
done
For more information about the « screen » command, you can go to the following
webpage :
http://www.gnu.org/software/screen/screen.html
Under Windows® you must go in the installation directory and double-click the eFarm’s
icon.
Copyright © www.efarm-project.net
10
7- Resolving common problems
a. Permission denied
/bin/sh ../mkinstalldirs /usr/local/bin
/bin/sh ../libtool --mode=install /usr/bin/install -c eFarm /usr/local/bin/eFarm
/usr/bin/install -c eFarm /usr/local/bin/eFarm
/usr/bin/install: cannot remove `/usr/local/bin/eFarm': Permission denied
make[2]: *** [install-binPROGRAMS] Error 1
make[2]: Leaving directory `/root/eFarm-1.0/src'
make[1]: *** [install-am] Error 2
make[1]: Leaving directory `/root/eFarm-1.0/src'
make: *** [install-recursive] Error 1
You ran the make install command with the default « --prefix » without being root.
Solution run the « ./configure » again with a « --prefix » to a directory where you have
writing rights or run the make install command as root. To get your user account information
type the « id » command.
b. Group is invalid
<error> initialize.c L114 in switch_to_user_group(): the group specified is invalid
The specified group in the efarm.conf file doesn’t exist. Edit the configuration file and
change the user’s group.
…it means that the path to the module is bad. Edit the configuration file and change the
path to the module.
Copyright © www.efarm-project.net
11
8- Glossary
Peer-to-peer (P2P) : Name given to a new way of sharing files on Internet based on
interchange between two users and not anymore between a user and a
server.
Open source : Software’s development philosophy which goal is to grant access to the
source code to anyone in opposition with owner software.
Copyright © www.efarm-project.net
12
9- Appendages
0. PREAMBLE
We have designed this License in order to use it for manuals for free
software, because free software needs free documentation: a free program
should come with manuals providing the same freedoms that the software
does. But this License is not limited to software manuals; it can be used
for any textual work, regardless of subject matter or whether it is
published as a printed book. We recommend this License principally for
works whose purpose is instruction or reference.
This License applies to any manual or other work, in any medium, that
contains a notice placed by the copyright holder saying it can be
distributed under the terms of this License. Such a notice grants a world
wide, royalty-free license, unlimited in duration, to use that work under
the conditions stated herein. The "Document", below, refers to any such
manual or work. Any member of the public is a licensee, and is addressed
as "you". You accept the license if you copy, modify or distribute the
work in a way requiring permission under copyright law.
A "Modified Version" of the Document means any work containing the Document
or a portion of it, either copied verbatim, or with modifications and/or
translated into another language.
Copyright © www.efarm-project.net
13
matters, or of legal, commercial, philosophical, ethical or political
position regarding them.
The "Invariant Sections" are certain Secondary Sections whose titles are
designated, as being those of Invariant Sections, in the notice that says
that the Document is released under this License. If a section does not
fit the above definition of Secondary then it is not allowed to be
designated as Invariant. The Document may contain zero Invariant Sections.
If the Document does not identify any Invariant Sections then there are
none.
The "Cover Texts" are certain short passages of text that are listed, as
Front-Cover Texts or Back-Cover Texts, in the notice that says that the
Document is released under this License. A Front-Cover Text may be at most
5 words, and a Back-Cover Text may be at most 25 words.
The "Title Page" means, for a printed book, the title page itself, plus
such following pages as are needed to hold, legibly, the material this
License requires to appear in the title page. For works in formats which
do not have any title page as such, "Title Page" means the text near the
most prominent appearance of the work's title, preceding the beginning of
the body of the text.
A section "Entitled XYZ" means a named subunit of the Document whose title
either is precisely XYZ or contains XYZ in parentheses following text that
translates XYZ in another language. (Here XYZ stands for a specific
section name mentioned below, such as "Acknowledgements", "Dedications",
"Endorsements", or "History".) To "Preserve the Title" of such a section
when you modify the Document means that it remains a section "Entitled XYZ"
according to this definition.
The Document may include Warranty Disclaimers next to the notice which
states that this License applies to the Document. These Warranty
Disclaimers are considered to be included by reference in this License, but
only as regards disclaiming warranties: any other implication that these
Warranty Disclaimers may have is void and has no effect on the meaning of
this License.
2. VERBATIM COPYING
Copyright © www.efarm-project.net
14
You may copy and distribute the Document in any medium, either commercially
or noncommercially, provided that this License, the copyright notices, and
the license notice saying this License applies to the Document are
reproduced in all copies, and that you add no other conditions whatsoever
to those of this License. You may not use technical measures to obstruct
or control the reading or further copying of the copies you make or
distribute. However, you may accept compensation in exchange for copies.
If you distribute a large enough number of copies you must also follow the
conditions in section 3.
You may also lend copies, under the same conditions stated above, and you
may publicly display copies.
3. COPYING IN QUANTITY
If you publish printed copies (or copies in media that commonly have
printed covers) of the Document, numbering more than 100, and the
Document's license notice requires Cover Texts, you must enclose the copies
in covers that carry, clearly and legibly, all these Cover Texts: Front-
Cover Texts on the front cover, and Back-Cover Texts on the back cover.
Both covers must also clearly and legibly identify you as the publisher of
these copies. The front cover must present the full title with all words
of the title equally prominent and visible. You may add other material on
the covers in addition. Copying with changes limited to the covers, as long
as they preserve the title of the Document and satisfy these conditions,
can be treated as verbatim copying in other respects.
If the required texts for either cover are too voluminous to fit legibly,
you should put the first ones listed (as many as fit reasonably) on the
actual cover, and continue the rest onto adjacent pages.
It is requested, but not required, that you contact the authors of the
Document well before redistributing any large number of copies, to give
them a chance to provide you with an updated version of the Document.
4. MODIFICATIONS
You may copy and distribute a Modified Version of the Document under the
conditions of sections 2 and 3 above, provided that you release the
Modified Version under precisely this License, with the Modified Version
filling the role of the Document, thus licensing distribution and
modification of the Modified Version to whoever possesses a copy of it. In
addition, you must do these things in the Modified Version:
A. Use in the Title Page (and on the covers, if any) a title distinct
from that of the Document, and from those of previous versions (which
should, if there were any, be listed in the History section of the
Copyright © www.efarm-project.net
15
Document). You may use the same title as a previous version if the
original publisher of that version gives permission.
B. List on the Title Page, as authors, one or more persons or entities
responsible for authorship of the modifications in the Modified Version,
together with at least five of the principal authors of the Document
(all of its principal authors, if it has fewer than five), unless they
release you from this requirement.
C. State on the Title page the name of the publisher of the Modified
Version, as the publisher.
D. Preserve all the copyright notices of the Document.
E. Add an appropriate copyright notice for your modifications adjacent to
the other copyright notices.
F. Include, immediately after the copyright notices, a license notice
giving the public permission to use the Modified Version under the terms
of this License, in the form shown in the Addendum below.
G. Preserve in that license notice the full lists of Invariant Sections and
required Cover Texts given in the Document's license notice.
H. Include an unaltered copy of this License.
I. Preserve the section Entitled "History", Preserve its Title, and add to
it an item stating at least the title, year, new authors, and publisher
of the Modified Version as given on the Title Page. If there is no
section Entitled "History" in the Document, create one stating the
title, year, authors, and publisher of the Document as given on its
Title Page, then add an item describing the Modified Version as stated
in the previous sentence.
J. Preserve the network location, if any, given in the Document for public
access to a Transparent copy of the Document, and likewise the network
locations given in the Document for previous versions it was based on.
These may be placed in the "History" section. You may omit a network
location for a work that was published at least four years before the
Document itself, or if the original publisher of the version it refers
to gives permission.
K. For any section Entitled "Acknowledgements" or "Dedications", Preserve
the Title of the section, and preserve in the section all the substance
and tone of each of the contributor acknowledgements and/or dedications
given therein.
L. Preserve all the Invariant Sections of the Document, unaltered in their
text and in their titles. Section numbers or the equivalent are not
considered part of the section titles.
M. Delete any section Entitled "Endorsements". Such a section may not be
included in the Modified Version.
N. Do not retitle any existing section to be Entitled "Endorsements" or to
conflict in title with any Invariant Section.
O. Preserve any Warranty Disclaimers.
Copyright © www.efarm-project.net
16
entity you are acting on behalf of, you may not add another; but you may
replace the old one, on explicit permission from the previous publisher
that added the old one.
The author(s) and publisher(s) of the Document do not by this License give
permission to use their names for publicity for or to assert or imply
endorsement of any Modified Version.
5. COMBINING DOCUMENTS
You may combine the Document with other documents released under this
License, under the terms defined in section 4 above for modified versions,
provided that you include in the combination all of the Invariant Sections
of all of the original documents, unmodified, and list them all as
Invariant Sections of your combined work in its license notice, and that
you preserve all their Warranty Disclaimers.
The combined work need only contain one copy of this License, and multiple
identical Invariant Sections may be replaced with a single copy. If there
are multiple Invariant Sections with the same name but different contents,
make the title of each such section unique by adding at the end of it, in
parentheses, the name of the original author or publisher of that section
if known, or else a unique number. Make the same adjustment to the section
titles in the list of Invariant Sections in the license notice of the
combined work.
In the combination, you must combine any sections Entitled "History" in the
various original documents, forming one section Entitled "History";
likewise combine any sections Entitled "Acknowledgements", and any sections
Entitled "Dedications". You must delete all sections Entitled
"Endorsements".
6. COLLECTIONS OF DOCUMENTS
You may make a collection consisting of the Document and other documents
released under this License, and replace the individual copies of this
License in the various documents with a single copy that is included in the
collection, provided that you follow the rules of this License for verbatim
copying of each of the documents in all other respects.
You may extract a single document from such a collection, and distribute it
individually under this License, provided you insert a copy of this License
into the extracted document, and follow this License in all other respects
regarding verbatim copying of that document.
Copyright © www.efarm-project.net
17
if the Document is in electronic form. Otherwise they must appear on
printed covers that bracket the whole aggregate.
8. TRANSLATION
9. TERMINATION
You may not copy, modify, sublicense, or distribute the Document except as
expressly provided for under this License. Any other attempt to copy,
modify, sublicense or distribute the Document is void, and will
automatically terminate your rights under this License. However,
parties who have received copies, or rights, from you under this License
will not have their licenses terminated so long as such parties remain in
full compliance.
The Free Software Foundation may publish new, revised versions of the GNU
Free Documentation License from time to time. Such new versions will be
similar in spirit to the present version, but may differ in detail to
address new problems or concerns. See http://www.gnu.org/copyleft/.
Copyright © www.efarm-project.net
18