Create an Aggregate Blog using Planet on Debian 5 (Lenny)
Updated by Linode
This guide has been deprecated and is no longer being maintained.
The Planet Feed Aggregator takes a collection of RSS feeds and generates what its founders call a “River of News” feed that combines posts from all sources into a single coherent stream. Thus, this software is useful for providing a simple and consolidated overview of ongoing output from selected blogs. Written and configured in Python and run regularly using cron, Planet is easy to configure and use.
Before beginning to follow this guide, we assume that you have completed the getting started guide. If you’re new to Linux server administration, you may be interested in our introduction to Linux concepts guide, beginner’s guide and administration basics guide. Beyond this, Planet requires a web server to provide access to the resources it creates, but this document does not depend on specific web server software software.
Before we begin the installation of the Planet software, perform the following commands to make sure the system’s package repository is up to date and all of the latest packages have been installed:
apt-get update apt-get upgrade
Install the Planet software by issuing the following command:
apt-get install planet
This will install the Apache HTTP server as a dependency. Congratulations, we can now begin the configuration of Planet.
Basic Planet Configuration
For the purposes of example, this document assumes that your web server is configured to use
/srv/www/example.com/public_html as the public document root for the domain
Copy the default configuration file to the
cp /etc/planet.conf /srv/www/example.com
Now edit the file, making sure to modify the following values to conform to the needs of your deployment. Consider the following example:
1 2 3 4 5 6 7 8 9 10 11 12 13
name=example link=http://example.com owner_name=username <email@example.com> cache_dir = /srv/www/example.com/planet_cache output_dir = /srv/www/example.com/public_html items_perpage = 40 days_per_page = 0 template_files = /srv/www/example.com/planet_templates/index.html.tmpl /srv/www/example.com/planet_templates/atom.xml.tmpl /srv/www/example.com/planet_templates/rss20.xml.tmpl /srv/www/example.com/planet_templates/rss10.xml.tmpl /srv/www/example.com/planet_templates/opml.xml.tmpl /srv/www/example.com/planet_templates/foafroll.xml.tmpl [/srv/www/example.com/planet_templates/rss10.xml.tmpl] items_per_page = 30
These settings establish the name and some background information regarding the site. The
output_dir determines where Planet will build the site, and should point to a publicly accessible directory equivalent to or beneath the “document root” of your web server. The
days_per_page limit the number of posts displayed on all Planet-generated pages.
items_per_page trims the number of posts included in the feed to not surpass the threshold set.
days_per_page sets a hard limit for the number of days of oldest possible post that can be displayed.
The remaining settings control the behavior and use of templates. Issue the following commands to copy the default templates and other support files into a site specific configuration:
1 2 3 4 5
mkdir -p /srv/www/example.com/planet_cache/ mkdir -p /srv/www/example.com/planet_templates/ cp /var/lib/planet/templates/* /srv/www/example.com/planet_templates/ cp -R /var/lib/planet/www/images/ /srv/www/example.com/public_html/ cp /usr/share/doc/planet/examples/planet.* /srv/www/example.com/public_html/
If you want to override any of the default values like the encoding or the value of
items_per_page as seen above, simply create an item block beginning with the full path to the template and specify the values beneath. If you need planet to generate an additional template, simply add the full path to the template to the end of the
At the end of your
planet.conf file, add entries that resemble the following for each feed that you would like to collect in the Planet you’re building
[<https://www.linode.com/docs/rss>] name = Linode
If you want to take advantage of Planet’s support for per-feed “faces” or avatars to identify each feed with a distinct logo or image, consider the following examples:
1 2 3
[DEFAULT] facewidth = 64 faceheight = 64 [<https://www.linode.com/docs/rss>] name = Linode face = lin-lib-avatar.png
You can specify default “width” and “height” in the
[DEFAULT] stanza, but these values can be overridden for feed-specific settings. All “faces” should be stored in an
images/ directory beneath the output directory. In the case of this example, deposit images into
Once you have completed your modifications to
planet.conf run Planet for the first time by issuing the following command:
The Planet software will only poll the source feeds when the above command is used. Otherwise, all files generated by Planet are static. By maintaining multiple
planet.conf files and specifying distinct output directories, it’s possible to generate multiple Planet-based websites on a single server.
While you can run Planet without incident using the above method, we recommend running planet regularly using a “cronjob.” Edit your crontab file with the following command:
Insert the following job into the crontab:
*/10* * * * planetplanet /srv/www/example.com/planet.conf
Save the crontab. Your Planet generated site will refresh every 10 minutes. Congratulations!
You may wish to consult the following resources for additional information on this topic. While these are provided in the hope that they will be useful, please note that we cannot vouch for the accuracy or timeliness of externally hosted materials.
This guide is published under a CC BY-ND 4.0 license.