microdc2 is an Free CLI based Direct Connect client for unix like operating systems. Perhaps its most attractive feature is that it has minimal external dependencies and is incredibly fast.
Its an excellent choice for running a linux/bsd DC++ server.
Firstly you will need to install it. You should be able to work that out yourself. Use yum or apt-get depending on your Linux, or the ports tree in your BSD. If this is beyond your knowledge - stop now and look at another option.
Secondly, you need to install screen. This will allow you to run the microdc2 program in a console and detach from it, then re-attach later. Install screen then read its man page :)
Third, you should run microdc2 as a non-root user, who has only read access to your files. Now run microdc2 as that user for the first time. su'ing to that user is an ok idea, sudo may not set the HOME environment correctly.
This is important as microdc2 looks for its config in ~/.microdc2
Fourth, set some shares with the share command, i.e. share /storage/vol1. Just repeat the command with other locations, and microdc2 will add them to its list and start hashing them.
Fifth, quit microdc2 with the exit command. And edit the ~/.microdc2/config file with your favourite editor. The format of this this file is just commands from the microdc2 command line, one command per line. These are run when the program starts, thus configuring the program. Its worth noting that nothing you do on the command line other than adding shares is preserved when you exit. So everything goes in the config file manually. Oh well.
Here is a sample config file...
set listenport 10101
set nick myservernick
set email you@yourdomain.com
set description "dont ask for slots"
set downloaddir /storage/downloads
set speed LAN
set active 1
set auto_reconnect on
set slots 15
connect 172.29.0.1
What does each line mean? Before i tell you, remember that there is a README in the microdc2 tarball, which is likely installed in /usr/share/doc/microdc2 or /usr/local/share/doc/microdc2
set listenport 10101
The port microdc2 will listen on. For a non-root user this has to be a high port i.e. > 1024, other than that just pick something at random like i have. Then open it on the local firewall, iptables for linux, ipfw or a number of others in BSD.
set nick myservernick
The nickname of the server.
set email you@yourdomain.com
Your contact email.
set description "dont ask for slots"
The description as shown in the user listing. Set it to whatever you like
set downloaddir /storage/downloads
This where files that you download will be saved to. If you miss it out, it will default to the current directory when you started microdc2. Even if you are just sharing, its not a bad idea to just set it to something.
set speed LAN
The speed value is just meta-data, just set it to LAN.
set active 1
This tells microdc2 to actually do something. Other than just accepting configuration.
set auto_reconnect on
With this on, microdc2 will continue to try to connect when disconnected or when it fails to connect.
set slots 15
This is the number of slots available. If your not familiar with what slots are in Direct Connect, why are you reading this?
connect 172.29.0.1
Has microdc2 immediately attempt to connect to a hub. I like to set this as the LAN i run has its hub at 172.29.0.1. When im at other lans I can stop it with disconnect on the command line, then type connect <hub>
For reference <hub> can be either an ip or a hostname. Most lans will set up a dns alias for the dc hub as 'dchub', making connect dchub a potential good general case.
For a full list of options, run microdc2 and type set.
Keep in mind that you can try any setting on the command line, then save it to the config file.
Some ideas for additional configuration:-
You can have microdc2 log to a file using set log <options> and set logfile /some/log/file.txt
Reduce the amount of noise from event notifications by using set display <options>. In both cases the options are the same, and the full list of options is provided when you type set
Six and finally, run screen to make a detachable session, then run microdc2. It will then start up with all the options you have configured. You can detach with <ctrl>+<shift>+A+D list detached screens with screen -ls and resume with screen -r
Tips:
Always put your files on disks separate to your OS!!!
Mount the archive filesystem with the 'noatime' flag. This will turn off updating the 'Access Time' flag, something you almost certainly dont care about, in exchange for a small increase in performance (I've read numbers saying 5-7% increase)
None yet!