Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
s uT A R C H = x 8 6 _ 6 4 w g e tf t p : / / m i r r o r s . k e r n e l . o r g / c e n t o s / 5 . 5 / o s / $ { T A R C H } / C e n t O S / c e n t o s r e l e a s e 5 5 . w g e tf t p : / / m i r r o r s . k e r n e l . o r g / c e n t o s / 5 . 5 / o s / $ { T A R C H } / C e n t O S / c e n t o s r e l e a s e n o t e Next, lets create a work directory to do this under. I have lots of space in my home directory, so Im going to use that: W K D I R = / h o m e / j j u l i a n / c e n t o s _ i m a g e m k d i rp$ { W K D I R } / i m a g e c d$ { W K D I R } Were going to use yum to do our install, so were going to create a custom yum config:
edwyseguru.wordpress.com/2010/10/07/very-minimal-centos-image-howto/
1/3
9/6/13
c a t> y u m . c o n f< < E O F [ m a i n ] c a c h e d i r = / v a r / c a c h e / y u m / $ { T A R C H } / 5 k e e p c a c h e = 0 d e b u g l e v e l = 2 l o g f i l e = $ { W K D I R } / y u m . l o g e x a c t a r c h = 1 o b s o l e t e s = 1 g p g c h e c k = 0 p l u g i n s = 1 i n s t a l l o n l y _ l i m i t = 3 r e p o d i r = $ { W K D I R } / i m a g e / e t c / y u m . r e p o s . d i n s t a l l r o o t = $ { W K D I R } / i m a g e E O F We initialize the rpm database and install the centos-release rpms: r p mr$ { W K D I R } / i m a g ei n i t d b r p mi v hn o d e p sr$ { W K D I R } / i m a g ec e n t o s r e l e a s e * r p m Now we just install the yum and rpm using yum: y u mcy u m . c o n fn o g p g c h e c ki n s t a l lr p my u m Im sure theres some way to leave gpgcheck enabled, but I havent looked for it. If someone wants to figure that out and let me know, Ill update my article. Since we created the rpm database using our parent OS, it may not be using the correct db version, so lets recreate it using the tools we just installed. Were going to reinstall using these tools, so well need the rpms we downloaded earlier as well. c pc e n t o s r e l e a s e * r p m$ { W K D I R } / i m a g e / r o o t c p/ e t c / r e s o l v . c o n f$ { W K D I R } / i m a g e / e t c / m o u n ttp r o cn o n e$ { W K D I R } / i m a g e / p r o c c h r o o t$ { W K D I R } / i m a g e r mr f/ v a r / l i b / r p m / * r p mi n i t d b r p mi v hn o d e p s~ / c e n t o s r e l e a s e * r p m y u myg r o u p i n s t a l lB a s e y u mc l e a na l l So now we have a fairly minimalist centos tree (397 packages) weighing in at about 820 Mb. You can install other packages now, set up some initial configurations, etc.
edwyseguru.wordpress.com/2010/10/07/very-minimal-centos-image-howto/
You could have an even slimmer install if you wanted to be more selective. I find the Base group to be 2/3
9/6/13
You could have an even slimmer install if you wanted to be more selective. I find the Base group to be sufficiently slim for most cases. If youre using pxe for nfs rooted VMs, then your image is done. Move the image where you want it, export it and see the next article about nfs rooted vms. If you need a bootable grub image for a stand-alone vm, ask me and if I get enough requests Ill write about how to do that too.
About these ads Cherry Crosses the Pond http://nib.ly/d1bqF Copied To Clipboard
Cherry Crosses the Pond http://bit.ly/12LLaBy Paste Into Newsfeed (ctrl + v) Log Into Facebook Cancel Feedback http://bit.ly/12LLaBy ~ by edwyseguru on October 7, 2010. Posted in Howtos
edwyseguru.wordpress.com/2010/10/07/very-minimal-centos-image-howto/
3/3