Note: this wiki is no longer maintained. If you have any questions related to this wiki, please post them on the CrunchBang forums.

Translations of this page?:

Z-Obsolete Mirror CrunchBang Linux [OBSOLETE]

:!: Please note that these instructions are now defunct. For anyone wishing to help out and provide a mirror, new instructions will be published soon.

Thinking of offering a slice of your bandwidth to help spread the distribution? This page is just for you! It describes the steps needed to set up and register a mirror of the CrunchBang Linux ISO images.

We assume that you have a server, Apache, and SSH set up and running - also a fast connection speed such as 100Mbps is preferable. Rsync must also be installed.

We also require a new directory where the ISO files shall be stored. This could be /srv/crunchbang-mirror/, for example.

Account set up

This section sets up a crunchbang account for the sync user script. This script is run on release and triggers the mirror synchronization to the master rsync repository.

First, we require root privileges to create the account:

sudo -i

Now create a group for the podcast user:

groupadd crunchbang

Create the user with the appropriate flags:

useradd -c crunchbang -d /home/crunchbang/ -s /bin/sh -m -g crunchbang crunchbang

Create a .ssh directory for the user, this is where the SSH key for syncing shall be stored:

mkdir -p /home/crunchbang/.ssh

Download and place the SSH key in the created directory:

wget \
    -O /home/crunchbang/.ssh/authorized_keys

Note that the key's fingerprint is: be:3a:81:ec:ac:a9:e6:17:19:e8:3c:48:53:87:a3:4e. Please make sure you downloaded the correct key.

Change the permissions so that the crunchbang user owns the new files in their home directory:

chown -R crunchbang:crunchbang /home/crunchbang/.ssh
chmod 700 /home/crunchbang/.ssh
chmod 600 /home/crunchbang/.ssh/authorized_keys

Now edit the ”/home/crunchbang/.ssh/authorized_keys” with your favourite editor to point to the mirrors location on the server, if the mirrors root is at /srv/crunchbang-mirror/ (as per the example above) then this would be the location.

vim ~crunchbang/.ssh/authorized_keys

And exit the root session:


DNS configuration

Next, we have to contact Philip Newborough, with details about the server, connection speed, location, IP, OS (You have installed Ubuntu on it, have you not?), and he shall assign you a domain name based on your location. If the mirror is located in France, this could be for example.

Apache configuration

Now with DNS done and forgotten, we must set up Apache or another HTTP daemon that we are running, this section deals with Apache.

Create a configuration file named /etc/apache2/sites-available/crunchbang-mirror and enter the following configuration:

        ServerAdmin webmaster@localhost
        DocumentRoot /srv/crunchbang-mirror
        <Directory />
                Options FollowSymLinks
                AllowOverride None
        <Directory /srv/crunchbang-mirror>
                Options +Indexes -Includes
                IndexOptions NameWidth=* SuppressDescription
                IndexIgnore index.xhtml
                DirectoryIndex None
                AllowOverride None
                Order allow,deny
                allow from all

        CustomLog /var/log/apache2/crunchbang-mirror-access.log combined
        ErrorLog /var/log/apache2/crunchbang-mirror-error.log

        # Possible values include: debug, info, notice, warn, error, crit,
        # alert, emerg.
        LogLevel warn

        ServerSignature On

Forget not to change the VirtualHost, NameVirtualHost and ServerName fields to the domain name you were assigned to, and also the Directory where you podcast mirror is.

Now; enable the site:

sudo a2ensite crunchbang-mirror

And, lo-and-behold; reload/graceful our Apache:

sudo invoke-rc.d apache2 reload

Point your browser to the new domain and you should see the Apache directory listing with a “crunchbang” directory there!

Disabling Your Mirror

If at any point you wish to disable your mirror, you can do so by creating a file named ”.disable” within your mirror directory:

touch /srv/crunchbang-mirror/.disable

Your mirror should be disabled within an hour.

The End of the Guide

That's it! In a matter of time you shall start to receive hits as the automatic download mirror selector does it's magic.

download-mirror-howto.txt · Last modified: 2012/05/24 06:44 by machinebacon
Except where otherwise noted, content on this wiki is licensed under the following license:CC Attribution-Share Alike 3.0 Unported

Powered by DokuWiki. Hosted by Linode.
Copyright © 2010 CrunchBang Linux.
Proudly powered by Debian GNU/Linux.
Debian is a registered trademark of Software in the Public Interest, Inc.