歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Unix知識 >> Unix教程 >> FreeBSD6.0中文安裝全過程

FreeBSD6.0中文安裝全過程

日期:2017/2/27 17:39:13   编辑:Unix教程
FreeBSD

(1)、已安裝win2003,FreeBSD與win2003雙系統共存,從windows引導進入FreeBSD系統。
(2)、一般的中文桌面應用,能上網聊天、播放多媒體文件,沒有網絡功能。
(3)、只安裝mini(迷你)系系統,然後從網絡安裝軟件包。
(4)、用分區工具分出一個准備裝FreeBSD的主分區。

安裝前的准備
(1)、由於找不到硬盤安裝的方法,只好刻盤從光驅安裝。
(2)、從disc1中提取boot/boot1文件到C盤根目錄下,編輯boot.ini文件添加一項:
C:\boot1="FreeBSD 6.0",這樣就會在win的引導界面看到FreeBSD 6.0的啟動項。
安裝系統
(1)、從光盤啟動後回車進入sysinstall界面,用上、下、左、右鍵選擇,回車確認。
(2)、選擇standard開始進行標准安裝。
(3)、分割硬盤:移動光棒選擇您想安裝 FreeBSD 的硬盤分區,按D刪除原來的文件系統,按C創建FreeBSD文件系統,默認是165;由於從win引導,需激活win的C盤分區,移動光棒到win分區,按S激活;分割完畢,按W、Q重寫分區表、推出。
(4)、安裝多重引導,有三個選項:BootMgr,Standard,None。這裡是用第三方的多重引導程序選None不安裝FreeBSD的引導程序。
(5)、使用Disklabel 創建分區,一般創建四個分區(按順序):/為根文件系統;swap為系統磁盤交換分區;/var目錄會存放不同長度的文件、日志以及 其它管理用途的文件;/usr為第三方軟件安裝地方,剩下的硬盤空間就全部給它。a、同樣按C創建分區,如/:按C接下來將出現一個對話框, 要求您輸入新分區的大小(可直接輸入數字+M)我輸入120M,然後選擇fs,在對話框裡輸入/(swap不必輸入fs);後面的類推。。。如果你是初次安裝,可直接按A選擇自動分區。b、同樣按W、Q完成分區。
(6)、選擇安裝軟件包:如果你的硬盤較大,選ALL全部選擇安裝,這裡我選mini。。最小化安裝。
(7)、選擇使用的安裝介質,這裡是cd/dvd。
(8)、確認安裝。
五、安裝後的配置
(一)、配置網卡
(1)、User Confirmation Requested
Would you like to configure any Ethernet or SLIP/PPP network devices?
[ Yes ] No
配置網卡,請選擇 [ Yes ] 然後按 Enter。一般是默認的,也就是第一項。
(2)、User Confirmation Requested
Do you want to try IPv6 configuration of the interface?
Yes [ No ]
新的IP通信協議 IPv6 ,使用 RA 服務,不需要[No]
(3)、 User Confirmation Requested
Do you want to try DHCP configuration of the interface?
Yes [ No ]
動態主機配置協議,按[No]出現配置界面,用Tab鍵選擇CANCEL
(二)、 配置網關
(1)、User Confirmation Requested
Do you want this machine to function as a network gateway?
[ Yes ] No
選擇[No]
(三)、配置網絡服務
(1)、 User Confirmation Requested
Do you want to configure inetd and the network services that it provides?
Yes [ No ]
(2)、 User Confirmation Requested
Do you want to have anonymous FTP access to this machine?
Yes [ No ]
(3)、User Confirmation Requested
Do you want to configure this machine as an NFS server?
Yes [ No ]
(4)、 User Confirmation Requested
Do you want to configure this machine as an NFS client?
Yes [ No ]
全部選擇 [ No ]
(四)、安全配置
User Confirmation Requested
Do you want to select a default security profile for this host (select
No for "medium" security)?
[ Yes ] No
選[Yes]
(五)、配置系統終端
User Confirmation Requested
Would you like to customize your system console settings?
[ Yes ] No
選[No]
(六)、配置時區
User Confirmation Requested
Would you like to set this machine's time zone now?
[ Yes ] No
  選擇 [ Yes ] 並按下 Enter鍵以配置時區。
User Confirmation Requested
Is this machine's CMOS clock set to UTC? If it is set to local time
or you don't know, please choose NO here!
Yes [ No ]
  選擇[ No ] 然後按 Enter選擇5 Asia -》China -》Beijing回車。

