FrontPage › GentooInstallGuide
Gentoo Install Guide (private) ¶
2004. 12. 04 (Åä)
±è µ¿ ¼· (±î³ª¸®)
±è µ¿ ¼· (±î³ª¸®)
1.gentoo CD download ¶
http://www.gentoo.org/main/en/mirrors.xml ex) http://mirror.gentoo.gr.jp/releases/x86/2004.3/livecd/install-x86-minimal-2004.3-r1.iso
¹Ì·¯´Â Çѱ¹ or ÀϺ»ÂÊ¿¡¼ ¹Þ´Â°Ô ¼Óµµ³ª Á¤½Å°Ç°»ó ÁÁ´Ù. LiveCD ¸¦ ´Ù¿î¹ÞÀ¸¸é µÇ´Âµ¥, µé¾î°¡´Â ¼ø¼´Â
release -> x86 (or Àڽſ¡ ¸Â´Â architecture ¸¦ ¼±ÅÃ) -> 2004.3 (2004³â 12¿ù ÇöÀç ÃÖ½Å) -> LiveCD -> Pentium4 (ÀÚ½ÅÀÇ CPU¿¡ ¸Â°Ô ¼±ÅÃ) -> CD Download (minimal or universal)
minimal Àº ½Ã½ºÅÛ ºÎÆÃÇÒ ¼ö ÀÖ´Â ÃÖ¼ÒÀÇ ¿ë·®¸¸ °®°íÀÖ´Ù. (stageX.tar.bz2 ÇÊ¿äÇÔ) – 2004.3 ¾à 50MB
universal Àº ¾ÆÅ°ÅØÃÄ¿¡ ¸Â´Â stage µéÀÌ µé¾îÀÖ´Ù. - 2004.3 ¾à 650MB
universal Àº ¾ÆÅ°ÅØÃÄ¿¡ ¸Â´Â stage µéÀÌ µé¾îÀÖ´Ù. - 2004.3 ¾à 650MB
2.Booting the LiveCD(s) ¶
boot: gentoo(gentoo-nofb) or smp (smp-nofb)
ÀÚ½ÅÀÇ CPU °¡ singleÀÏ °æ¿ì Enter ¶Ç´Â gentoo ¶ó°í ÀÔ·ÂÇÏ°í µé¾î°¡¸ç µÇ°í, smp(ÆæƼ¾ö4 °è¿ ÇÏÀÌÆÛ¾²·¹µùµµ Æ÷ÇÔµÊ) À¸·Î ºÎÆÃÇÏ¸é µÈ´Ù. ±× ¹Û¿¡ ´Ù¸¥ ¸ðµå ¿É¼ÇÀ» º¸·Á¸é F2 Å°¸¦ ´©¸£¸é ÀÚ¼¼ÇÏ°Ô ¼³¸íÀÌ ³ª¿Â´Ù.
NIC Detect
# modprobe 8139too or e100 (network modules)°¡²û ·£Ä«µå ¸ðµâÀÌ ¾È ¿Ã¶ó¿Ã °æ¿ì°¡ Àִµ¥, ±×·²¶§´Â ÀÚ½ÅÀÇ NIC ¿¡ ¸Â´Â ¸ðµâÀ» ¿Ã·ÁÁÖ¸é µÈ´Ù.
Network Setup
# net-setup eth0 (³×Æ®¿öÅ© ¼³Á¤) # ifconfig eth0 (³×Æ®¿öÅ© ¼³Á¤È®ÀÎ) # ping -c 3 kr.yahoo.comnet-setup eth0 À̶ó°í ÀÔ·ÂÀ» Çϸé, ½ºÅ©¸³Æ®¿¡ µû¶ó¼ ¼ø¼´ë·Î ÀÚ½ÅÀÇ ³×Æ®¿öÅ© ¼Â¾÷À» ÇØÁÖ¸é µÇ´Âµ¥, dhcp ¶Ç´Â static »óȲ¿¡ ¸Â°Ô °ªÀ» ³Ö¾îÁÖ¸é µÈ´Ù. (ADSL Àº »ç¿ëÇغ¸Áö ¾Ê¾Æ¼ skip)
DMA on
* ¾Ë°í ÀÖ°ÚÁö¸¸ SCSI HDD ´Â ÀÌ ¿É¼ÇÀÌ ¸ÔÁö ¾Ê´Â´Ù. ´õ ÀÚ¼¼ÇÑ »çÇ×Àº DMA ´ëÇؼ ¾Ë¾Æº¸¸ç ÁÁ´Ù.
# hdparm -d 1 /dev/hdaIDE Çϵå¿þ¾î¸¦ °®°íÀÖ´Â »ç¶÷Àº Ưº°ÇÏÁö ¾Ê´Â ÀÌ»ó DMA ¸¦ ²À ÄÑÁֱ⠹ٶõ´Ù. (´ëºÎºÐ ÇØ´ç)
* ¾Ë°í ÀÖ°ÚÁö¸¸ SCSI HDD ´Â ÀÌ ¿É¼ÇÀÌ ¸ÔÁö ¾Ê´Â´Ù. ´õ ÀÚ¼¼ÇÑ »çÇ×Àº DMA ´ëÇؼ ¾Ë¾Æº¸¸ç ÁÁ´Ù.
ROOT passwd change
# passwdsshd µ¥¸óÀ» ¶ç¿ì°í ¼³Ä¡ÇÒ »ç¶÷Àº root passwd ¸¦ ¼³Á¤ÇØ¾ß ÇÑ´Ù
Option
# /etc/init.d/sshd start # ifconfig eth0 eth0 Link encap:Ethernet HWaddr 00:01:02:82:DB:58 inet addr:192.168.0.100 Bcast:192.168.0.255 Mask:255.255.255.0 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:158606 errors:0 dropped:0 overruns:0 frame:0 TX packets:123666 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:96163883 (91.7 Mb) TX bytes:20863289 (19.8 Mb) Interrupt:11 Base address:0xc000sshd µ¥¸óÀ» ¶ç¿ì°í ´Ù¸¥ Å͹̳ο¡¼ ÀÛ¾÷À» ÇÒ ¼ö ÀÖ´Ù.
3.FDISK ¶
Partition Fileststem Size Description /dev/hda1 ext3 100M Boot Partition /dev/hda2 swap 2G Swap Partition /dev/hda3 xfs remaining Root Partition
FDISK Ç׸ñÀ» ¼³Á¤ÇÑ´Ù
À§ÀÇ ¿¹´Â /dev/hda µð½ºÅ© 1°³¸¦ hda1~3 ¹øÀ¸·Î ³ª´©¾ú´Ù. /dev/hda1 Àº /boot ÆÄƼ¼ÇÀ¸·Î »ç¿ëÇÒ ºÎºÐÀ̸ç ÆÄÀϽýºÅÛÀº ext3 ·Î Á¤ÇÏ¿´´Ù. /dev/hda2 ºÎºÐÀº swap ¿µ¿ªÀε¥ ¸Þ¸ð¸®ÀÇ 1 ~ 1.5¹è Á¤µµ ÀÔ·ÂÇÏ¸é µÉ °ÍÀÌ´Ù. /dev/hda3 ¿µ¿ªÀº ³²Àº Çϵåµð½ºÅ©¸¦ ¸ðµÎ ÇÒ´çÇÏ°í ÆÄÀϽýºÅÛÀº xfs ·Î Á¤ÇÏ¿´´Ù.
´õ ÀÚ¼¼ÇÑ »çÇ×Àº Á¨Åõ ¸Þ´º¾ó ¶Ç´Â man fdisk ¸¦ Âü°íÇϱ⠹ٶõ´Ù.
À§ÀÇ ¿¹´Â /dev/hda µð½ºÅ© 1°³¸¦ hda1~3 ¹øÀ¸·Î ³ª´©¾ú´Ù. /dev/hda1 Àº /boot ÆÄƼ¼ÇÀ¸·Î »ç¿ëÇÒ ºÎºÐÀ̸ç ÆÄÀϽýºÅÛÀº ext3 ·Î Á¤ÇÏ¿´´Ù. /dev/hda2 ºÎºÐÀº swap ¿µ¿ªÀε¥ ¸Þ¸ð¸®ÀÇ 1 ~ 1.5¹è Á¤µµ ÀÔ·ÂÇÏ¸é µÉ °ÍÀÌ´Ù. /dev/hda3 ¿µ¿ªÀº ³²Àº Çϵåµð½ºÅ©¸¦ ¸ðµÎ ÇÒ´çÇÏ°í ÆÄÀϽýºÅÛÀº xfs ·Î Á¤ÇÏ¿´´Ù.
´õ ÀÚ¼¼ÇÑ »çÇ×Àº Á¨Åõ ¸Þ´º¾ó ¶Ç´Â man fdisk ¸¦ Âü°íÇϱ⠹ٶõ´Ù.
Filesystem | Creation Command |
ext2 | mke2fs |
ext3 | mke2fs -j |
reiserfs | mkreiserfs |
xfs | mkfs.xfs |
jfs | mkfs.jfs |
4.Creating Filesystems ¶
# mke2fs -j /dev/hda1 (ext3 ·Î ¸¸µé±â) # mkfs.xfs /dev/hda3 (xfs ·Î ¸¸µé±â) # mkswap /dev/hda2 (½º¿Ò¸¸µé±â) # swapon /dev/hda2
5.Mounting ¶
# mount /dev/hda3 /mnt/gentoo # mkdir /mnt/gentoo/boot # mount /dev/hda1 /mnt/gentoo/boot
chroot ÇϱâÀ§ÇÑ ÁغñÀÛ¾÷
6.Install a Stage Tarball ¶
# date 120416102004 (2004³â 12¿ù 04ÀÏ 16:10)
ÇöÀç ÄÄÇ»ÅÍÀÇ ½Ã°£À» ÁöÁ¤ÇØÁÖ±â
- Internet À¸·ÎºÎÅÍ stage ¾ò±â
stage ÆÄÀÏ°ú ½º³À¼¦ ÆÄÀÏÀ» ´Ù¿î·Îµå ÇÑ´Ù, ¹°·Ð È®ÀÎÀ» À§ÇØ md5µµ ¹ÞÀ¸¸é ÁÁ´Ù
# cd /mnt/gentoo # links2 http://www.gentoo.org/main/en/mirrors.xmlÀ̵¿Å° : ¹æÇâÅ°, ´Ù¿î·ÎµåÅ° "d"
stage ÆÄÀÏ°ú ½º³À¼¦ ÆÄÀÏÀ» ´Ù¿î·Îµå ÇÑ´Ù, ¹°·Ð È®ÀÎÀ» À§ÇØ md5µµ ¹ÞÀ¸¸é ÁÁ´Ù
# md5sum -c stage?-*.tar.bz2.md5 (stage 2, 3) # md5sum -c portage-*.tar.bz2.md5 (snapshot)´Ù¿î·Îµå ¹ÞÀº ÆÄÀÏÀÇ ÀÌ»óÀ¯¹« °Ë»ç
# tar -xvjpf stage?-*.tar.bz2 # tar -xvjf /mnt/gentoo/portage-20041202.tar.bz2 -C /mnt/gentoo/usrtarball Ç®±â
- LiveCD ·ÎºÎÅÍ stage ¾ò±â
# cd /mnt/gentoo # ls /mnt/cdrom/stages # tar -xvjpf /mnt/cdrom/stages/stage?-*.tar.bz2 # tar -xvjpf /mnt/cdrom/snapshot/portage-*.tar.bz2tarball Ç®±â
- USE Flag ¿Í mirror Á¶Á¤
# nano -w /mnt/gentoo/etc/make.conf USE="x86 alsa acpi -arts avi berkdb crypt cups encode foomaticdb gdbm gif gpm gtk gtk2 imlib jpeg -kde gnome libg++ libwww mad mikmod motif mpeg ncurses nls nptl oggvorbis mp3 opengl pam pdflib png python -qt quicktime readline sdl slang spell ssl svga tcpd truetype X xml2 xv zlib cjk multichar sse sse2 mmx" GENTOO_MIRRORS="http://ftp.gentoo.or.kr/ http://mirror.gentoo.or.kr/"¹Ì·¯´Â Çѱ¹°ú ÀϺ»¹Ì·¯
7.Chrooting ¶
# cp -L /etc/resolv.conf /mnt/gentoo/etc/resolv.conf
chroot ÇϱâÀü¿¡ DNS Á¤º¸ÆÄÀÏÀÎ resolv.conf ÆÄÀÏÀ» chroot µÉ etc µð·ºÅ丮 ¹Ø¿¡ º¹»ç
# mount -t proc none /mnt/gentoo/proc # chroot /mnt/gentoo /bin/bash
root directory change !
# env-update/etc/env.d/ µð·ºÅ丮¿¡ Àִ ȯ°æ°ªÀ» ¾÷µ¥ÀÌÆ® ÇØÁÜ
# source /etc/profile/etc/profile Àû¿ë
# emerge --syncportage sync
- glibc locale »ç¿ëÀÚ ¼³Á¤Çϱâ (¿É¼Ç)
# mkdir /etc/portage # echo "sys-libs/glibc userlocales" >> /etc/portage/package.use # nano -w /etc/locales.build en_US/ISO-8859-1 en_US.UTF-8/UTF-8 ko_KR.EUC-KR/EUC-KR ko_KR.UTF-8/UTF-8 ko_KR/EUC-KR
- Stage 1 to Stage 2
# cd /usr/portage # scripts/bootstrap.shºÎÆ®½ºÆ®·¦ °úÁ¤ (»ó´çÈ÷ ¿À·¡ °É¸°´Ù !!!)
- Stage 2 to Stage 3
# emerge system½Ã½ºÅÛ ÆÐÅ°Áö¸¦ ¸ðµÎ ¾÷µ¥ÀÌÆ® ÇØÁØ´Ù (Á¶±Ý ¿À·¡°É¸²)
8.Timezone ¶
# ls /usr/share/zoneinfo # ln -sf /usr/share/zoneinfo/Asia/Seoul /etc/localtime
ÇöÀç ÄÄÅÍÀÇ Å¸ÀÓÁ¸À» ¾Æ½Ã¾Æ/¼¿ï·Î ½Éº¼¸¯ ¸µÅ©¸¦ °É¾îÁÜ (-f ´Â °Á¦)
9.Kernel Compile ¶
# cd /usr/portage/sys-kernel/gentoo-dev-source # emerge gentoo-dev-sources-2.6.9-r9.ebuild (gentoo-dev-source »ç¿ë) # cd /usr/src/linux # make menuconfig
Ä¿³Î¼³Á¤Àº º»ÀÎÀÇ PC ¿Í ȯ°æ¿¡ ¸Â°Ô ¼¼ÆÃÇØÁÖµÇ, ¾Æ·¡ »çÇ×µéÀº Á¨Åõ¸®´ª½º »ç¿ë½Ã ²À ÇÊ¿äÇÑ ¿É¼ÇµéÀÌ´Ï ³Ö¾îÁֱ⠹ٶ÷
Activating Required Options Code Listing 6: Selecting experimental code/drivers Code maturity level options ---> [*] Prompt for development and/or incomplete code/drivers
Code Listing 7: Selecting correct processor family Processor type and features ---> (Change according to your system) (Athlon/Duron/K7) Processor family
Code Listing 8: Selecting necessary file systems (With a 2.6.x kernel) File systems ---> Pseudo Filesystems ---> [*] /proc file system support [*] /dev file system support (OBSOLETE) [*] Automatically mount at boot [*] Virtual memory file system support (former shm fs) (Select one or more of the following options as needed by your system) <*> Reiserfs support <*> Ext3 journalling file system support <*> JFS filesystem support <*> Second extended fs support <*> XFS filesystem support
Code Listing 11: Activating SMP support Processor type and features ---> [*] Symmetric multi-processing support
Code Listing 12: Activating USB Support for Input Devices USB Support ---> <*> USB Human Interface Device (full HID) support
For 2.6 kernel
# make && make modules_installº»°ÝÀûÀÎ Ä¿³ÎÄÄÆÄÀÏ (½Ã°£ÀÌ ¿À·¡°É¸²)
# cp arch/i386/boot/bzImage /boot/gentoo-2.6.9-r9 # cp System.map /boot/System.map-gentoo-2.6.9-r9 # cp .config /boot/config-2.6.9-r9
Ä¿³ÎÄÄÆÄÀÏÈÄ »êÃâµÈ ÆÄÀϵéÀ» /boot µð·ºÅ丮·Î º¹»ç
# emerge coldplug # rc-update add coldplug boot
coldplug µ¥¸ó ¼³Ä¡ & ¼ºñ½º µî·Ï
# emerge hotplug # rc-update add hotplug default
hotplug µ¥¸ó ¼³Ä¡ & ¼ºñ½º µî·Ï
# nano -w /etc/modules.autoload.d/kernel-2.X # modules-update
Ä¿³Î ÄÄÆÄÀϽà ¸ðµâ·Î ³Ö¾ú´ø ºÎºÐÀ» ³Ö¾îÁÖ¸é µÈ´Ù (kernel-2.4 or kernel-2.6)
10./etc/fstab ¶
/dev/hda1 /boot ext3 noatime 1 1 /dev/hda3 / xfs noatime 0 0 /dev/hda2 none swap sw 0 0
À§ÀÇ FDISK ÇÒ¶§ Àâ¾ÆÁØ ÆÄÀϽýºÅÛ°ú ¸¶¿îÆ®À§Ä¡¸¦ ¸ÂÃçÁØ´Ù
11. Network Information ¶
# echo ns > /etc/hostname (È£½ºÆ®³×ÀÓ µî·Ï) # echo kkanari.info > /etc/dnsdomainname # echo kkanari.info > /etc/nisdomainname # rc-update add domainname default
µµ¸ÞÀÎ ÀÔ·Â & ¼ºñ½º µî·Ï
# nano -w /etc/conf.d/net (³×Æ®¿öÅ© ¼³Á¤) - static iface_eth1=¡±192.168.6.17 broadcast 192.168.6.255 netmask 255.255.255.0¡± gateway=¡±eth1/192.168.6.1¡± - dhcp iface_eth1=¡±dhcp¡±
- Centrino Wireless LAN Àâ±â
# emerge ipw2100 # modprobe ipw2100 # iwlist scanning (essid ã±â) # iwconfig eth1 essid ¡°3com¡± key 1234 (¾ÏÈ£°ªÀÌ ¹®ÀÚÀÏ°æ¿ì key s:abcd ¶ó°í ÀÔ·ÂÇØÁÜ)
- Wireless LAN eth1
# cd /etc/init.d # ln -s net.eth0 net.eth1 # nano -w /etc/hosts 127.0.0.1 localhost 192.168.6.17 x31.kkanari.org x31
12.System Information ¶
# passwd # nano -w /etc/rc.conf (ÇØ´çÇ׸ñ¿¡ ÇÊ¿äÇÑ »çÇ×ÀÌ ÀÖÀ¸¸é ¼öÁ¤ÇØ ÁØ´Ù, ¾Æ·¡´Â ³»°¡ ¼öÁ¤ÇÑ ³»¿ª) CLOCK="local" EDITOR="/usr/bin/vim" DISPLAYMANAGER="gdm" XSESSION="Gnome"
# emerge metalog # rc-update add metalog default
metalog ¼³Ä¡ & ¼ºñ½º µî·Ï
# emerge vixie-cron # rc-update add vixie-cron default
vixie-cron ¼³Ä¡ & ¼ºñ½º µî·Ï
# emerge slocate (filesystem indexing) # emerge xfsprogs (xfs filesystem needs)
- °¢ÀÚ ½Ã½ºÅÛ¿¡ ¸Â´Â ÆÄÀϽýºÅÛ ÆÐÅ°Áö¸¦ ¼³Ä¡ÇØ ÁØ´Ù.
File System | Tool | Install Command |
XFS | xfsprogs | emerge xfsprogs |
ReiserFS | reiserfsprogs | emerge reiserfsprogs |