如何安裝gentoo linux

來源:互聯網
上載者:User

   安裝gentoo linux步驟:

  1..刻盤。

  2.啟動,直接按斷行符號。

  進入系統dos介面,開始輸入命令...

  3.改變現有root使用者的密碼 passwd

  4.開啟sshd服務方便遠程安裝/etc/init.d/sshd start

  5.配置網路以便進行網路訪問 ifconfig eth0 192.168.1.20 broadcast 192.168.1.255 netmask 255.255.255.0

  6.添加網關 route add default gw 192.168.1.1

  7.進行網域名稱伺服器的配置 nano /etc/resolv.conf

  註:假如在虛擬機器裡安裝,設定虛擬機器連網方式為net,然後這裡設定連網自動擷取就行,輸入dhcpcd

  8.開始進行分區 fdisk /dev/hda,輸入p查看資訊,輸入d刪除資訊

  9.開始建立開機磁碟分割 輸入的命令為n,p,1,+128M

  10.開始建立linux的交換區,輸入的命令為n,p,2,+1024M,t,2,82

  11.建立根分區,輸入的命令為n,p,3

  12.開始將分區資訊寫入,輸入的命令為w

  13.格式檔案系統 mkfs.ext4 /dev/hda1;

  mkfs.ext4 /dev/hda3;

  14.開始格式化分區 mkswap /dev/hda2

  15.開始啟用分區 swapon /dev/hda2

  16.開始掛載檔案系統 mount /dev/hda3 /mnt/gentoo

  mkdir /mnt/gentoo/boot

  mount /dev/hda1 /mnt/gentoo/boot

  17.開始設定時間,以確保安裝正確 date MMDDhhmmYYYY;(Month, Day, hour, minute and Year); date 020316212013

  18.使用uname -m 來查看需要下載哪種類型的stage

  19.進入gentoo的掛載點 cd mnt/gentoo

  20.使用links,從中選擇一個鏡像,來找到stage資訊,在實際安裝過程中使用了

  這個地址來擷取stage包,將游標移到上面後按D選擇下載

  21.選擇了stage3-i686-2007.0.tar.bz2 包下載

  22.開始解壓stage包tar xvjpf stage3-*.tar.bz2

  23.開始下載最新的 Portage 快照,操作的方法同上,實際下載地址為

  24.開始解壓portage快照,tar xvjf /mnt/gentoo/portage-2007.0.tar.bz2 -C /mnt/gentoo/usr

  25.編譯參數不需要進行修改 make.conf

  26.使用工具來進行鏡像網站的選擇,以便快速下載原始碼 mirrorselect -i -o >> /mnt/gentoo/etc/make.conf,使用空格進行選擇

  27.開始選擇更新的鏡像網站 mirrorselect -i -r -o >> /mnt/gentoo/etc/make.conf

  28.開始拷貝網域名稱解析資訊,以備新的系統能夠正常訪問外部 cp -L /etc/resolv.conf /mnt/gentoo/etc/resolv.conf

  29.開始掛載虛擬分區 mount -t proc none /mnt/gentoo/proc;mount -o bind /dev /mnt/gentoo/dev

  30.開始進入新的安裝環境chroot /mnt/gentoo /bin/bash;env-update;source /etc/profile;export PS1="(chroot) $PS1"

  31.開始更新portage樹,emerge --sync 需要的時間比較的長

  32.開始選擇正確的屬性設定檔,ls -FGg /etc/make.profile,一般不需要做特殊修改

  33.開始設定正確的USE變數,less /usr/portage/profiles/use.desc;nano -w /etc/make.conf;USE="-gtk -gnome qt3 qt4 kde dvd alsa cdr"

  34.開始設定本地的語言環境,nano -w /etc/locale.gen;locale-gen

  35.開始設定時區ls /usr/share/zoneinfo;cp /usr/share/zoneinfo/UTC /etc/localtime 一定要設定成UTC時區

  36.開始安裝核心emerge gentoo-sources

  37.開始組建組態菜單,先進入核心原始碼路徑cd /usr/src/linux;make menuconfig

  38.開始編譯核心原始碼,make && make modules_install

  39.開始安裝核心cp arch/i386/boot/bzImage /boot/kernel-2.6.19-gentoo-r5

  40.開始配置自啟動模組nano -w /etc/modules.autoload.d/kernel-2.6

  41.開始建立檔案分區表nano -w /etc/fstab

  42.開始設定原生主機名稱nano -w /etc/conf.d/hostname

  43.開始配置網路環境nano -w /etc/conf.d/net

  44.開始設定網卡開機自啟動rc-update add net.eth0 default

  45.開始配置主機資訊nano -w /etc/hosts

  46.改變root使用者的密碼passwd

  47.開始安裝相應的工具軟體grub,emerge grub

  48.開始編寫相應的啟動引導檔案 nano -w /boot/grub/grub.conf

  49.執行命令grep -v rootfs /proc/mounts > /etc/mtab

  50.執行命令grub-install --no-floppy /dev/hda

  51.系統編譯完成進行收尾工作exit;cd;umount /mnt/gentoo/boot /mnt/gentoo/dev /mnt/gentoo/proc /mnt/gentoo;

  52.reboot

  至此就完成了gentoo linux的安裝了!

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.