اطلاعیه

Collapse
No announcement yet.

Verbose Gentoo Linux Installation

Collapse
X
 
  • Filter
  • زمان
  • Show
Clear All
new posts

  • Verbose Gentoo Linux Installation

    In this video I will install Gentoo from Minimal Installation CD. The steps described below is for making a Gentoo install on a server from stage3 with manual kernel compilation.

    Installation steps:

    1. Boot from the Gentoo Minimal Installation CD. You will be presented with a the prompt boot:. Boot with following options:

    gentoo-nofb acpi=off noapic nodhcp nofirewire nogpm nokeymap docache

    2. Recommended. To avoid some errors, you need to check your date/time and update it:

    date
    date MMDDhhmmYYYY
    date && hwclock
    hwclock --systohc
    3. Configure the network:

    ifconfig eth0 172.16.50.63/23
    route add default gw 172.16.50.200
    echo nameserver 172.16.50.105 > /etc/resolv.conf
    4. Check network:

    ifconfig
    route -n
    ping google.com
    5. Configure and run screen. We will need it in process of manual kernel configuration:

    wget sysadmin.md/stuff/.screenrc
    screen
    6. Partitioning the disk. I will use cfdisk:

    cfdisk
    sda1 - for /boot. Size 102 MB
    sda2 - for swap. Size 512 MB
    sda3 - for /. Size 8192 MB
    7. Make and activate swap filesystems:

    mkswap /dev/sda2 && swapon /dev/sda2
    free -m | grep Swap
    8. Create ext3 filesystems for /boot and / partitions:

    mke2fs -j /dev/sda1 && mke2fs -j /dev/sda3
    9. Mount /boot and /

    mount -t ext3 /dev/sda3 /mnt/gentoo
    mkdir /mnt/gentoo/boot
    mount -t ext3 /dev/sda1 /mnt/gentoo/boot
    10. Verify:

    mount | grep sda
    cd /mnt/gentoo
    11. Download the Stage and Portage tree tarballs. Go to one of Gentoo mirrors and download stage-3, portage tarballs and their DIGEST (or md5) files. Ex:

    links http://distfiles.gentoo.md
    12. Check tarballs integrity with md5sum:

    md5sum -c stage3*.tar.bz2.md5.DIGEST
    md5sum -c portage*.tar.bz2.md5sum.DIGEST
    13. Unpack the Stage and Portage tree tarballs:

    tar xvjpf stage3*.tar.bz2
    tar xvjf portage*.tar.bz2 -C /mnt/gentoo/usr
    14. Download a make.conf and package.use templates and edit them with vim (or nano):

    mv etc/make.conf etc/make.conf.old
    wget sysadmin.md/stuff/make.conf -O etc/make.conf
    mkdir etc/portage
    wget sysadmin.md/stuff/package.use -O etc/portage/package.use
    vi etc/make.conf
    15. Verify CHOST variable. This variable should be taken from make.conf.old and copied to make.conf template. Use screen to display make.conf.old file contents in another tab:

    cat /mnt/gentoo/etc/make.conf.old | grep CHOST
    16. Gather information about CPU and change CFLAGS and CXXFLAGS variables. You will need:
    vendor_id
    cpu family
    model
    model name

    less /proc/cpuinfo

    The safe flags can be found on http://gentoo-wiki.com/Safe_Cflags
    17. Change MAKEOPTS variable. A good choice is the number of CPUs in your system plus one. To obtain number of CPU’s use the following command:

    cat /proc/cpuinfo | grep ^processor | wc -l
    18. Change the variables and USE flags in make.conf template. If you don’t know the destination about specified USE flag, just comment it. A full de******ion on the available USE flags can be found on your system in /usr/portage/profiles/use.desc.
    After that, save make.conf.
    19. Also edit, if necessary, package.use template:

    vi etc/portage/package.use
    20. Mount proc and dev filesystems:

    mount -t proc none /mnt/gentoo/proc
    mount -o bind /dev /mnt/gentoo/dev
    21. Copy nameservers info:

    cp /etc/resolv.conf etc/
    22. Chroot in prepared environment:

    chroot /mnt/gentoo /bin/bash
    env-update && source /etc/profile
    23. Change timezone and set clock options:

    cp /usr/share/zoneinfo/Europe/Chisinau /etc/localtime
    nano -w /etc/conf.d/clock
    CLOCK="local"
    CLOCK_SYSTOHC="yes"
    24. Important! You should check again your date/time and update it:

    date
    date MMDDhhmmYYYY
    date && hwclock
    hwclock --systohc
    25. Update the Portage tree and portage itself:

    emerge --sync
    emerge -av portage
    dispatch-conf
    26. Install a kernel sources:

    emerge -av gentoo-sources
    27. Configure the kernel. You can use screen and tools such lspci/lsusb to gather the hardware information:

    cd /usr/src/linux
    make menuconfig
    lspci -v
    28. Compile the kernel and modules:

    make && make modules
    29. Install GRUB bootloader:

    cd
    emerge -av grub
    30. Install the kernel and modules:

    make install && make modules_install
    31. Configure GRUB bootloader:

    wget sysadmin.md/stuff/grub.conf -O /boot/grub/grub.conf
    nano /boot/grub/grub.conf
    32. Set up GRUB from grub shell:

    grub
    grub>find /boot/grub/stage1
    grub>root (hd0,0)
    grub>setup (hd0)
    grub>quit
    33. Create and edit /etc/fstab:

    wget sysadmin.md/stuff/fstab -O /etc/fstab
    nano /etc/fstab
    34. Network files configuration:

    echo HOSTNAME="gentoosrv" > /etc/conf.d/hostname
    nano /etc/hosts
    nano /etc/conf.d/net
    config_eth0=( "172.16.50.63/23" )
    routes_eth0=( "default gw 172.16.50.200")
    dns_domain="home.lan"
    rc-update add net.eth0 default
    35.
    36. Instal system logger and sheduler and add them to runlevel default:

    emerge -av syslog-ng vixie-cron
    rc-update add syslog-ng default
    rc-update add vixie-cron default
    37. Change root password:

    passwd
    38. Add a user:

    useradd -m -G users,wheel -s /bin/bash dima && passwd dima
    39. Add sshd to default runlevel:

    rc-update add sshd default
    40. Exit the chrooted environment, unmount all partitions and reboot:

    env-update && source /etc/profile
    exit
    cd
    umount /mnt/gentoo/boot /mnt/gentoo/dev /mnt/gentoo/proc /mnt/gentoo
    reboot
    41. Post install operations. Recompile entire world with new settings from make.conf (this may take a couple of hours):

    emerge -eav world
    dispatch-conf
    42. Cleanup:

    env-update && source /etc/profile
    emerge -a --depclean
    emerge -av gentoolkit
    revdep-rebuild
    env-update && source /etc/profile
    43. Install additional software:

    emerge -av sudo screen mc vim links logrotate ntp rcs htop
    44. Sync system time with a time server:

    ntpdate -bu pool.ntp.org
    hwclock --systohc
    find / | xargs touch


    لینک دانلود۱:http://rapidshare.com/files/15319566...stallation.avi
    لینک دانلود ۲:http://www.video4admin.com/video/gen...stallation.rar
    منبع:www.video4admin.com
Working...
X