Ubuntu auf Rootserver

Apache, Lighttpd, nginx, Cherokee
Post Reply
jenser
Posts: 9
Joined: 2006-07-20 21:01
 

Ubuntu auf Rootserver

Post by jenser »

Hallo Zusammen,

ich möchte auf meinem Rootserver "Ubuntu 6.06 Server" installieren.
Mit CD-Laufwerk wäre es ziemlich simpel, aber wie geht es ohne??
Ich kann ein Rettungssystem booten und mich über die serielle Konsole einloggen. Soviel weiss ich.

Für Tipps wäre ich sehr dankbar.
Ich schreibe auch alle Schritt schön auf, denn es ich werde bestimmt nicht der letzte sein, der das probiert. :wink:

Grüße,
Jens
Roger Wilco
Posts: 5923
Joined: 2004-05-23 12:53
 

Re: Ubuntu auf Rootserver

Post by Roger Wilco »

Du kannst mit debootstrap und den richtigen Repositories (Hint!) aus einem beliebigen Linuxsystem heraus dein Ubuntu installieren...
jenser
Posts: 9
Joined: 2006-07-20 21:01
 

Re: Ubuntu auf Rootserver

Post by jenser »

Hört sich schonmal gut an, danke!
Kann ich eine bestehende ext3-Partition unter Suse 9.0 verkleinern?
Oder kann ich debootstrap auf der bestehenden Partition installieren?
Ich möchte natürlich den ganzen Suse-Krams runter haben.

Code: Select all

df -hT

Filesystem    Type    Size  Used Avail Use% Mounted on
/dev/hda3     ext3     56G  5.8G   50G  11% /
/dev/hda1     ext3     54M  9.4M   44M  18% /boot
tmpfs        tmpfs    252M     0  252M   0% /dev/shm
Roger Wilco
Posts: 5923
Joined: 2004-05-23 12:53
 

Re: Ubuntu auf Rootserver

Post by Roger Wilco »

Warum partitionierst du die Festplatte nicht einfach nach deinen Vorstellungen und installierst Ubuntu aus dem Rescuesystem?
flo
Posts: 2223
Joined: 2002-07-28 13:02
Location: Berlin
 

Re: Ubuntu auf Rootserver

Post by flo »

jenser wrote:Kann ich eine bestehende ext3-Partition unter Suse 9.0 verkleinern?
Oder kann ich debootstrap auf der bestehenden Partition installieren?

Code: Select all

man rettungssystem
:-)

Im Ernst, mit Hilfe des Rettungssystems sollte das kein großes Problem und bis auf die Ubuntu-Eigenheiten (Apt-Server usw.) der Standard-Debian-Installation für Rootserver entsprechen.

Bzgl. des Kernels wäre evtl. noch ein optimierter angebracht, aaber mit dem Ubuntu-Kernel wird der Root wohl auch booten.

flo.
jenser
Posts: 9
Joined: 2006-07-20 21:01
 

Help...

Post by jenser »

UPDATE!

Wer Ubuntu auf einem "alten" 32-Bit System bei Strato installieren möchte, kann hierfür folgenden Weg gehen:

Im Konfigurationsmenü bei Strato auf das Rettungsystem umstellen.

Nun im Rettungsystem einloggen und los geht's!

Festplatte neu partitioniert:

Code: Select all

cfdisk

Name   Flags  Part Type  FS Type          [Label]   Size (MB)
-------------------------------------------------------------
hda1   Boot    Primary   Linux                       60003.42  (Type 83)
hda5           Logical   Linux swap / Solaris         1488.78  (Type 82)
Dateisystem erstellt

Code: Select all

mke2fs -j /dev/hda1
mkswap /dev/hda5
sync; sync; sync
swapon /dev/hda5

mkdir /mnt/ubuntu
mount /dev/hda1 /mnt/ubuntu
mkdir /mnt/ubuntu/work
Da bei Strato im Rettungssystem kein 'ar' installiert ist, muss dies zuerst auf einem anderen System zusammen gestellen und installieren werden. (Ich habe die Dateien zum DL auf meinen Server gepackt!)