(七)、 Linux 兼容性
User Confirmation Requested
Would you like to enable Linux binary compatibility?
[ Yes ] No
這裡推薦選[Yes]。
(八)、配置鼠標
User Confirmation Requested
Does this system have a non-USB mouse attached to it?
[ Yes ] No
選[Yes]-》Enable -》 測試鼠標功能,能移動就[Yes]-》Exit退出。
(九)、安裝軟件包
User Confirmation Requested
The FreeBSD package collection is a collection of hundreds of
ready-to-run applications, from text editors to games to WEB servers
and more. Would you like to browse the collection now?
[ Yes ] No
選擇 [ Yes ] 按Enter 將會顯示軟件包選擇屏幕。
選擇All 顯示所有的軟件包-》只選擇cvsup兩項 -》選Cancel。
安裝完成之後,繼續最後的配置。

(十)、最後配置
(1)、添加用戶/組
User Confirmation Requested
Would you like to add any initial user accounts to the system? Adding
at least one account for yourself at this stage is suggested since
working as the "root" user is dangerous (it is easy to do things which
adversely affect the entire system).
[ Yes ] No
  選擇 [ Yes ] 然後鍵入Enter 繼續添加用戶。
選擇用戶user -》添加用戶信息(使用 Tab 鍵來切換不同的項目)用戶。
注意:Member groups項輸入wheel(添加到 wheel 組)成了一個超級用戶, 從而擁有 root權限。
(2)、設置 root 密碼
Message
Now you must set the system manager's password.
This is the password you'll use to log in as "root".
[ OK ]
[ Press enter to continue ]
  鍵入 Enter 來設置 root 密碼。
  密碼必須正確地輸入兩次。 毋庸諱言, 您需要選擇一個不容易忘記的口令。 請注意您輸入的口令不會回顯, 也不會顯示星號。
Changing local password for root.
New password :
Retype new password :
  密碼成功鍵入後,安裝將繼續。

(3)、退出安裝
User Confirmation Requested
Visit the general configuration menu for a chance to set any last
options?
Yes [ No ]
  選擇 [ No ] 然後鍵入 Enter 返回到主安裝菜單。
選擇 [X Exit Install] 然後鍵入 Enter。您可能需要確認是否真的退出安裝:
User Confirmation Requested
Are you sure you wish to exit? The system will reboot (be sure to
remove any floppies from the drives).
[ Yes ] No
  選擇 [ Yes ] 取出軟盤。CDROM驅動器將被鎖定, 直到機器重新啟動。CDROM然後就可以從驅動器中取出來了。

六、安裝應用程序
(一)、配置adsl撥號
(1)、編輯/etc/ppp/ppp.conf
Note:以冒號結尾的行從第一列(行首)開始,其他所有的行都需要縮進一個空格區間。
#ee /etc/ppp/ppp.conf
這是我的/etc/ppp/ppp.conf文件內容:
#################################################################
# PPP Sample Configuration File
# originally written by Toshiharu OHNO
# Simplified 5/14/1999 by [email protected]
#
# See /usr/share/examples/ppp/ for some examples
#
# $FreeBSD: src/etc/ppp/ppp.conf,v 1.10 2004/11/19 17:12:56 obrien Exp
#################################################################
default:(頂格)
set log Phase Chat LCP IPCP CCP tun command
ident user-ppp VERSION (built COMPILATIONDATE)
# Ensure that "device" references the correct serial port
# for your modem. (cuad0 = COM1, cuad1 = COM2)
#
set device PPPoE:rl0(我的Rtl8139網卡用rl0,相應修改你的網卡型號)
set speed sync
set mru 1492
set mtu 1492
set timeout 180 # 3 minute idle timer (the def
set ctsrts off
enable dns # request DNS info (for resolv
deny lqr
add default HISADDR
adsl:(頂格)
#
# edit the next three lines and replace the items in caps with
# the values which have been assigned by your ISP.
#
set phone 電話號碼
set authname adsl帳號
set authkey 密碼
set dial
set login
set ifaddr 10.0.0.1/0 10.0.0.2/0 255.255.255.0 0.0.0.0
注:ppp.conf可以從/usr/share/examples/ppp.conf.sample生成

