[sửa] Chương 7: Cài FreeBSD Lên Đĩa Cứng [sửa] 1 Cài trên đĩa cứng

Một phần của tài liệu Cài đặt và cấu hình FreeBSD (Trang 43 - 46)

Trần Thanh Hòa 2010

Cách cài đặt tương tự như mình đã giới thiệu ở phần I - Chương I.

[sửa] 2. Cập nhật mã nguồn và tiến hành biên dich hệ thống

- Sau khi cài đặt xong, khởi động lại máy xong thì bạn cần cài đặt gói cvsup-without-gui-16.1h để cập nhật mã nguồn. Bạn dùng lệnh:

LeNam# sysintall

- Chọn Configure -> chọn packages -> chọn CD/DVD (bạn phải bỏ CD ISO image thứ 2 của FreeBSD vào) -> chọn net -> chọn cvsup-without-gui-16.1h -> OK -> Install -> OK -> Exit. Sau đó bạn chép file stable-supfile vào /etc bằng cú pháp:

LeNam# cp /usr/share/example/cvsup/stable-supfile /etc - Điều chỉnh cấu hình:

LeNam# ee /etc/stable-supfile

- Điều chỉnh dòng 68 lại thành *default host=cvsup.freebsd.org -> ESC -> leave and save. - Chạy lệnh sau để update source code:

LeNam# cvsup -g -L 2 /etc/stable-supfile

- Trong lúc chờ đợi chuyển sang terminal thứ 2 và soạn thảo file cấu hình kernel. LeNam# ee /usr/src/sys/i386/conf/MYKERNEL

-File cấu hình kernel này bao gồm tất cả các cấu hình phần cứng mà FreeBSD hỗ trợ, trừ trường hợp bạn có ý muốn sử dụng cho nhiều máy tính khác nhau còn không thì bạn hãy tìm hiểu kỹ phần cứng máy tính của mình và loại bỏ những phần không liên quan, để loại bỏ những phần không liên quan trong file cấu hình kernel thì chỉ cần đánh dấu # vào dòng cần loại bỏ. - Tạo make.conf: LeNam# ee /etc/make.conf

# $FreeBSD: src/share/examples/etc/make.conf,v 1.265.2.8 2006/09/13 08:39:16 des Exp $

#

# The CPUTYPE variable controls which processor should be targeted for # generated code. This controls processor-specific optimizations in # certain code (currently only OpenSSL) as well as modifying the value # of CFLAGS to contain the appropriate optimization directive to gcc. # The automatic setting of CFLAGS may be overridden using the

# NO_CPU_CFLAGS variable below.

# Currently the following CPU types are recognized: # Intel x86 architecture:

# (AMD CPUs) opteron athlon64 athlon-mp athlon-xp athlon-4 # athlon-tbird athlon k8 k6-3 k6-2 k6 k5

Trần Thanh Hòa 2010

# pentium2 pentiumpro pentium-mmx pentium i486 i386 # (Via CPUs) c3 c3-2

# Alpha/AXP architecture: ev67 ev6 pca56 ev56 ev5 ev45 ev4 # AMD64 architecture: opteron, athlon64, nocona

# Intel ia64 architecture: itanium2, itanium #

# (?= allows to buildworld for a different CPUTYPE.) #

CPUTYPE=pentium4 #

CFLAGS= -O2 -pipe COPTFLAGS= -O2 -pipe #

INSTALL=install -C #

NO_ATM= # do not build ATM related programs and libraries NO_DICT= # do not build the Webster dictionary files NO_I4B= # do not build isdn4bsd package

NO_INFO= # do not make or install info files NO_IPFILTER= # do not build IP Filter package

NO_KERBEROS= # do not build and install Kerberos 5 (KTH Heimdal) NO_MAN= # do not build manual pages

NO_NIS= # do not build NIS support and related programs. NO_PROFILE= # Avoid compiling profiled libraries

NO_RCMDS= # do not build or install BSD r* commands (rsh, etc). NO_SENDMAIL= # do not build sendmail and related programs

NO_SHAREDOCS= # do not build the 4.4BSD legacy docs NO_BIND= # Do not build any part of BIND

NO_BIND_DNSSEC= # Do not build dnssec-keygen, dnssec-signzone NO_BIND_ETC= # Do not install files to /etc/namedb

NO_BIND_LIBS_LWRES= # Do not install the lwres library

NO_BIND_MTREE= # Do not run mtree to create chroot directories NO_BIND_NAMED= # Do not build named, rndc, lwresd, etc.

NO_BIND_UTILS= # Do not build dig, host, nslookup, nsupdate #

MAKE_IDEA=yes # IDEA (128 bit symmetric encryption) #

KERNCONF=MYKERNELLưu ý: Lưu ý:

- Dòng CPUTYPE, bạn hãy chọn đúng loại CPU của mình. - Sendmail và bind là 2 phần mềm nổi tiếng và rất lâu đời trong thế giới *nix, vì thế không có gì lạ khi nó mặc định được cài đặt trong hầu hết các phiên bản UNIX cũng như linux.

Phần chuẩn bị đã xong, chuyển sang terminal 1 coi source đã được update xong chưa, nếu mọi thứ đã xong hãy chạy lệnh sau để tiến hành biên dịch hệ thống:

LeNam# cd /usr/src LeNam# make buildworld LeNam# make buildkernel LeNam# make installkernel LeNam# reboot

Trần Thanh Hòa 2010

LeNam# cd /usr/src

LeNam# make installworld LeNam# reboot

Một phần của tài liệu Cài đặt và cấu hình FreeBSD (Trang 43 - 46)