1) boot from iso image
2) change root password
# passwd
3) configure network
# net-setup eth0
4) Preparing the disks
# fdisk /dev/sda
sda1 swap 512M
sda2 linux
set bootable flag
5) creating filesystems
# mkfs.ext4 /dev/sda2
6) activating swap partition
# mkswap /dev/sda1
# swapon /dev/sda1
7) mount /dev/sda2 /mnt/gentoo
8) setting date/time right
# date mmddhhmmyyy
at this stage, you should use UTC time
9) download stage* & portage*
# links2 http://www.gentoo.org/main/en/mirrors.xml
Asia, South Korea, daum
releases/x86/current-stage3
snapshots
10) install stage3, portage
# tar xvfj stage3-*
# cd usr
# tar xvfj ../portage*
11) configuring the compile option
# nano /mnt/gentoo/etc/portage/make.conf
CFLAGS="-O2 -march=i686 -pipe"
CXXFLAGS="${CFLAGS}"
MAKEOPTS="-j5"
12) selecting mirrors
# mirrorselect -i -o >> /mnt/gentoo/etc/portage/make.conf
# mirrorselect -i -r -o >> /mnt/gentoo/etc/portage/make.conf
GENTOO_MIRRORS="http://ftp.daum.net/gentoo/ ftp://ftp.kaist.ac.kr/gentoo/ http://ftp.kaist.ac.kr/pub/gentoo/"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
13) mounting additional filesystems
# mount -t proc none /mnt/gentoo/proc
# mount --rbind /sys /mnt/gentoo/sys
# mount --rbind /dev /mnt/gentoo/dev
14) entering the new environment
# chroot /mnt/gentoo /bin/bash
# env-update
# source /etc/profile
# export PS1="(chroot) $PS1"
15) choosing the profile
# eselect profile list
# eselect profile set 6 (developers)
16) updating portage tree
# emerge --sync
17) configuring the USE variable
# nano /mnt/gentoo/etc/portage/make.conf
USE="-X -gtk cjk unicode userslocale nptl -cups -mozilla -kde -qt4 -ipv6
LINGUAS="ko"
VIDEO_CARDS="nvidia"
%% LINGUAS="ko" 컴파일 할 때 한글 인코딩이 있는 패키지를 함께 받아서 컴파일 함
%% VIDEO_CARDS="nvidia" 그래픽 관련된 프로그램에서 비디오 카드 확인을 필요로 할 때 이 값을 참조하여 컴파일 함
18) timezone
# cd /etc
# mv localtime localtime.org
# ln -s /usr/share/zoneinfo/Asia/Seoul localtime
# echo "Asia/Seoul" > timezone
# date mmddhhmmyyy
19) installing the kernel
# emerge gentoo-sources
# cd /usr/src/linux
# make menuconfig
Make sure that every driver that is vital to the booting of system (such as SCSI controller, ...) is compiled in the
kernel
and not as a module, otherwise system will not be able to boot completely.
* Processor type => core 2 duo
* File systems --->
<*> Second extended fs support
<*> Ext3 journalling file system support
<*> The Extended 4(ext4) filesystem
Pseudo Filesystem --->
[*] /proc file system support
[*] Virtual memory file system support (former shm fs)
* Processor type and features --->
[*] Symmetric multi-processing support
* Device Drivers --->
Generic Driver Options --->
[*] Maintain a devtmpfs filesystem to mount at /dev
[*] HID Devices --->
<*> USB Human Interface Devie (full HID) support
[=======================================================================]
SCSI device support -->
<*> SCSI disk support
[=======================================================================]
vmware scsi 장비를 위한 커널 설정
SCSI device support -->
<*> SCSI target support
[*] legacy /proc/scsi support
<*> SCSI disk support
<*> SCSI generic support
[*] SCSI low-level driver --->
<*> SYM53C8XX Version 2 SCSI support
[*] Fusion MPT device support --->
<*> Fusion MPT ScsiHost drivers for SPI
<*> Fusion MPT ScsiHost drivers for FC
<*> Fusion MPT ScsiHost drivers for SAS
(128) Maximum number of scatter gather entries (16-128)
<*> Fusion MPT misc device (ioctl) driver
[*] Fusion MPT logging facility
[=======================================================================]
<*> Serial ATA and Parallel ATA drivers --->
[*] ATA BMDMA support
<*> Intel ESB, ICH, PIIX3, PIIX4 PATA/SATA support
<*> Intel PATA old PIIX support
<*> Intel SCH PATA support
<*> Intel PATA MPIIX support
<*> Generic ATA support
[*] Network device support --->
[*] Ethernet driver support --->
[*] AMD devices
<*> AMD PCnet32 PCI support
[=======================================================================]
ext4를 root로 사용할 경우 필요함
* -*- Enable the block layer
[*] supportfor large (2TB+) block devices and files
[=======================================================================]
# make bzImage && make modules modules_install
# cp arch/x86/boot/bzImage /boot/kernel-3.5.7-gentoo
# emerge genkernel
# nano /etc/fstab
/dev/BOOT --> /dev/sda2
# genkernel --install initramfs
20) Configuring network
# nano /etc/conf.d/hostname
hostname="pluto"
# nano /etc/conf.d/net
config_eth0="192.168.0.30 netmask 255.255.255.0 brd 192.168.0.255"
routes_eth0="default via 192.168.0.1"
21) Automatically start network at boot
# cd /etc/init.d
# ln -s net.lo net.eth0
# rc-update add net.eth0 default
22) change root password
# passwd
23) configure system information
# nano /etc/rc.conf
# nano /etc/conf.d/hwclock
clock="local"
clock_systohw="YES"
24) configure locale
# nano /etc/locale.gen
ko_KR.EUC-KR EUC-KR
ko_KR.UTF-8 UTF-8
# locale-gen
//* 2013.4.7 수정
# nano /etc/env.d/02locale
LANG="ko_KR.UTF-8"
LC_COLLATE="C"
*//
25) Installing necessary system tools
# emerge -u syslog-ng vixie-cron mlocate
# emerge -u vim epm gentoolkit pciutils
26)
# rc-update add ccache syslog-ng default
# rc-update add vixie-cron default
# rc-update add sshd default
http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=1&chap=10
27) Configuring the bootloader
# emerge grub
28) Rebooting the system
# exit
# cd
# umount -l /mnt/gentoo/dev{/shm,/pts,}
# umount -l /mnt/gentoo{/proc,}
# reboot
http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=1&chap=11
# emerge -u nfs-utils usbutils netplug
# emerge -u samba lftp
# emerge -u subversion ctags cscope
# emerge -u mc
# emerge -u ethtool
# emerge -u logrotate
[=======================================================================]
일반 계정에서 su 명령을 쓸 수 없는 경우
# chmod 4755 /bin/su
[=======================================================================]
[=======================================================================]
rc_sys not defined in rc.conf ....
/etc/rc.conf
#rc_sys="" => rc_sys=""
[=======================================================================]
net.eth0 has started, but is inactive
/etc/rc.conf
#rc_depend_strict="YES"
rc_depend_strict="NO"
[=======================================================================]
http://en.gentoo-wiki.com/wiki/Splash
# USE="static-libs fbcondecor mng" emerge splashutils
# emerge splash-themes-gentoo splash-themes-livecd splash-themes-livedvd bootsplash-themes
# splash_geninitramfs --verbose --res 1024x768 --generate /boot/initramfs-bootsplash-debian-mist-3.5.7-gentoo Debian-Mist
# emerge gentoo-artwork gentoo-artwork-livecd
"vga=791 splash=silent,theme:Debian-Mist console=tty1 quit"
[=======================================================================]
useradd <> -m -G users,wheel -g users
passwd <>
.vimrc
set nobackup
set ai
set nu
set ts=4
set sw=4
[=======================================================================]
2013.4.27 추가
'운영_설치 > 리눅스_유닉스' 카테고리의 다른 글
젠투 (gentoo) 패키지 관리 명령 몇가지 (0) | 2013.02.26 |
---|---|
삼바(samba) 공유 디렉토리 상의 심볼릭 링크 처리 (0) | 2013.02.10 |
samba over ssh (0) | 2011.12.18 |
젠투 로케일 설정 (0) | 2011.04.13 |
부팅시 자동 파일 시스템 검사 (0) | 2010.10.28 |