Code: Select all

cd /

wget http://jm.rheingau-media.com/downloads/files.tar
tar -xvf files.tar && rm files.tar

cd /mnt/ubuntu/work

wget http://mirror.isp.net.au/ftp/pub/ubuntu/pool/main/d/debootstrap/debootstrap-udeb_0.3.3.0ubuntu2_i386.udeb
ar -x debootstrap-udeb_0.3.3.0ubuntu2_i386.udeb
cd /
zcat /mnt/ubuntu/work/data.tar.gz | tar xv

/usr/sbin/debootstrap --arch i386 dapper /mnt/ubuntu http://archive.ubuntu.com/ubuntu
In die neue Umgebung wechseln

Code: Select all

LANG= chroot /mnt/ubuntu /bin/bash
/etc/fstab ändern

Code: Select all

# /etc/fstab: static file system information.
#
# file system    mount point   type    options                  dump pass
/dev/hda1        /             ext3    defaults                 0    1

/dev/hda5        none          swap    sw                       0    0
proc             /proc         proc    defaults                 0    0
sys              /sys          sysfs   defaults                 0    0

Code: Select all

mount -a
mount -t proc proc /proc

echo meinTollerServerName > /etc/hostname
echo "127.0.0.1 localhost" > /etc/hosts
/etc/apt/sources.list anpassen

Code: Select all

deb http://de.archive.ubuntu.com/ubuntu/ dapper main restricted
deb-src http://de.archive.ubuntu.com/ubuntu/ dapper main restricted

## Major bug fix updates produced after the final release of the
## distribution.
deb http://de.archive.ubuntu.com/ubuntu/ dapper-updates main restricted
deb-src http://de.archive.ubuntu.com/ubuntu/ dapper-updates main restricted

## Uncomment the following two lines to add software from the 'universe'
## repository.
## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team, and may not be under a free licence. Please satisfy yourself as to
## your rights to use the software. Also, please note that software in
## universe WILL NOT receive any review or updates from the Ubuntu security
## team.
deb http://de.archive.ubuntu.com/ubuntu/ dapper universe multiverse
deb-src http://de.archive.ubuntu.com/ubuntu/ dapper universe multiverse

## Uncomment the following two lines to add software from the 'backports'
## repository.
## N.B. software from this repository may not have been tested as
## extensively as that contained in the main release, although it includes
## newer versions of some applications which may provide useful features.
## Also, please note that software in backports WILL NOT receive any review
## or updates from the Ubuntu security team.
deb http://de.archive.ubuntu.com/ubuntu/ dapper-backports main restricted universe multiverse
deb-src http://de.archive.ubuntu.com/ubuntu/ dapper-backports main restricted universe multiverse


deb http://security.ubuntu.com/ubuntu dapper-security main restricted
deb-src http://security.ubuntu.com/ubuntu dapper-security main restricted
deb http://security.ubuntu.com/ubuntu dapper-security universe
deb-src http://security.ubuntu.com/ubuntu dapper-security universe

Code: Select all

apt-get update
apt-get install dhcpcd ssh grub
Root-Password setzen

Code: Select all

passwd
/etc/network/interfaces anpassen

Code: Select all

auto lo
iface lo inet loopback
auto eth0
iface eth0 inet static
        address 81.169.xxx.xx
        netmask 255.255.0.0
        network 81.169.0.0
        broadcast 81.169.255.255
        gateway 81.169.xxx.1
Serielle Console konfigurieren

Code: Select all

echo "S0:12345:respawn:/sbin/getty -L ttyS0 57600 vt102" >> /etc/inittab
echo "ttyS0" >> /etc/securetty
Grub konfigurieren

Code: Select all

mkdir /boot/grub
vi /boot/grub/menu.lst

Code: Select all

