Mai 092011
 

demarrer le serveur en mode rescue/live-CD ou autre medium de ce genre

dans /usr/lib/debootstrap s’assurer que le le script squeeze existe (au besoin faire pointer sur lenny) c’est la liste des paquets de base et elle est simillaire par contre le nom du script determine ensuite le nom de version

cd /root
cfdisk /dev/sda
mke2fs -j /dev/sda1
mkswap /dev/sda2
pvcreate /dev/sda3
vgcreate vg0 /dev/sda3
lvcreate vg0 --name=srv -L120G
mke2fs -j /dev/vg0/srv
mount /dev/sda1 /mnt
debootstrap --arch=amd64 squeeze /mnt
mount --bind /dev/ /mnt/dev
mount --bind /proc /mnt/proc
chroot /mnt
apt-get remove --purge vim-tiny --assume-yes --force-yes
apt-get update
apt-get install vim --assume-yes --force-yes
sed -i 's/^# alias/alias/ ; s/^# export/export/ ; s/^# eval/eval/' /root/.bashrc
sed -i 's/^.*syntax on/syntax on/' /etc/vim/vimrc
exit
chroot /mnt
apt-get install htop gcc g++ make binutils htop tree iftop pipebench --assume-yes --force-yes
apt-get install makedev --assume-yes --force-yes
exit
umount /mnt/dev
chroot /mnt
cd /dev
rm -Rf .udev
MAKEDEV generic std
cd /root
apt-get install linux-image-2.6.32-5-amd64 grub2 --assume-yes --force-yes
mount /sys
grub-install /dev/sda --force
update-grub
apt-get install dialog lvm2 whiptail freebsd-manpages manpages-fr manpages-fr-dev aespipe cowsay rsync locales --assume-yes --force-yes
(
echo "# /etc/fstab: static file system information."
echo "#"
echo "# "
echo "proc /proc proc defaults 0 0"
echo "/dev/sda1 / ext3 errors=remount-ro 0 1"
echo "/dev/sda2 none swap sw 0 0"
echo "/dev/vg0/srv /srv ext3 noatime,nodiratime 0 0"
) >/etc/fstab
(
NET="IPa.IPb.IPc"
echo "# Used by ifup(8) and ifdown(8). See the interfaces(5) manpage or"
echo "# /usr/share/doc/ifupdown/examples for more information."
echo
echo
echo "auto lo"
echo "iface lo inet loopback"
echo
echo "auto eth0"
echo "iface eth0 inet static"
echo " address $NET.222"
echo " netmask 255.255.255.0"
echo " network $NET.0"
echo " broadcast $NET.255"
echo " gateway $NET.1"
echo
echo
) >/etc/network/interfaces
apt-get install openssh-server
passwd
exit
[ DESACTIVER LE MODE RESCUE]
reboot

Sorry, the comment form is closed at this time.