(2)、設置開機自動撥號
#ee /etc/rc.conf
添加以下內容:
ifconfig_rl0="192.168.0.254/24"
defaultrouter="192.168.0.254"
ppp_enable="YES"
ppp_mode="ddial"
ppp_profile="adsl"
注:如果是電信用戶,這樣就可以連接網絡了。
但我是海南網通的用戶,還不能連接,於是我就添加一個路由文件/etc/resolv.conf,寫入海南網通的DNS結果成功,究竟為啥我也搞不清。
#echo "namserver X.X.X.X" > /etc/resolv.conf

(二)、使用cvsup快速獲取ports安裝方法
(1)、用root用戶把 /usr/share/examples/cvsup/ports-supfile?文件復制到新的位置,如/root目錄下:
#cp /usr/share/examples/cvsup/ports-supfile /root/ports-supfile
(2) 、編輯ports-supfile?把*CHANGE_THIS.FreeBSD.org修改離你較近的cvsup,有如下選擇:
cvsup 電信.上海市 cvsup2.cn.FreeBSD.org
cvsup 聯通.浙江市 cvsup3.cn.FreeBSD.org
cvsup 電信.上海市 cvsup4.cn.FreeBSD.org
cvsup 網通.北京市 cvsup5.cn.FreeBSD.org
cvsup 教育網.北京市 cvsup6.cn.FreeBSD.org
#ee /root/ports-supfile
修改為:
cvsup5.cn.FreeBSD.org
可注釋掉ports all和你不需要的選項,由於系統安裝時沒安裝ports,所以沒注釋掉ports all。

(3)、更新ports
# cvsup -g -L 2 /root/ports-supfile
(三)安裝中文應用桌面(X Windows)
(1)、安裝xorg
由於xorg和KDE文件太大,一般的機子ports編譯安裝會需要大量的時間,所以用pkg_add安裝
#pkg_add -r xorg

(2)、安裝KDE
#pkg_add -r kde

(3)配置xorg
#Xorg -configure
然後編輯/root/xorg.conf.new
#ee /root/xorg.conf.new
部分內容:
EndSection
Section "InputDevice"
Identifier "Mouse0"
Driver "mouse"
Option "Protocol" "auto"
Option "Device" "/dev/sysmouse"
修改處:
Option "Emulate3Buttons" "true"(配置三鍵鼠標)
Option "ZAxisMapping" "4 5"
EndSection
Section "Monitor"
#DisplaySize 320 240 # mm
Identifier "Monitor0"
VendorName "PTW"
ModelName "309"
### Uncomment if you don't want to default to DDC:
修改處:
HorizSync 30.0 - 70.0
VertRefresh 50.0 - 150.0
Option "DPMS"
EndSection
Section "Screen"
Identifier "Screen0"
Device "Card0"
Monitor "Monitor0"
修改處:
DefaultDepth 24
SubSection "Display"
Viewport 0 0
Depth 24
Modes "1024x768"
EndSubSection
復制xorg.conf.new文件到/etc/X11重命名為xorg.conf
#cp /root/xorg.conf.new /etc/X11/xorg.conf
到這步雖然可以啟動X windows,但還沒有安裝字體,無法工作。

(4)、漢化KDE
a、安裝i18n本地化,中文是kde-i18n-zh_CN。
#cd /usr/ports/chinese/kde3-i18n-zh_CN
#make install clean
漢化KOffice
#cd /usr/ports/chinese/koffice-i18n-zh_CN
#make install clean
b、安裝字體工具ttmkfdir
#cd /usr/ports/X11-fonts/ttmkfdir
#make install clean
c、獲取simsun字體,復制到/usr/X11R6/lib/X11/fonts/TrueType目錄下
可從win下復制,win下是simsun.ttc文件
#mount_msdosfs -L zh_CN.GBK /dev/ad0s1 /mnt/winc
#mkdir -p /usr/X11R6/lib/X11/fonts/TrueType
#cp simsun.ttc /usr/X11R6/lib/X11/fonts/TrueType/simsun.ttf
注:掛載win分區大全
#mount_msdosfs -L zh_CN.GBK /dev/設備 /mnt/掛載點 (fat格式)
#mount_ntfs -C GBK /dev/設備 /mnt/掛載點 (ntfs格式)
#mount_cd9660 -C GBK /dev/設備 /cdrom
d、創建fonts.dir
#cd /usr/X11R6/lib/X11/fonts/TrueType
#ttmkfdir >fonts.dir
#cp fonts.dir fonts.fonts.scale
刷新字體:
#fc-cache -f -v
e、修改/etc/X11/xorg.conf
注釋掉:
#Load "record"
#Load "freetype"
#Load "type1"
添加:
Section "Files"
FontPath "/usr/X11R6/lib/X11/fonts/TrueType/"
f、修改/usr/X11R6/etc/fonts/fonts.conf
# ee /usr/X11R6/etc/fonts/fonts.conf
在相應位置添加:
<dir>/usr/X11R6/lib/X11/fonts/TrueType</dir>