default         0
timeout         3
hiddenmenu

title           Ubuntu, kernel 2.6.15-23-server
root            (hd0,0)
kernel          /boot/vmlinuz-2.6.15-23-server root=/dev/hda1 ro quiet splash console=tty0 console=ttyS0,57600
initrd          /boot/initrd.img-2.6.15-23-server
savedefault
boot

title           Ubuntu, kernel 2.6.15-23-server (recovery mode)
root            (hd0,0)
kernel          /boot/vmlinuz-2.6.15-23-server root=/dev/hda1 ro single console=tty0 console=ttyS0,57600
initrd          /boot/initrd.img-2.6.15-23-server
boot

title           Ubuntu, memtest86+
root            (hd0,0)
kernel          /boot/memtest86+.bin console=tty0 console=ttyS0,57600
Kernel + Grub installieren

Code: Select all

apt-get install initrd-tools
apt-get install linux-image-2.6.15-23-server

cp /proc/mounts /etc/mtab
grub-install /dev/hda
/etc/kernel-img.conf anpassen

Code: Select all

do_symlinks = yes
relative_links = yes
do_bootloader = no
do_bootfloppy = no
do_initrd = yes
link_in_boot = no
postinst_hook = /sbin/update-grub
postrm_hook   = /sbin/update-grub
Optional: LOCALE auf Deutsch umstellen

Code: Select all

apt-get install localeconf
/var/lib/locales/supported.d/de ändern

Code: Select all

de_DE@euro ISO-8859-15

Code: Select all

dpkg-reconfigure locales
dpkg-reconfigure localeconf
Im Strato-Menü wieder den normalen Boot einstellen und neu starten

Code: Select all

exit
reboot -n
That's all. ;-)

Die aktuelleste Version dieser Anleitung findet sich in meinem Wiki unter http://javawiki.rheingau-media.com/wiki ... auf_Strato
Last edited by jenser on 2006-07-26 15:53, edited 2 times in total.
jenser
Posts: 9
Joined: 2006-07-20 21:01
 

Re: Ubuntu auf Rootserver

Post by jenser »

Habe den Fehler gefunden. Jetzt bootet der Rechner wieder.
Juhi.
dnspyder
Posts: 111
Joined: 2006-03-10 07:13
Location: Dortmund
 

Re: Ubuntu auf Rootserver

Post by dnspyder »

Im Sinne der Unterstützung Anderer wäre es vielleicht ganz sinnvoll deine Lösung hier zu präsentieren...
jenser
Posts: 9
Joined: 2006-07-20 21:01
 

Re: Ubuntu auf Rootserver

Post by jenser »

Kommt noch... ich muss erst mein Howto anpassen.
mattiass
Userprojekt
Userprojekt
Posts: 608
Joined: 2005-12-16 17:57
 

Re: Ubuntu auf Rootserver

Post by mattiass »

Nur slightly OT: Ich habe zum Thema gerade eine Step-by-Step-Anleitung erstellt:

http://blog.rootserverexperiment.de/200 ... ootserver/

Unterschiede zu Deiner Vorgehensweise:

* Ich bereite zuhause vor, so bekommt man auch ein 64Bit-System via 32Bit-Rettungssystem auf den Rootserver.

* Ich verwende Extlinux als Bootloader. Grub funktionierte in meinem Rettungssystem nicht.
jenser
Posts: 9
Joined: 2006-07-20 21:01
 

Re: Ubuntu auf Rootserver

Post by jenser »

Damit hättest Du ruhig mal etwas früher kommen können. :-D

Ich habe die oben aufgeführte Anleitung angepasst.
Woher weiss ich, ob ich ein 32 oder 64-Bit System habe??
Mir kommt die Kiste schon etwas langsam vor...
mattiass
Userprojekt
Userprojekt
Posts: 608
Joined: 2005-12-16 17:57
 

Re: Ubuntu auf Rootserver

Post by mattiass »

