Home arrow Perl Programming arrow Page 5 - Cultured Perl: Managing Linux Configuration Files

Conclusion - Perl

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).

TABLE OF CONTENTS:
  1. Cultured Perl: Managing Linux Configuration Files
  2. Setting up CVS
  3. Automatic updates and commits
  4. Organizing your new configuration
  5. Conclusion
By: developerWorks
Rating: starstarstarstarstar / 6
November 24, 2004

print this article
SEARCH DEV SHED

TOOLS YOU CAN USE

advertisement

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.

Resources

Download the maintain.pl script and the maintain.conf configuration file used in this article.

Read all of Ted's Perl articles in the Cultured Perl columns on developerWorks.

CVS home contains many CVS-related links. Free software versioning systems include Subversion and GNU arch (also known as GNU tla). Commercial offerings include Rational ClearCase.

Essential CVS (O'Reilly & Associates, 2003) by Jennifer Vesperman is a good CVS overview, and CVS Pocket Reference, 2nd edition (O'Reilly & Associates, 2003) by Gregor Purdy is an excellent quick reference to CVS -- I highly recommend it.

Open Source Development with CVS, 3rd Edition (Paraglyph Press, 2003) by Karl Fogel and Moshe Bar is a freely available online book; you can also purchase a copy at the bookstore.

Version Control with Subversion (O'Reilly & Associates, 2004) is an interesting read.

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.

Find more resources for Linux developers in the developerWorks Linux zone.

Purchase Linux books at discounted prices in the Linux section of the Developer Bookstore.

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.

IBM developerWorksVisit developerWorks for thousands of developer articles, tutorials, and resources related to open standard technologies, IBM products, and more. See developerWorks.



 
 
>>> More Perl Programming Articles          >>> More By developerWorks
 

blog comments powered by Disqus
escort Bursa Bursa escort Antalya eskort
   

PERL PROGRAMMING ARTICLES

- Perl Turns 25
- Lists and Arguments in Perl
- Variables and Arguments in Perl
- Understanding Scope and Packages in Perl
- Arguments and Return Values in Perl
- Invoking Perl Subroutines and Functions
- Subroutines and Functions in Perl
- Perl Basics: Writing and Debugging Programs
- Structure and Statements in Perl
- First Steps in Perl
- Completing Regular Expression Basics
- Modifiers, Boundaries, and Regular Expressio...
- Quantifiers and Other Regular Expression Bas...
- Parsing and Regular Expression Basics
- Hash Functions

Developer Shed Affiliates

 


Dev Shed Tutorial Topics: