#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2010
    Posts
    162
    Rep Power
    62

    Rolling your own distro - possible to include configs?


    Evening guys,
    I'm going to be rolling a custom distro for my web servers pretty soon. It's sort of a pain to go through and pick all the packages, and then configure them. Fortunately, I know it's relatively easy to have the packages already installed, but what about configuration files that exist in etc? Or extra files in general (maybe a few cron scripts, an updated crontab, a few webapps for tomcat)?

    Not all configs would port over easily, but some of the mindless things, like my apache vhosts, php.ini, etc are all alike between the web servers. Any ideas other than an exhaustive shell script?
  2. #2
  3. Providing fuel for space ships
    Devshed Supreme Being (6500+ posts)

    Join Date
    Mar 2004
    Location
    nr Edinburgh, Scotland
    Posts
    14,382
    Rep Power
    3848
    Would it not be easier to do a fresh install for your web server, install all the packages that you need, edit the config files etc., and then just do a simple 'dd' command and clone the drive ?

    That way you can deploy the image onto your new servers and they would be exact clones of your original web server.

    I do have notes written up on this for doing something very similar - I'll dig them out and write something up for you, won't be tonight tho!
    The No Ma'am commandments:

    1.) It is O.K. to call hooters 'knockers' and sometimes snack trays
    2.) It is wrong to be French
    3.) It is O.K. to put all bad people in a giant meat grinder
    4.) Lawyers, see rule 3
    5.) It is O.K. to drive a gas guzzler if it helps you get babes
    6.) Everyone should car pool but me
    7.) Bring back the word 'stewardesses'
    8.) Synchronized swimming is not a sport
    9.) Mud wrestling is a sport
  4. #3
  5. No Profile Picture
    Stumpier old Moderator
    Devshed Supreme Being (6500+ posts)

    Join Date
    Jun 2003
    Posts
    14,409
    Rep Power
    4538
    I also got a linux server set up the way I wanted, but I started it in a kvm/qemu virtual machine, then instead of dd, I used the kvm tools to clone the vm. There were only a few things like hostname to fix in the clone copy and in just a few minutes a 2nd configured server was on the air.

    One more plus, the kvm cloning tools can give the clone disk a different UUID which is helpful. dd will give you a 2nd disk with an identical UUID (if you dd the entire drive and not just a partition).

    Comments on this post

    • aitken325i agrees : Even simpler solution
    ======
    Doug G
    ======
    It is a truism of American politics that no man who can win an election deserves to. --Trevanian, from the novel Shibumi

IMN logo majestic logo threadwatch logo seochat tools logo