jenser wrote:Damit hättest Du ruhig mal etwas früher kommen können. :-D
Sorry, war in der Pipeline, aber eben noch nicht fertig. Solche Überschneidungen sind immer unglücklich...
Ich habe die oben aufgeführte Anleitung angepasst.
Woher weiss ich, ob ich ein 32 oder 64-Bit System habe??
Mir kommt die Kiste schon etwas langsam vor...
Bei mir liefert

Code: Select all

cat /proc/cpuinfo
dass ich eine 64Bit-CPU habe. Normalerweise steht das im Vertrag. Hier handelt es sich um einen Presse-Rootserver, den ich einfach "zugeteilt" bekommen habe. Der hatte ein 32Bit-Suse drauf. Welches System "ab Werk" drauf ist, sagt

Code: Select all

uname -a
Da steht dann "i586", "i686", "x86_64" o.ä., gleiches natürlich beim Rettungssystem.

PS: Kann mal einer ein Eigner eines offiziellen 64Bit-Strato-Servers (mit serienmäßigem 64Bit-OS) mal schnell (:lol:) das Rettungssystem booten und mit "uname -a" nachsehen, ob dieses einen 64Bit-Kernel hat?

Beim Hetzner-Rootserver bin ich noch zugange. Der nette Admin hat mich vorher angerufen, als er den Resetter repariert hatte (überstrapaziert? :)), jetzt kann es mit bootstrappen weitergehen.
jenser
Posts: 9
Joined: 2006-07-20 21:01
 

Re: Ubuntu auf Rootserver

Post by jenser »

MattiasS wrote: Sorry, war in der Pipeline, aber eben noch nicht fertig. Solche Überschneidungen sind immer unglücklich...
War nur Spass. Ich habe bei der Aktion viel gelernt und weiss nun mehr über meinen Server als je zuvor! Desweiteren kann ich nun in 11 Minuten einen Strato-Server auf Ubuntu umstellen. :wink:

Code: Select all

cat /proc/cpuinfo
processor       : 0
vendor_id       : GenuineIntel
cpu family      : 15
model           : 2
model name      : Intel(R) Celeron(R) CPU 2.40GHz
stepping        : 9
cpu MHz         : 2399.864
cache size      : 128 KB
fdiv_bug        : no
hlt_bug         : no
f00f_bug        : no
coma_bug        : no
fpu             : yes
fpu_exception   : yes
cpuid level     : 2
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe cid xtpr
bogomips        : 4804.17
Sieht nicht nach [edit]64[/edit] Bit aus. :(

Naja. Es gibt doch bestimmt noch Möglichkeiten, den Kernel zu optimieren, oder? Hier hören meine Linux-Kenntnisse leider auf.
Last edited by jenser on 2006-07-26 16:41, edited 1 time in total.
mattiass
Userprojekt
Userprojekt
Posts: 608
Joined: 2005-12-16 17:57
 

Re: Ubuntu auf Rootserver

Post by mattiass »

jenser wrote:

Code: Select all

cat /proc/cpuinfo
processor       : 0
vendor_id       : GenuineIntel
cpu family      : 15
model           : 2
model name      : Intel(R) Celeron(R) CPU 2.40GHz
stepping        : 9
cpu MHz         : 2399.864
cache size      : 128 KB 
Bisserl wenig Cache, oder? 2,4GHz sind ja so schlecht nicht...
Sieht nicht nach 32 Bit aus. :(
Nicht nach 64 Bit, sagt jedenfalls der Smiley...
Naja. Es gibt doch bestimmt noch Möglichkeiten, den Kernel zu optimieren, oder? Hier hören meine Linux-Kenntnisse leider auf.
Naja, mit der Ubuntu-Installation hats Du schon Stufe fünf auf der endlosen Leiter zum Linux-Guru erklommen. Auf Stufe sieben steht dann die weitere Optimierung.

Ich arbeite übrigens noch dran, mich überhaupt an Linux auf Servern zu gewöhnen...
Post Reply