October 30th, 2012, 10:58 PM
Rolling your own distro - possible to include configs?
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?
November 3rd, 2012, 04:09 PM
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
November 3rd, 2012, 09:50 PM
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
It is a truism of American politics that no man who can win an election deserves to. --Trevanian, from the novel Shibumi