[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Serverneuinstallation eines 1und1 root-Servers mit Debian 3.1
[Thread Prev] | [Thread Next]
- Subject: Serverneuinstallation eines 1und1 root-Servers mit Debian 3.1
- From: Markus Hochholdinger <Markus@xxxxxxxxxxxxxxxxx>
- Date: Wed, 8 Jun 2005 01:33:40 +0200
- To: uugrn@xxxxxxxxxxxxxxx
Hi, da ich gerade einen 1und1 root-Server mit einem frischen Debian beglueckt habe, wollte ich euch meine Erkenntnisse nicht vorenthalten (vor allem die dhcp-Konfiguration kann einen leicht ins straucheln bringen): ACHTUNG!!!ACHTUNG!!!ACHTUNG!!!ACHTUNG!!!ACHTUNG!!!ACHTUNG!!!ACHTUNG!!! Diese Anleitung loescht alle Daten auf dem root-Server! Bitte vorher eine Sicherheitskopie machen! ACHTUNG!!!ACHTUNG!!!ACHTUNG!!!ACHTUNG!!!ACHTUNG!!!ACHTUNG!!!ACHTUNG!!! # 1und1 root server # Sie sind hier: # Meine Daten -> 1&1 Server -> Server-Verwaltung -> Recovery-Tool # Reset [X] # (*) Linux Rescue-System (debian/woody - 2.6.x) # Weiter # Konsolenserver sercon.pureserver.info # User XX # Passwort YY # # on the rescue system # rescue login: root Password: [..] rescue:~# cfdisk /dev/hda [..] Name Flags Part Type FS Type [Label] Size (MB) hda1 Primary Linux swap 2048.10 hda2 Primary Linux ext 77975.66 [..] rescue:~# mkswap /dev/hda1 Setting up swapspace version 1, size = 2048057 kB rescue:~# mkfs.ext3 /dev/hda2 mke2fs 1.35 (28-Feb-2004) Filesystem label= OS type: Linux Block size=4096 (log=2) Fragment size=4096 (log=2) 9519104 inodes, 19037025 blocks 951851 blocks (5.00%) reserved for the super user First data block=0 581 block groups 32768 blocks per group, 32768 fragments per group 16384 inodes per group Superblock backups stored on blocks: 32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208, 4096000, 7962624, 11239424 Writing inode tables: done Creating journal (8192 blocks): done Writing superblocks and filesystem accounting information: done This filesystem will be automatically checked every 38 mounts or 180 days, whichever comes first. Use tune2fs -c or -i to override. rescue:~# tune2fs -c 0 -i 0 /dev/hda2 tune2fs 1.35 (28-Feb-2004) Setting maximal mount count to -1 Setting interval between check 0 seconds rescue:~# mount /dev/hda2 /mnt/ kjournald starting. Commit interval 5 seconds EXT3 FS on hda2, internal journal EXT3-fs: mounted filesystem with ordered data mode. rescue:~# # # on a running Debian 3.1 system: # root@sarge:/var/tmp# mkdir sarge.debootstrap root@sarge:/var/tmp# debootstrap sarge sarge.debootstrap \ http://ftp.de.debian.org/debian [..] root@sarge:/var/tmp# cd sarge.debootstrap/ root@sarge:/var/tmp/sarge.debootstrap# tar -czf - * | ssh -l root \ pXXXXXXXX.pureserver.info "cd /mnt; tar -xvvzf -" [..] root@sarge:/var/tmp/sarge.debootstrap# # # on the rescue system # rescue:~# chroot /mnt/ rescue:/# base-config Configure timezone Set up users and passwords Set the hostname Configure and enable ppp Configure apt <Cancel> rescue:/# vi /etc/apt/sources.list deb http://ftp.de.debian.org/debian/ sarge main deb-src http://ftp.de.debian.org/debian/ sarge main deb http://security.debian.org/ sarge/updates main rescue:/# apt-get update [..] rescue:/# dselect 0. [A]ccess [..] 1. [U]pdate [..] 2. [S]elect [..] [purge nfs-common] [..] 3. [I]nstall [..] 4. [C]onfig [..] 5. [R]emove [..] 6. [Q]uit rescue:/# vi /etc/fstab # /etc/fstab: static file system information. # # <file system> <mount point> <type> <options> <dump> <pass> /dev/hda2 / ext3 defaults,acl,errors=remount-ro 0 1 proc /proc proc defaults 0 0 /dev/hda1 none swap sw 0 0 rescue:/# vi /etc/mtab proc /proc proc rw 0 0 /dev/hda2 / ext3 rw,acl,errors=remount-ro 0 0 rescue:/# mount /proc rescue:/# apt-get install cramfsprogs dash grub initrd-tools \ kernel-image-2.6-686 kernel-image-2.6.8-2-686 [..] Do you want to stop now? [Y/n]n [..] rescue:/# grub-install --no-floppy /dev/hda Probing devices to guess BIOS drives. This may take a long time. Installation finished. No error reported. This is the contents of the device map /boot/grub/device.map. Check if this is correct or not. If any of the lines is incorrect, fix it and re-run the script rub-install'. (hd0) /dev/hda rescue:/# update-grub Searching for GRUB installation directory ... found: /boot/grub . Testing for an existing GRUB menu.list file... Could not find /boot/grub/menu.lst file. Would you like /boot/grub/menu.lst generated for you? (y/N) y Searching for splash image... none found, skipping... Found kernel: /boot/vmlinuz-2.6.8-2-686 Updating /boot/grub/menu.lst ... done rescue:/# vi /boot/grub/menu.lst [..] serial --unit=0 --speed=57600 --word=8 --parity=no --stop=1 terminal serial [..] # kopt=root=/dev/hda2 ro console=ttyS0,57600 [..] rescue:/# update-grub Searching for GRUB installation directory ... found: /boot/grub . Testing for an existing GRUB menu.list file... found: /boot/grub/menu.lst . Searching for splash image... none found, skipping... Found kernel: /boot/vmlinuz-2.6.8-2-686 Updating /boot/grub/menu.lst ... done rescue:/# vi /etc/inittab [..] T0:23:respawn:/sbin/getty -L ttyS0 57600 vt100 [..] rescue:/# apt-get install discover discover-data libdiscover2 libexpat1 [..] rescue:/# vi /etc/network/interfaces # Used by ifup(8) and ifdown(8). See the interfaces(5) manpage or # /usr/share/doc/ifupdown/examples for more information. # The loopback network interface auto lo iface lo inet loopback # The primary network interface auto eth0 iface eth0 inet dhcp rescue:/# vi /etc/dhclient.conf [..] request subnet-mask, broadcast-address, time-offset, routers, static-routes, domain-name, domain-name-servers, host-name, netbios-name-servers, netbios-scope; [..] rescue:/# umount /proc rescue:/# exit rescue:~# cp /etc/dhcp3/dhclient-exit-hooks.d/local \ /mnt/etc/dhclient-exit-hooks rescue:~# cp /etc/hosts /mnt/etc/ rescue:/# umount /mnt/ # 1und1 root server # Sie sind hier: # Meine Daten -> 1&1 Server -> Server-Verwaltung -> Recovery-Tool # Reset [X] # (*) Normales System # Weiter done :-) login over ssh or Konsolenserver -- Gruss \|/ eMHa (o o) ------------------------------------------------------oOO--U--OOo-- Markus Hochholdinger e-mail mailto:Markus@xxxxxxxxxxxxxxxxx .oooO www http://www.hochholdinger.net ( ) Oooo. ------------------------------------------------------\ (----( )- \_) ) / (_/