CVS backs up, distributes, and simplifies your configuration files. In this article, Teodor Zlatanov discusses how to save time, energy and frustration when working with Linux configuration files by using your CVS tree. (This introductory-level article was first published by IBM developerWorks, June 10, 2004, at http://www.ibm.com/developerWorks).
I hope you found this article interesting and useful. Take what you can from it -- I've spent years perfecting my setup, and it should serve you in good stead.
Convert to this scheme a little at a time, don't get overwhelmed. You can easily spend days rewriting your configurations -- so do it gradually and you'll enjoy the process.
The greatest benefit you'll see is the automatic update function. On any of your machines, you can commit a file and it will show up everywhere else the next time maintain.pl is run! Even if you disagree with the directory structure, think about the power of the automatic updates and how they can be useful to you.
The second benefit you get is configuration archiving. Every version of your configurations will be in the revision control system! If you make a mistake, you can go back to an earlier version. If you lose a whole machine to, say, disk failure -- you can recover all the time-consuming configuration files you wrote for it in minutes.
Don't be tempted to convert everything to this scheme. Convert just the things you want to keep or reuse. Binary files don't work well with CVS -- at the very least, you won't have the diff capability that CVS provides for text files. Also, CVS has trouble with renaming directories, although it's certainly possible if you also rename the directory in the repository.
Finally, keep good backups of your CVSROOT repository, wherever it is. I hope you never need them.
dotfiles.com is an excellent resource for learning about configuring the C shell, bash, Emacs, and many, many other Linux and UNIX programs. It's highly recommended; just don't blame us when you spend your whole weekend browsing the site.
OpenSSH is a standard, free, and very good implementation of the SSH protocol. CVS Pserver is good for allowing anonymous CVS access, but it is insecure.
OpenSSH non-interactive logins with the help of an ssh-agent are explained in OpenSSH key management (developerWorks, July 2001), a three-part series by Daniel Robbins.
AppConfig is a CPAN module for parsing command-line options and configuration files. In Cultured Perl: Application configuration with Perl (developerWorks, October 2000), Ted demonstrates how the AppConfig module can handle local configuration storage for Perl programs, and how such configurations can be stored in a database that can then be accessed from any machine on the network.
You may also want to read Understanding Linux configuration files (developerWorks, December 2001), which explains those configuration files on a Linux system that control user permissions, system applications, daemons, services, and other administrative tasks.
Meanwhile, Debugging configure (developerWorks, December 2003) discusses what to do when good config files go bad, and an automatic configuration script doesn't work. Tips for users as well as for developers help you to keep failures to a minimum.
Develop and test your Linux applications using the latest IBM tools and middleware with a developerWorks Subscription: you get IBM software from WebSphere®, DB2®, Lotus®, Rational®, and Tivoli®, and a license to use the software for 12 months, all for less money than you might think.
Download no-charge trial versions of selected developerWorks Subscription products that run on Linux, including WebSphere Studio Site Developer, WebSphere SDK for Web services, WebSphere Application Server, DB2 Universal Database Personal Developers Edition, Tivoli Access Manager, and Lotus Domino Server, from the Speed-start your Linux app section of developerWorks. For an even speedier start, help yourself to a product-by-product collection of how-to articles and tech support.
Visit developerWorks for thousands of developer articles, tutorials, and resources related to open standard technologies, IBM products, and more. See developerWorks.