<match target="pattern">
<test qual="any" name="size" compare="1">
<int>12</int>
</test>
<edit name="antialias" mode="assign">
<bool>fales</bool>
</edit>
</match>

(5)、啟動kde配置
#echo “exec startkde” > ~/.xinitrc
注:由於本人不喜歡從kdm啟動X windows,如果要從kdm或xdm進入,請編輯/etc/ttys
#ee /etc/ttys
修改:
tty8 "/usr/local/bin/xdm-nodaemon" xterm off secare

tty8 "/usr/local/bin/xdm-nodaemon" xterm on secare

tty8 "/usr/local/bin/kdm-nodaemon" xterm on secare
kdm 默認不讓root登陸,要想root登陸,請修改:
AllowRootLogin=flase => ALLowRootLogin=true
(6)、設置中文
a、在kde控制中心的“區域與輔助功能”(Regional&Accessiblity)的國家/地區語言(Contry/Re。。&lang。。)裡面設國家為“china”和語言為“簡體中文”(Simplifiled Chinese)
b、在外觀與主題的字體裡設置字體為simsun 12,並去掉“使用字體平滑”

(四)、安裝中文輸入法
(1)、終端下的輸入法CCE
#cd /usr/ports/chinese/cce
#make install clean
(2)、fcitx輸入法
a、安裝
#cd /usr/ports/chinese/fcitx
#make install clean
b、修改~/.profile文件添加:
LANG=zh_CN.eucCN
LC_ALL=zh_CN.eucCN
export LANG LC_ALL
c、設置變量
CSH:
setenv LANG zh_CN.eucCN
setenv LC_ALL zh_CN.eucCN
SH/BASH:
LANG=zh_CN.eucCN
LC_ALL=zh_CN.eucCN
d、修改~/.cshrc添加:
setenv LANG zh_CN.eucCN
setenv LC_ALL zh_CN.eucCN
setenv XMODIFIERS @im=fcitx
SH/BASH: 修改~/.shrc?或~/.bash添加:
LANG=zh_CN.eucCN
LC_ALL=zh_CN.eucCN
export XMODIFIERS='@im=fcitx'
e、修改~/.xinitrc?在開頭(即exec startkde前面)添加:
exec fcitx&
f、進入X windows輸入命令
#qtconfig
然後選擇 -> Interface -> XIM Input Style -> 選中 -> Over the sport(上面的復選框也選上) -> file -> save
注:顯示fcitx字體信息:
#cd /usr/ports/chinese/fcitx
#cat pkg-message

(五)、安裝bt下載工具
#cd /usr/ports/net/py-bittorrent
#make install clean

(六)、安裝網絡聊天工具gaim-openq
#cd /usr/ports/net-im/gaim-openq
#make install clean
安裝kde下的qq聊天軟件EVA(推薦)
#cd /usr/ports/net-im/eva
#make extract
#make install clean

(七)、多媒體工具
a、MP3播放器Xmms
#cd /usr/ports/multimedia/xmms
#make install clean
#cd /usr/ports/multimedia/xmms-skins
#make install clean
漢化Xmms字體設置
選擇項 -> 首選項 -> 字體 -> 選上“使用字體集和使用X字體”兩項 -> 置換字體設置為:
-sony-*-*-*-*-*-16-*-*-*-*-*-iso8859-0,-*-*-*-*-*-*-16-*-*-*-*-*-gbk-1
b、rm與rmvb等格式播放器kaffeine
#cd /usr/ports/multimedia/kaffeine
#make install clean
#cd /usr/ports/multimedia/win32-codecs
#make install clean
讓Noatun播放rmvb
#cd /usr/ports/multimedia/xine_artsplugin
#make install clean


(八)、安裝flash插件
#cd /usr/ports/www/linuxpluginwrapper
#make install clean
打開konqueror -> 設置 -> 插件 -> 新建 - /usr/local/lib/pluginwrapper

Copyright © Linux教程網 All Rights Reserved