Freenet Installation and Administration
Freenet, quite possibly the most exciting file-sharing technology out there, is unfortunately a little difficult to install and administer. 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, Freenet's ease of use has come a long way since then. With an hour or two of work, anyone competent in Linux system administration should be able to get their own Freenet node up and running.
The installation of a Java runtime is out of the scope of this article. However, a list of recommended JDKs (Java Development Kit) and some warnings about them can be found in the Resources section.
If you want to run a full-time, contributing node you'll need 100MHz 486 or greater with at least 32MB of RAM. There are no minimum requirements (other than about 1MB for the actual software) for hard drive space, but in this age of 20GB drives, it'd be nice if you set aside a few GBs for Freenet data. For your internet connection, a static IP address or dynamic DNS is required. Anything faster than a dial-up is fine. As for uptime, if your node is on 24/7 you can contribute (downtimes of up to an hour or so are okay, but try to avoid anything more than that). Anything less and your node will still work just fine for you, but you won't be contributing anything to the network.
For a part-time, noncontributing node, similar system and memory requirements apply, but you can use whatever internet connection you like.
First of all, you need to actually download Freenet. Here you have two main options. You can download a binary or choose the source package. If you run Debian, Mr. Bad has created a Debian package (see Resources). Because Freenet is written in Java, you don't have to worry about binary compatibility, so it's easiest simply to download a binary package. After that the question is which 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 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 automatically start at boot up. Unfortunately, not all distributions handle the startup scripts quite the same way. If you want to use dæmontools, follow the instructions at freenet.netunify.com/25. Otherwise, use something like:
su - -c "cd ~/freenet ; rm freenet.log nohup.out ; nohup ./freenet_server & >/dev/null" freenet
This changes the user to the Freenet user. The “-” sets the environment to that of a login shell so the environment is set up as though running from a normal shell. Finally, the command -c changes the directory to the Freenet directory, removes old log files and runs the Freenet server in nohup mode directing any non-errors 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.
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 its existence. This is probably what you want if you plan on running a 24/7 node with a good internet connection and a static IP address or dynamic DNS service. If you set transient to “yes”, your node won't tell other nodes about its existence. If you have spotty uptime, a slow internet connection or a 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 5,000 and 65,535. If everyone ran their node on the same port it would be far easier for Freenet to be filtered out, which is not a good thing. To do this, change the listenPort value in .freenetrc and the serverAddress in .fproxyrc to reflect the new port. Also, remember to use the -serverAddress option when running the command-line clients or set the FREENET environment variable to the address of your node.
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 tell them the address in the nodeAddress setting.
|Designing Electronics with Linux||May 22, 2013|
|Dynamic DNS—an Object Lesson in Problem Solving||May 21, 2013|
|Using Salt Stack and Vagrant for Drupal Development||May 20, 2013|
|Making Linux and Android Get Along (It's Not as Hard as It Sounds)||May 16, 2013|
|Drupal Is a Framework: Why Everyone Needs to Understand This||May 15, 2013|
|Home, My Backup Data Center||May 13, 2013|
- Designing Electronics with Linux
- New Products
- Making Linux and Android Get Along (It's Not as Hard as It Sounds)
- Dynamic DNS—an Object Lesson in Problem Solving
- Using Salt Stack and Vagrant for Drupal Development
- Validate an E-Mail Address with PHP, the Right Way
- Tech Tip: Really Simple HTTP Server with Python
- Why Python?
- Build a Skype Server for Your Home Phone System
- Drupal Is a Framework: Why Everyone Needs to Understand This
- Reply to comment | Linux Journal
36 min 25 sec ago
- Reply to comment | Linux Journal
1 hour 26 min ago
- Not free anymore
5 hours 28 min ago
9 hours 15 min ago
- Reply to comment | Linux Journal
9 hours 23 min ago
- Understanding the Linux Kernel
11 hours 38 min ago
14 hours 8 min ago
- Kernel Problem
1 day 10 min ago
- BASH script to log IPs on public web server
1 day 4 hours ago
1 day 8 hours ago
Enter to Win an Adafruit Pi Cobbler Breakout Kit for Raspberry Pi
It's Raspberry Pi month at Linux Journal. Each week in May, Adafruit will be giving away a Pi-related prize to a lucky, randomly drawn LJ reader. Winners will be announced weekly.
Fill out the fields below to enter to win this week's prize-- a Pi Cobbler Breakout Kit for Raspberry Pi.
Congratulations to our winners so far:
- 5-8-13, Pi Starter Pack: Jack Davis
- 5-15-13, Pi Model B 512MB RAM: Patrick Dunn
- 5-21-13, Prototyping Pi Plate Kit: Philip Kirby
- Next winner announced on 5-27-13!
Free Webinar: Hadoop
How to Build an Optimal Hadoop Cluster to Store and Maintain Unlimited Amounts of Data Using Microservers
Realizing the promise of Apache® Hadoop® requires the effective deployment of compute, memory, storage and networking to achieve optimal results. With its flexibility and multitude of options, it is easy to over or under provision the server infrastructure, resulting in poor performance and high TCO. Join us for an in depth, technical discussion with industry experts from leading Hadoop and server companies who will provide insights into the key considerations for designing and deploying an optimal Hadoop cluster.
Some of key questions to be discussed are:
- What is the “typical” Hadoop cluster and what should be installed on the different machine types?
- Why should you consider the typical workload patterns when making your hardware decisions?
- Are all microservers created equal for Hadoop deployments?
- How do I plan for expansion if I require more compute, memory, storage or networking?