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.
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:
Now create a group for the podcast user:
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 http://crunchbanglinux.org/misc/authorized_keys \ -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.
And exit the root session:
Next, we have to contact Philip Newborough email@example.com, 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 fr-pa-0.mirror.crunchbanglinux.org for example.
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:
NameVirtualHost fr-pa-0.mirror.crunchbanglinux.org <VirtualHost fr-pa-0.mirror.crunchbanglinux.org> ServerAdmin webmaster@localhost ServerName fr-pa-0.mirror.crunchbanglinux.org DocumentRoot /srv/crunchbang-mirror <Directory /> Options FollowSymLinks AllowOverride None </Directory> <Directory /srv/crunchbang-mirror> Options +Indexes -Includes IndexOptions NameWidth=* SuppressDescription IndexIgnore index.xhtml DirectoryIndex None AllowOverride None Order allow,deny allow from all </Directory> 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 </VirtualHost>
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!
If at any point you wish to disable your mirror, you can do so by creating a file named ”.disable” within your mirror directory:
Your mirror should be disabled within an hour.
That's it! In a matter of time you shall start to receive hits as the automatic download mirror selector does it's magic.