PodcastMirroring

Differences between revisions 5 and 6
Revision 5 as of 2009-02-07 20:12:08
Size: 4273
Editor: home
Comment:
Revision 6 as of 2009-02-07 20:21:34
Size: 4273
Editor: home
Comment:
Deletions are marked like this. Additions are marked like this.
Line 118: Line 118:
sudo /etc/init.d/apache2 reload sudo invoke-rc.d apache2 reload

Thinking of offering a slice of your bandwidth to help spread the podcast? This page is just for you! It describes the steps needed to set up and register a mirror of the Ubuntu-UK podcast.

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 MP3s, and Ogg files shall be stored. This could be /srv/uupc-mirror/, for example.

Account set up

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

Tip: Should you wish to automate this process, the setup-uupc-mirror.sh script is available.

First, we require root privileges to create the account:

sudo -i

Now create a group for the podcast user:

groupadd uupc

Create the user with the appropriate flags:

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

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

mkdir -p /home/uupc/.ssh

Download and place the SSH key in the created directory:

wget http://podcast.ubuntu-uk.org/~daviey/authorized_keys \
    -O /home/uupc/.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 uupc user owns the new files in their home directory:

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

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

vim ~uupc/.ssh/authorized_keys

And exit the root session:

exit

DNS configuration

Next, we have to contact DaveWalker (DNS master), 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.static.podcast.ubuntu-uk.org 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/uupc-mirror and enter the following configuration:

NameVirtualHost fr-pa-0.static.podcast.ubuntu-uk.org
<VirtualHost fr-pa-0.static.podcast.ubuntu-uk.org>
        ServerAdmin webmaster@localhost
        ServerName fr-pa-0.static.podcast.ubuntu-uk.org
        
        DocumentRoot /srv/uupc-mirror
        <Directory />
                Options FollowSymLinks
                AllowOverride None
        </Directory>
        <Directory /srv/uupc-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/uupc-mirror-access.log combined
        ErrorLog /var/log/apache2/uupc-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 uupc-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 "uupc" directory there!

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.

UKTeam/PodcastMirroring (last edited 2011-07-13 20:40:26 by popey)