Hi Don, I've made great progress in writing the Install and Admin artical and thought I should give you a copy to check over to see if I've interpreted the aim right. My current work is attached to this email. The main thing I'm wondering about is where actual Freenet usage information, how to use fproxy etc. will be? Should I incorperate usage into my artical or leave it for another artical, perferably one that will be published in the same issue as mine? Anyway the Feb 1 due date looks quite obtainable right now. -- [EMAIL PROTECTED] http://retep.tripod.com
(C) 2000 Peter Todd Introduction ------------ Freenet, quite possibly the most exciting file sharing technology out there, is unfortunately a little difficult to install and admin. Your intrepid author spent a weekend with literally no sleep (strong tea and death metal can do wonders...) figuring it out when he first got his hands on it back in September 2000. Fortunately though Freenet's ease of use has come a long way in the months between then and now. With a hour or two work anyone competent in Linux system administration should be able to get their own Freenet node up and running. Note that it is assumed that you already have a working Java runtime. This artical is aimed at the advanced user, a knowledge of basic Linux system administration is assumed. (find real usage statistics) If you want to run a full time and contributing node you'll need a system 100mhz 486 or greater (less might be possible but things get *really* slow, I used to run a node on a 486DX4-100 with *lots* of other stuff running at the same time) with at least 32megs of ram. There are no minimum requierments (other then about 1 meg for the actual software) for harddrive space but in this age of 20gig hd's it'd be nice if you set aside a few gigs. For your internet connection a static IP address or dynamic DNS is required. Anything faster then dial-up is fine. As for uptime if your node is on 24/7 (downtimes of up to a hour or so are ok but try to avoid anything more then that) you can contribute, anything less and your node will still work just fine for you won't be contributing anything to the network. As for a part time, non-contributing, node similar system and memory requirements apply and you can use whatever internet connection you like. Basic Installation ------------------ First of all you need to actually download Freenet. Here you have two main options, you can download a binary or source package. Since Freenet is Java based you don't have to worry about binary compatibility so it's easiest to just download a binary package. After that the question is what version do you want, a release (current is 0.3.5) or CVS copy. You'll probably want to go with a release at first. Do remember to make sure you download the Linux tarball, not the Windows executable. The Linux version of Freenet doesn't have any installation scripts. Instead you simply untar the tarball into a directory of your choice. Personally I'd suggest creating a special freenet user and putting the freenet software, and data store, in the freenet user's home directory. Next you'll want to make your node automaticly start at bootup. Unfortunatley different distributions handle the startup scripts quite differently. If you want to use daemontools follow the instructions on http://freenet.netunify.com/25 Otherwise use something like: su - -c "cd ~/freenet ; rm freenet.log nohup.out ; ./freenet_server & 1>/dev/null" freenet This changes the user to the freenet user. The - sets up the enviornment to that of a login shell so there the enviornment is setup as though you ran it from a normal shell. Finally the command inside -c changed the directory to the freenet directory, removes old log files and runs the freenet server directing anything messages to /dev/null You'll need to insure the java program itself is in your path, try running java from a room shell to test this. Configuration ------------- The Freenet node software uses two configuration files: .freenetrc, the configuration for the node and .fproxyrc, the configuration for the fproxy module. Of the two .freenetrc contains all but one of the options, .fproxyrc just tells fproxy which freenet node it should connect to. The first thing you'll want to set is the transient option up at the top of the .freenetrc file. The default, no, means that your node will tell other nodes about it's existance. This is probably want you want if you plan on running a 24/7 node with a good internet connection with a static IP address (changes less then once a month) or dynamic DNS service. If you set transient to yes OTOH your node won't tell other nodes about it's existance. If you can't help out freenet as a whole, spotty uptime, slow internet connection or dynamic IP address without dynamic DNS set transient to yes. You'll want to change the port used by freenet to a random port between 5000 and 65535 Why that range? Well ports 1 to 1023 are reserved and can't be used by programs without root privilegises. Ports 1024 to 4999 are by default used for temporary ports when programs, Netscape for instance, need to connect to servers so we can't safely use one of those ports. Why change anything in the first place? Your node will work just fine if you don't change anything. However if everyone ran their node on the same IP address it would be far easier for Freenet to be filtered out, not a good thing. To actually do this change the listenPort value in .freenetrc and the serverAddress in .fproxyrc to reflect the new port. If you have a dynamic IP address but use dynamic DNS you can still contribute to freenet by setting nodeAddress to your dynamic DNS name. Instead of telling other Freenet nodes the IP address of your machine it will instead tell them the address in the nodeAddress setting. By default Freenet will store a maximum of 1000 items in the datastore and use a maximum of 500mb of harddrive space. The diskCache and dataStoreSize options control this. Note that due to bugs the actual amount of space used can easilly go over this. Often files in the datastore simply get "lost" and don't get deleted when they should be. Restarting the node periodicly, every day or week, will clean out those lost files. Secondly while transfering large files the node will store the whole file while it's in transit even if doing so makes the node go over the size limit. Hopefully by the time you read this artical these bugs will have been fixed, though the second is unfortunately non-trivial to fix for various reasons. There is also a option to limit bandwidth used, bandwidthLimit For most people the 50k/sec limit is probably fine but if you can do increase it. <note: find out specifics of bandwidth limit> At the end of the configuration file are the options that control logging. A single log file is used, freenet.log by default. (controled by logFile) The logging option controls the threshold of events logged. The default, normal, doesn't log any of the mundane details of your node sending and recieving data. minor can often provide usefull debugging info, debugging is overkill. Setting loggin to minor is probably your best best. Finally there is one last option that's not in the default configuration file, informDelay Before writing the nodes address to informURL the node will wait a default of 24 hours to make sure your node is stable. Your node must be running for 24 continuous hours before the informURL is notified! Initally one of the big problems with the informURL system was that people would try Freenet for a few minutes, decide it wasn't worth it and remove the Freenet software. Meanwhile the address of their non-functioning node was sent to informURL. When nodes tried to get a working address for their node almost every single address in informURL would be non-functioning. This got to the point where one of the big problems in getting a node up and running was finding a IP of another node! If you plan on restarting your node once a day you'll have to change the informDelay to something different. Setting it to 0 by adding the line "informDelay = 0" (no quotes) to the config file will disable the feature and is what you want. Otherwise don't touch informDelay, please! Testing ------- Now that you've got your node up and running you want to see if it works right? First try running: freenet_request test-key If that works you'll see the message "Congratulations! You've fetched a Freenet key." on the console after some debugging information. If it doesn't do anything for more then 2 minutes or so it's not working. :( Next try the URL http://localhost:8081/KSK@Aardvark to see if FProxy is working. If it is you'll see the page of "Aardvark's Freenet Index" come up. (note to Ian: Do we really need the following section?) Establishing Your Node --------------------- Actually getting your node established in the network can be a little tricky. It should do so automaticly, it often helps to push the process along a little to speed it up. There are two main parts to this, finding other nodes and getting known by other nodes. Note that if your running a transient node the second part isn't important. The first part is simple, use Freenet! Just take a look at some of the content, such as the above mentioned Aardvark's Freenet Index (KSK@Aardvark) and gj's web page (KSK@webpages/gj_jump0) The second part is a little bit harder. Make 5 or so random 1k files using dd if=/dev/urandom of=junk.dat bs=1k count=1 and insert them into the network using freenet_insert CHK@ junk.dat When your node inserts that data other nodes will find out about your node from the SourceAddress on the packets of data. In any case remember that it will take a few days before your node becomes known and other nodes start to request data from you. So if nothing much seems to be happening Don't Panic! Day-to-Day Admin ---------------- Properly setup a freenet node shouldn't need any on-going administration. However there are a automatable few tasks which need to be done. First of all the log files need to be rotated. Secondly you'll want to restart the Freenet software periodicly. Currently the disk (and I believe memory) usage of freenet tends to balloon unless you restart your node. Both rotating the log files, which requires restarting the node anyway, and restarting the node can be easilly done with the script in figure restart_script For your average node restarting once a week should be fine. About the author ---------------- Peter Todd is a 15 year old who's been using Linux for three years. (exclusively for 1.5 years) He attends Woburn Colligiat where he can be found in Ms. Plactas gr. 12 enriched comp-sci class and in the music hall. He can be contacted at [EMAIL PROTECTED] and has a website, retep.tripod.com