你好,游客 登录 注册 搜索
背景:
阅读新闻

FreeBSD10.1安装过程图解

[日期:2016-07-06] 来源:Linux社区  作者:Linux [字体:大 中 小]
root@lsgxbsd:~ #   vi ~/.tmux.conf
-------------------------------------------------------------
#
# author   : lsgx <lsgxthink@gmail.com>
# modified : 2014-11-12
#
 
#-- base settings --#
set -g default-terminal "screen-256color"  # 设置终端缺省的支持颜色为256色
set -g display-time 3000     # 提示信息的持续时间;设置足够的时间以避免看不清提示,单位为毫秒
set -g escape-time 0    # 等待时间的持续时间;设置越小越好
set -g history-limit 65535    # 历史记录条数的最大限制值
#set -g base-index 1    # 窗口的初始序号;默认为0,这里设置为1
#set -g pane-base-index 1    # 面板的初始序号;默认为0,这里设置为1
#set -sg repeat-time 600    # 控制台激活后的持续时间;设置合适的时间以避免每次操作都要先激活控制台,单位为毫秒
#set -s quiet on
#setw -g xterm-keys on
 
#-- bindkeys --#
 
# prefix key (Ctrl+a)    # 将激活控制台的快捷键由Ctrl+b修改为Ctrl+a
set -g prefix ^a
unbind ^b
bind a send-prefix
 
# split window    # 窗口分割
unbind '"'
bind - splitw -v # vertical split (prefix -)    # 上下分割窗口
unbind %
bind | splitw -h # horizontal split (prefix |)    # 左右分割窗口
 
# select pane    # 选择面板
bind k selectp -U # above (prefix k)    # 选择上面板
bind j selectp -D # below (prefix j)    # 选择下面板
bind h selectp -L # left (prefix h)    # 选择左面板
bind l selectp -R # right (prefix l)    # 选择右面板
 
# resize pane
bind -r ^k resizep -U 2 # upward (prefix Ctrl+k)    # 当前面板上移2
bind -r ^j resizep -D 2 # downward (prefix Ctrl+j)    # 当前面板下移2
bind -r ^h resizep -L 2 # to the left (prefix Ctrl+h)    # 当前面板左移2
bind -r ^l resizep -R 2 # to the right (prefix Ctrl+l)    # 当前面板右移2
 
# swap pane
bind ^u swapp -U # swap with the previous pane (prefix Ctrl+u)    # 与上面板交换
bind ^d swapp -D # swap with the next pane (prefix Ctrl+d)    # 与下面板交换
 
# create new session
bind C-c new-session    # 创建一个新的会话
 
# control sessions
bind z kill-session    # 结束当前会话
 
# find session
bind C-f command-prompt -p find-session 'switch-client -t %%'    # 查找会话
 
# clear both screen and history
#bind -n C-l send-keys C-l \; run 'tmux clear-history'    # 清空屏幕内容和历史记录
 
# reload config (prefix r)
bind r source ~/.tmux.conf \; display "Configuration reloaded!"    # 重新加载配置文件
 
# misc
bind e lastp  # select the last pane (prefix e)    # 选择最后一个面板
bind ^e last  # select the last window (prefix Ctrl+e)    # 选择最后一个窗口
bind q killp  # kill pane (prefix q)    # 关闭当前面板
bind ^q killw # kill window (prefix Ctrl+q)    # 关闭当前窗口
 
 
# app
bind ! splitw htop                                     # htop (prefix !)
bind m command-prompt "splitw 'exec man %%'"           # man (prefix m)
bind @ command-prompt "splitw 'exec perldoc -t -f %%'" # perl func (prefix @)
bind * command-prompt "splitw 'exec perldoc -t -v %%'" # perl var (prefix *)
bind % command-prompt "splitw 'exec perldoc -t %%'"    # perl doc (prefix %)
bind / command-prompt "splitw 'exec ri %%'"            # ruby doc (prefix /)
 
 
#-- statusbar --#
set -g status-utf8 on    # 开启状态栏的UTF-8支持
set -g status-interval 1    # 状态栏的分辨时间间隔
set -g status-keys vi    # 操作状态栏时的默认键盘布局;可以设置为vi或emacs
set -g visual-activity on    # 开启窗口操作的可视
set -g set-clipboard on    # 开启剪切板
set -g display-panes-time 800 # slightly longer pane indicators display time    # 稍长的窗格中显示的时间指标
set -g display-time 1000      # slightly longer status messages display time    # 稍长的状态消息的显示时间
set -g renumber-windows on    # renumber windows when a window is closed    # 关闭窗口后重新编号
 
setw -g automatic-rename on    # rename window to reflect current program    # 重命名窗口,以反映当前的程序
setw -g utf8 on    # 开启窗口的UTF-8支持
setw -g monitor-activity on    # 开启窗口活动监视
setw -g mode-keys vi    # 复制模式中的默认键盘布局;可以设置为vi或emacs
setw -g clock-mode-style 24 # 24 hour clock    # 24小时显示方式
#setw -g mode-mouse on    # 开启鼠标模式
 
# copy mode
bind Enter copy-mode # enter copy mode    # 按Enter进入复制模式
bind b list-buffers  # list paster buffers    # 复制缓冲区列表
bind p paste-buffer  # paste from the top pate buffer    # 粘贴最后复制的缓冲区内容
bind P choose-buffer # choose which buffer to paste from    # 选择粘贴缓冲区
 
# the following vi-copy bindings match my vim settings
# see https://github.com/gpakosz/.vim.git
bind -t vi-copy v begin-selection    # 复制模式下开始选取
bind -t vi-copy C-v rectangle-toggle    # 复制模式下矩形选取
bind -t vi-copy y copy-selection    # 复制模式下复制选取的内容
bind -t vi-copy Escape cancel    # 复制模式下退出复制模式
bind -t vi-copy H start-of-line    # 复制模式下开始行选取
bind -t vi-copy L end-of-line    # 复制模式下结束行选取
 
# mouse resize selcet
#setw -g mouse-resize-pane on    # 鼠标调整面板大小
#setw -g mouse-select-pane on    # 鼠标选择面板
#setw -g mouse-select-window on    # 鼠标选择窗口
 
# move x clipboard into tmux paste buffer
bind C-p run "tmux set-buffer \"$(xclip -o -sel clipbaord)\"; tmux paste-buffer" 
# move tmux copy buffer into x clipboard
bind C-y run "tmux show-buffer | xclip -i -sel clipbaord"
 
 
#-- colorscheme --#
# see also: https://github.com/daethorian/conf-tmux/blob/master/colors/zenburn.conf
 
# modes
setw -g clock-mode-colour colour223
setw -g mode-attr bold
setw -g mode-fg colour223
setw -g mode-bg colour235
 
# panes
set -g pane-border-bg colour234
set -g pane-border-fg colour234
set -g pane-active-border-bg colour232
set -g pane-active-border-fg colour232
 
 
# statusbar
set -g status-justify centre
set -g status-bg colour235
set -g status-fg colour248
set -g status-attr dim
 
set -g status-left "#[fg=green,bright]Session: #S #[fg=yellow,bright]Window: #I #[fg=cyan,bright]Pane: #P"
set -g status-left-attr bright
set -g status-left-length 30
set -g status-right "#[fg=yellow,bright][ #[fg=cyan,bright]#W #[fg=yellow,bright]]#[default] #[fg=yellow,bright]- %Y.%m.%d #[fg=green,bright]%H:%M #[default]"
set -g status-right-attr bright
set-option -g status-right-length 30
 
setw -g window-status-current-fg colour223
setw -g window-status-current-bg colour237
setw -g window-status-current-attr bold
#setw -g window-status-current-format "#I:#W#F"
 
#setw -g window-status-alert-attr bold
#setw -g window-status-alert-fg colour255
#setw -g window-status-alert-bg colour160
 
# messages
set -g message-attr bold
set -g message-fg colour223
set -g message-bg colour235
 
--------------------------------------------------------------------
 
root@lsgxbsd:~ # chmod u+ws /usr/local/bin/xterm 
root@lsgxbsd:~ # ls -alh /usr/local/bin/xterm
-rwsr-xr-x  1 root  wheel   525K  4  9 00:55 /usr/local/bin/xterm
 
root@lsgxbsd:~ # vi ~/.Xresources 
root@lsgxbsd:~ # cat ~/.Xresources 
----------------------------------------------------------
!------------------------------------------ 
! XTerm 
!------------------------------------------ 
XTerm*termName:                 xterm-color 
XTerm*visualBell:               false 
XTerm*marginBell:               false 
XTerm*alwaysHighlight:          false 
XTerm*cursorBlink:              true 
XTerm*cursorOffTime:            450 
XTerm*cursorOnTime:             900 
XTerm*highlightSelection:       true 
XTerm*saveLines:                8192 
XTerm*foreground:               rgb:a8/a8/a8 
XTerm*background:               rgb:00/00/00 
XTerm*color0:                   rgb:00/00/00 
XTerm*color1:                   rgb:a8/00/00 
XTerm*color2:                   rgb:00/a8/00 
XTerm*color3:                   rgb:a8/54/00 
XTerm*color4:                   rgb:00/00/a8 
XTerm*color5:                   rgb:a8/00/a8 
XTerm*color6:                   rgb:00/a8/a8 
XTerm*color7:                   rgb:a8/a8/a8 
XTerm*color8:                   rgb:54/54/54 
XTerm*color9:                   rgb:fc/54/54 
XTerm*color10:                  rgb:54/fc/54 
XTerm*color11:                  rgb:fc/fc/54 
XTerm*color12:                  rgb:54/54/fc 
XTerm*color13:                  rgb:fc/54/fc 
XTerm*color14:                  rgb:54/fc/fc 
XTerm*color15:                  rgb:fc/fc/fc 
XTerm*scrollBar:                true 
XTerm*rightScrollBar:           true 
XTerm*scrollKey:                false 
XTerm*scrollTtyOutput:          false 
XTerm*loginShell:               false 
XTerm*locale:                   true 
XTerm*eightBitInput:            false 
XTerm*eightBitOutput:           true 
XTerm*metaSendEscape:           true 
XTerm*faceName:                 Bitstream Vera Sans Mono 
XTerm*faceSize:                 14 
XTerm*faceNameDoublesize:       WenQuanYi Bitmap Song 
XTerm*mkWidth:                  false 
XTerm*charClass: 33:48,36-47:48,58-59:48,61:48,63-64:48,95:48,126:48
 
----------------------------------------------------------------------------
root@lsgxbsd:~ # xrdb ~/.Xresources 
 
git设置
lsgx@lsgxbsd:~$  ssh-keygen -t rsa -C "lsgxthink@163.com"
Generating public/private rsa key pair.
Enter file in which to save the key (/home/lsgx/.ssh/id_rsa):  .ssh/id_rsa_oschina
Enter passphrase (empty for no passphrase): 
Enter same passphrase again: 
Your identification has been saved in .ssh/id_rsa_oschina.
Your public key has been saved in .ssh/id_rsa_oschina.pub.
The key fingerprint is:
e5:a9:f3:34:75:f0:13:7a:8b:85:93:6d:64:25:e5:d1 lsgxthink@163.com
The key's randomart image is:
+--[ RSA 2048]----+
|              .o+|
|               +E|
|          . . + .|
|         o . X . |
|        S o * O  |
|         . . B o |
|        o o . .  |
|         + .     |
|          .      |
+-----------------+
 
lsgx@lsgxbsd:~$ cat ~/.ssh/id_rsa_oschina.pub 
-------------------------------------------------------------------------------------
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDomBJmpUJzWs3MD2AuEfimP/Hc40Lxk9B+7IZEteUjOe4v/1q/W1uK7FqOvKWRVBfZmHdPZ0FilHvKUY4W+DCQ+O9B5l/y0Qy4om05S8SjQp147b4XSSFiNtei98MW/UX0EHRaT410/aV/NPSt9u2k5g3N0Bn/Rf4N1WeSie9VB9FQEnD5YHNAMK5H5QhxC/F+NE/x6kMEdKhVJ6YDNzEO5sqMPk4ybwttU2W1VjWun/tU8qqRsGqhqaaZeUTNboXlFOmzbPg4AoF/yAe65FAoDkQXVkxLLDM0hMeYYTH9bwB7cGasEq08pt/i2VFdtSNtp0jO+50WtXaUb2pLr55X lsgxthink@163.com
--------------------------------------------------------------------------------------
 
lsgx@lsgxbsd:~$  ssh -T git@git.oschina.net
-----------------------------------------------------------------------------------------
Welcome to Git@OSC, lsgx!
--------------------------------------------------------------------------------------------
 
 
lsgx@lsgxbsd:~$  ssh-keygen -t rsa -C "lsgxthink@gmail.com"
Generating public/private rsa key pair.
Enter file in which to save the key (/home/lsgx/.ssh/id_rsa):  .ssh/id_rsa_github
Enter passphrase (empty for no passphrase): 
Enter same passphrase again: 
Your identification has been saved in .ssh/id_rsa_github.
Your public key has been saved in .ssh/id_rsa_github.pub.
The key fingerprint is:
bc:4d:26:b0:7b:e5:28:f5:23:98:ec:1d:8e:e6:4b:62 lsgxthink@gmail.com
The key's randomart image is:
+--[ RSA 2048]----+
|                 |
|                 |
|      .          |
|       +         |
|      . S +      |
|     . = @       |
|    E B * =      |
|   . +.* o .     |
|     o=.o        |
+-----------------+
 
lsgx@lsgxbsd:~$ cat ~/.ssh/id_rsa_github.pub 
-------------------------------------------------------------------------------------
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQClYiH9urgZS/0it8hZWTwTXT8yf5e3fI6AzXsKOchAgueoEOndle8NHfeRP/smfHXmMeq3V6nH2zSTKsltlGInqJS1qBPaEdr0AsBBXVU5HWuHKJ0I/cISt0ZH1qxIqDq4u+mBQm0OQ3EWvYoA71lyFX6AhES9U1OfCp3BZ1aU6Ya9QdEzYYW2LQIL1k5ZgPbG6oKY+40PG9B8gTeRAMkltQmSZAbjzBE6vs/zoEW/pUEOwr8SsXzrX4FNuK/Y+8Gfy1bOxpwESVNDa8bYlKYKY+s4RyHUoCQsO1/O4V9Dr2Zlrul3CCwarQnsVB1YVOmavrXOZzVnGTWo+q4RtUov lsgxthink@gmail.com
--------------------------------------------------------------------------------------
 
lsgx@lsgxbsd:~$  ssh -T git@github.com
-----------------------------------------------------------------------------------------
Hi lsgxeva! You've successfully authenticated, but GitHub does not provide shell access.
--------------------------------------------------------------------------------------------
 
root@lsgxbsd:~ #  vi ~/.ssh/config 
root@lsgxbsd:~ #  cat ~/.ssh/config 
-------------------------------------------------
# add git ssh setting
 
# github git setting
Host github
  HostName github.com
  User lsgxeva
  IdentityFile ~/.ssh/id_rsa_github
 
# oschina git setting
Host oschina
  HostName git.oschina.net
  User lsgx
  IdentityFile ~/.ssh/id_rsa_oschina
 
------------------------------------------------------
 
lsgx@lsgxbsd:~$  ssh-agent csh
lsgx@lsgxbsd:~$  ssh-add ~/.ssh/id_rsa_github
Identity added: /home/lsgx/.ssh/id_rsa_github (/home/lsgx/.ssh/id_rsa_github)
lsgx@lsgxbsd:~$  ssh-add ~/.ssh/id_rsa_oschina
Identity added: /home/lsgx/.ssh/id_rsa_oschina (/home/lsgx/.ssh/id_rsa_oschina)
 
lsgx@lsgxbsd:~$  ssh -T git@oschina
-----------------------------------------------------------------------------------------
Welcome to Git@OSC, lsgx!
--------------------------------------------------------------------------------------------
 
lsgx@lsgxbsd:~$  ssh -T git@github
-----------------------------------------------------------------------------------------
Hi lsgxeva! You've successfully authenticated, but GitHub does not provide shell access.
--------------------------------------------------------------------------------------------
 
root@lsgxbsd:~ #  vi /etc/rc.conf
------------------------------------------------------
# git daemon
git_daemon_enable="YES"
 
------------------------------------------------------
 
 
lsgx@lsgxbsd:~$  cat ~/.gitconfig 
------------------------------------------------------------------------------------
[user]
email = lsgxthink@163.com
name = lsgx
 
[core]
editor = vim
 
[color]
status = auto
branch = auto
diff = auto
ui = true
pager = true
[color "branch"]
current = yellow reverse
local = yellow
remote = green
[color "diff"]
meta = yellow bold
frag = magenta bold
old = red bold
new = green bold
[color "status"]
added = yellow
changed = green
untracked = cyan
 
[alias]
co = checkout
ci = commit
br = branch
st = status
unstage = reset HEAD
last = log -1 HEAD
lg = log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit
 
--------------------------------------------------------------------------------------------------------------
 
 
lsgx@lsgxbsd:~/work/code/demo$  cat .gitignore 
---------------------------------------------------------
# Project files
*.udb
 
# Object files
*.o
 
# Libraries
*.lib
*.a
 
# Shared objects (inc. Windows DLLs)
*.dll
*.so
*.so.*
*.dylib
 
# Executables
*.exe
*.out
*.app
*_elf
*.elf
 
# Log files
*.log
 
# Core dump files
*.core
 
# swap files
*.swp
*.gmon
 
---------------------------------------------
 
 
root@lsgxbsd:~ #  pkg install htop
root@lsgxbsd:~ #  htop
 
root@lsgxbsd:~ #  pkg install iftop
root@lsgxbsd:~ #  iftop -i em0 -pP
 
root@lsgxbsd:~ #  pkg install bsdinfo
 
root@lsgxbsd:~ #  vi ~/.cshrc
root@lsgxbsd:~ #  cat ~/.cshrc
------------------------------------------
# $FreeBSD: releng/10.2/etc/root/dot.cshrc 243893 2012-12-05 13:56:39Z eadler $
#
# .cshrc - csh resource script, read at beginning of execution by each shell
#
# see also csh(1), environ(7).
# more examples available at /usr/share/examples/csh/
#
 
alias h history 25
alias j jobs -l
alias la ls -aF
alias lf ls -FA
alias ll ls -lAF
alias vi vim
 
# A righteous umask
umask 22
 
#set path = (/sbin /bin /usr/sbin /usr/bin /usr/games /usr/local/sbin /usr/local/bin $HOME/bin)
 
setenv EDITOR vi
setenv PAGER more
setenv BLOCKSIZE K
 
if ($?prompt) then
# An interactive shell -- set some stuff up
set prompt = "%N@%m:%~ %# "
set promptchars = "%#"
 
set filec
set history = 1000
set savehist = (1000 merge)
set autolist = ambiguous
# Use history to aid expansion
set autoexpand
set autorehash
set mail = (/var/mail/$USER)
if ( $?tcsh ) then
bindkey "^W" backward-delete-word
bindkey -k up history-search-backward
bindkey -k down history-search-forward
endif
 
endif
 
# Beginning of the block added by the lsgx - DO NOT EDIT
#setenv PACKAGEROOT "ftp://ftp.freebsdchina.org"
setenv PACKAGEROOT "ftp://ftp.tw.freebsd.org"
#setenv PACKAGEROOT "ftp://ftp.cn.freebsd.org"
#setenv PACKAGESITE "http://mirrors.aliyun.com/freebsd/releases/amd64/10.2-RELEASE/packages/Latest/"
 
# openjdk env setting by csh
setenv JAVA_HOME /usr/local/openjdk6
setenv JRE_HOME /usr/local/openjdk6/jre
setenv CLASSPATH .:$JAVA_HOME/lib:$JRE_HOME/lib:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar:$JRE_HOME/lib/rt.jar
set path = (/sbin /bin /usr/sbin /usr/bin /usr/games /usr/local/sbin /usr/local/bin $HOME/bin $JAVA_HOME/bin $JRE_HOME/bin)
 
# End of the block added by the lsgx
 
------------------------------------------
 
设置屏保和分辨率
root@lsgxbsd:~ #  vi /boot/loader.conf
root@lsgxbsd:~ #  cat /boot/loader.conf
--------------------------------------------------------------------
kern.geom.label.gptid.enable="0"
zfs_load="YES"
 
# Beginning of the block added by the lsgx - DO NOT EDIT
 
splash_bmp_load="YES"
splash_pcx_load="NO"
vesa_load="YES"
#daemon_saver_load="YES"
bitmap_load="YES"
bitmap_name="/boot/daemon.bmp"
bitmap_type="splash_image_data"
 
# End of the block added by the lsgx
------------------------------------------------------
 
root@lsgxbsd:~ # vidcontrol -i mode | grep G
root@lsgxbsd:~ # vi /etc/rc.conf
root@lsgxbsd:~ # cat /etc/rc.conf
----------------------------------------------------------------------
# Beginning of the block added by the lsgx - DO NOT EDIT
 
hald_enable="YES"
dbus_enable="YES"
avahi_daemon_enable="YES"
avahi_dnsconfd_enable="YES"
slim_enable="YES"
 
saver="YES"
allscreens_flags="MODE_332"
blanktime="10"
 
# kldunload linux 
# options COMPAT_LINUX 
linux_enable="YES"
 
# smartmontools configure
smartd_enable="YES"
 
# End of the block added by the lsgx
 
-------------------------------------------------------------
root@lsgxbsd:~ #  sh /etc/rc 
 
 
关闭虚拟机,更改配置文件
-----------------------------------------
mks.enable3d = "TRUE"
 
svga.autodetect = "FALSE"
svga.maxWidth = "1366"
svga.maxHeight = "768"
svga.vramSize = "134217728"
----------------------------------------
 
 
本地化
root@lsgxbsd:~ # locale
LANG=
LC_CTYPE="C"
LC_COLLATE="C"
LC_TIME="C"
LC_NUMERIC="C"
LC_MONETARY="C"
LC_MESSAGES="C"
LC_ALL=
 
root@lsgxbsd:~ # vi ~/.cshrc
root@lsgxbsd:~ # cat ~/.cshrc
---------------------------------------------------------
# Beginning of the block added by the lsgx - DO NOT EDIT
#setenv PACKAGEROOT "ftp://ftp.freebsdchina.org"
setenv PACKAGEROOT "ftp://ftp.tw.freebsd.org"
#setenv PACKAGEROOT "ftp://ftp.cn.freebsd.org"
#setenv PACKAGESITE "http://mirrors.aliyun.com/freebsd/releases/amd64/10.2-RELEASE/packages/Latest/"
 
setenv LANG         zh_CN.UTF-8
setenv LC_CTYPE     zh_CN.UTF-8
setenv LC_ALL       zh_CN.UTF-8
 
# openjdk env setting by csh
setenv JAVA_HOME /usr/local/openjdk6
setenv JRE_HOME /usr/local/openjdk6/jre
setenv CLASSPATH .:$JAVA_HOME/lib:$JRE_HOME/lib:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.
jar:$JRE_HOME/lib/rt.jar
set path = (/sbin /bin /usr/sbin /usr/bin /usr/games /usr/local/sbin /usr/local/bin $HOME/b
in $JAVA_HOME/bin $JRE_HOME/bin)
 
# End of the block added by the lsgx
 
---------------------------------------------
 
全局ls高亮设置
root@lsgxbsd:~ #  cat /etc/csh.cshrc
-------------------------------------------------------------------------------------
# Beginning of the block added by the lsgx - DO NOT EDIT
 
setenv LSCOLORS ExGxFxdxCxegedabagExEx
setenv CLICOLOR yes
 
setenv GREP_OPTIONS --color=auto
 
# End of the block added by the lsgx
 
-------------------------------------------------------------------------------------------
root@lsgxbsd:~ #  source /etc/csh.cshrc
 
 
安装fcitx输入法
# pkg install zh-fcitx-googlepinyin
 
Updating FreeBSD repository catalogue...
FreeBSD repository is up-to-date.
All repositories are up-to-date.
pkg: linux-c6 has a missing dependency: linux-c6-flashplugin
The following 9 package(s) will be affected (of 0 checked):
 
New packages to be INSTALLED:
zh-fcitx-googlepinyin: 0.1.6
zh-libgooglepinyin: 0.1.2
zh-fcitx: 4.2.8.6_1
qt4-inputmethods: 4.8.6
qt4-gui: 4.8.6_5
xdg-utils: 1.0.2.20130919_1
qt4-corelib: 4.8.6_5
qt4-dbus: 4.8.6_1
qt4-xml: 4.8.6_1
 
The process will require 59 MiB more space.
13 MiB to be downloaded.
 
 
Message for qt4-corelib-4.8.6_5:
======================================================================
 
Qt 4 can be built with optional support for:
 - Common UNIX Printing System (CUPS) (enabled by default)
 - Network Audio System (NAS)
 - Qt style that renders using GTK (QGTKSTYLE)
 
In order to enable them, you have to add
QT4_OPTIONS=CUPS NAS QGTKSTYLE
to your /etc/make.conf and compile devel/qt4-corelib and
x11-toolkits/qt4-gui ports.
 
Attention! Whenever you change the QT4_OPTIONS both
devel/qt4-corelib and x11-toolkits/qt4-gui ports must be rebuilt!
 
======================================================================
Message for qt4-gui-4.8.6_5:
======================================================================
 
Qt paint engine makes common use of shared memory. To avoid MIT-SHM
errors (i.e., blank windows), you probably need to raise shared memory
limits in loader.conf(5). The following should be safe values for the
KDE Plasma Desktop:
 
kern.ipc.shmall=32768
kern.ipc.shmmni=1024
kern.ipc.shmseg=1024
 
======================================================================
Message for zh-fcitx-4.2.8.6_1:
************************************************************************
 
Remember to set the environment variable XMODIFIERS:
 
csh/tcsh:setenv XMODIFIERS @im=fcitx
sh/bash:export XMODIFIERS='@im=fcitx'
 
For GTK+ programs, you may want to set:
 
csh/tcsh:setenv GTK_IM_MODULE fcitx
setenv GTK3_IM_MODULE xim
sh/bash:export GTK_IM_MODULE=fcitx
export GTK3_IM_MODULE=xim
 
For Qt4 programs, we recommend you to use
 
qtconfig-qt4: /usr/ports/misc/qt4-qtconfig
 
instead of to manually set QT4_IM_MODULE.
 
To start fcitx with your desktop, just
 
cp /usr/local/share/applications/fcitx.desktop \
   ~/.config/autostart/
 
************************************************************************
 
# vi ~/.cshrc
-----------------------------------------------------------------
# fcitx environment variable XMODIFIERS
setenv XMODIFIERS @im=fcitx
setenv GTK_IM_MODULE fcitx
setenv GTK3_IM_MODULE xim
-----------------------------------------------------------------
 
# vi ~/.xinitrc
-----------------------------------------------------------------
exec fcitx &
-----------------------------------------------------------------
 
 
安装vmtools
需要先安装 perl和 compat6x
root@lsgxbsd:~ #  cd /usr/ports/misc/compat6x/
root@lsgxbsd:/usr/ports/misc/compat6x #  make install clean
 
root@lsgxbsd:~ #  df -h
lsgx@lsebsd:~ % df -h
Filesystem            Size    Used   Avail Capacity  Mounted on
zroot/ROOT/default    151G    3.1G    147G     2%    /
devfs                 1.0K    1.0K      0B   100%    /dev
procfs                4.0K    4.0K      0B   100%    /proc
linprocfs             4.0K    4.0K      0B   100%    /compat/linux/proc
fdescfs               1.0K    1.0K      0B   100%    /dev/fd
procfs                4.0K    4.0K      0B   100%    /proc
zroot/tmp             147G    172K    147G     0%    /tmp
zroot/usr/home        147G    160K    147G     0%    /usr/home
zroot/usr/ports       148G    1.0G    147G     1%    /usr/ports
zroot/usr/src         148G    545M    147G     0%    /usr/src
zroot/var/audit       147G     96K    147G     0%    /var/audit
zroot/var/crash       147G     96K    147G     0%    /var/crash
zroot/var/log         147G    284K    147G     0%    /var/log
zroot/var/mail        147G    128K    147G     0%    /var/mail
zroot/var/tmp         147G     96K    147G     0%    /var/tmp
zroot                 147G     96K    147G     0%    /zroot
 
root@lsgxbsd:~ #  ls -alh /dev/ | grep cd
crw-r-----   1 root  operator   0x5a  4 16 10:33 cd0
root@lsgxbsd:~/work/vmtools #  mkdir -p ~/work/vmtools
root@lsgxbsd:~ #  mount_cd9660  /dev/cd0 /mnt/
root@lsgxbsd:~ #  cp /mnt/vmware-freebsd-tools.tar.gz ~/work/vmtools/
root@lsgxbsd:~ #  umount /mnt/
root@lsgxbsd:~/work/vmtools #  tar -zxvf vmware-freebsd-tools.tar.gz 
root@lsgxbsd:~/work/vmtools #  cd vmware-tools-distrib/
root@lsgxbsd:~/work/vmtools/vmware-tools-distrib #  ./vmware-install.pl 
------------------------------------------------------------------------------
Creating a new VMware Tools installer database using the tar4 format.
 
Installing VMware Tools.
 
In which directory do you want to install the binary files? 
[/usr/local/bin] 
 
In which directory do you want to install the startup script? 
[/usr/local/etc/rc.d] 
 
In which directory do you want to install the daemon files? 
[/usr/local/sbin] 
 
In which directory do you want to install the library files? 
[/usr/local/lib/vmware-tools] 
 
The path "/usr/local/lib/vmware-tools" does not exist currently. This program 
is going to create it, including needed parent directories. Is this what you 
want? [yes] 
 
In which directory do you want to install the documentation files? 
[/usr/local/share/doc/vmware-tools] 
 
The path "/usr/local/share/doc/vmware-tools" does not exist currently. This 
program is going to create it, including needed parent directories. Is this 
what you want? [yes] 
 
The installation of VMware Tools 9.6.2 build-1688356 for FreeBSD completed 
successfully. You can decide to remove this software from your system at any 
time by invoking the following command: 
"/usr/local/bin/vmware-uninstall-tools.pl".
 
Before running VMware Tools for the first time, you need to configure it by 
invoking the following command: "/usr/local/bin/vmware-config-tools.pl". Do you
want this program to invoke the command for you now? [yes] 
 
Initializing...
 
 
Making sure services for VMware Tools are stopped.
 
Stopping VMware Tools services in the virtual machine:
   Guest operating system daemon:                                      done
 
 
The vmblock enables dragging or copying files between host and guest in a 
Fusion or Workstation virtual environment.  Do you wish to enable this feature?
[yes] 
 
vmblock is not supported for FreeBSD 9.1 and above.
 
 
Detected X server version 1.14.7
 
 
 
Distribution provided drivers for Xorg X server are used.
 
Skipping X configuration because X drivers are not included.
 
Starting VMware Tools services in the virtual machine:
   Switching to guest configuration:                                   done
   Guest memory manager:                                              failed
   Guest operating system daemon:                                      done
Unable to start services for VMware Tools
 
Execution aborted.
 
-----------------------------------------------------------------------
root@lsgxbsd:~/work/vmtools/vmware-tools-distrib #  reboot
 
root@lsgxbsd:~ #  kldstat 
Id Refs Address            Size     Name
 1   21 0xffffffff80200000 1755658  kernel
 2    1 0xffffffff81956000 3b00     splash_bmp.ko
 3    1 0xffffffff8195a000 b580     vesa.ko
 5    1 0xffffffff81a11000 9d37     linprocfs.ko
 6    1 0xffffffff81a1b000 43bce    linux.ko
 7    1 0xffffffff81a5f000 2b58     uhid.ko
 
 
Run pkg_add open-vm-tools
Run cp /etc/pkg/share/examples/rc.d/vmtools /etc/rc.d
And add following lines to /etc/rc.conf
 
vmtools="YES"
vmware_guest_vmblock_enable="YES"
#vmware_guest_vmhgfs_enable="YES"
vmware_guest_vmmemctl_enable="YES"
vmware_guest_vmxnet_enable="YES"
vmware_guestd_enable="YES"
 
 
 
 
配置Emacs
https://github.com/redguardtoo/emacs.d
https://github.com/redguardtoo/emacs.d/archive/2.0.zip
 
 
 
FreeBSD基本目录结构简要说明
/ 文件系统的根目录。
/bin/ 在单个用户和多用户环境下的基本工具目录。
/boot/ 在操作系统在启动加载期间所用的程序和配置。
/boot/defaults/ 默认每步引导启动的配置内容,请查阅loader.conf(5)。
/dev/ 设备节点,请查阅 intro(4)。
/etc/ 系统启动的配置和脚本。
/etc/defaults/ 系统默认的启动配置和脚本,请参考 rc(8) 。
/etc/mail/ 关系到邮件系统运作的配置, 请参考 sendmail(8)。
/etc/namedb/ named 配置文件,请参考 named(8)。
/etc/periodic/ 每天、每星期和每月周期性地运行的脚本, 请通过 cron(8)查阅periodic(8)。
/etc/ppp/ ppp配置文件,请查阅ppp(8)。
/mnt/ 由管理员习惯使用挂接点的临时空目录。
/proc/ 运行中的文件系统,请参阅 procfs(5) 和 mount_procfs(8)。
/rescue/ 用于紧急恢复的一组静态联编的程序; 参见 rescue(8)。
/root/ root用户的Home(主)目录。
/sbin/ 在单个用户和多用户环境下的存放系统程序和管理所需的基本实用目录。
/tmp/ 临时文件。 /tmp 目录中的内容, 一般不会在系统重新启动之后保留。 通常会将基于内存的文件系统挂在 /tmp 上。 这一工作可以用一系列 tmpmfs 相关的 rc.conf(5) 变量来自动完成。 (或者, 也可以在 /etc/fstab 增加对应项; 参见 mdmfs(8))。
/usr/ 存放大多数用户的应用软件。
/usr/bin/ 存放实用命令,程序设计工具,和应用软件。
/usr/include/ 存放标准 C include 文件.
/usr/lib/ 存放库文件。
/usr/libdata/ 存放各种实用工具的数据文件。
/usr/libexec/ 存放系统实用或后台程序 (从另外的程序启动执行)。
/usr/local/ 存放本地执行文件, 库文件等等, 同时也是 FreeBSD ports 安装的默认安装目录。 /usr/local 在 /usr 中的目录布局大体相同, 请查阅 hier(7)。 但 man 目录例外, 它们是直接放在/usr/local 而不是 /usr/local/share 下的, 而 ports 说明文档在share/doc/port。
/usr/obj/ 通过联编 /usr/src 得到的目标文件。
/usr/ports/ 存放 FreeBSD 的 Ports Collection (可选)。
/usr/sbin/ 存放系统后台程序 和 系统工具 (由用户执行)。
/usr/share/ 存放架构独立的文件。
/usr/src/ 存放 BSD 或者本地源码文件。
/usr/X11R6/ 存放 X11R6 可执行文件、 库文件、 配置文件等的目录(可选)。
/var/ 多用途日志、 临时或短期存放的, 以及打印假脱机系统文件。 有时会将基于内存的文件系统挂在 /var 上。 这一工作可以通过在rc.conf(5) 中设置一系列 varmfs 变量 (或在 /etc/fstab 中加入一行配置; 参见 mdmfs(8)) 来完成。
/var/log/ 存放各种的系统记录文件。
/var/mail/ 存放用户mailbox(一种邮件存放格式)文件。
/var/spool/ 各种打印机和邮件系统spooling(回环)的目录。
/var/tmp/ 临时文件。 这些文件在系统重新启动时通常会保留, 除非 /var是一个内存中的文件系统。
/var/yp/ NIS 映射。
 
 
 
FreeBSD /etc/rc.conf文件语法错误导致系统变为readonly
���入以下命令
fsck -y
mount -u /
mount -a -t ufs
swapon -a
就可以编辑了
 
 
 
界面效果预览图
 
FreeBSD_10.2-2015-09-17-15-32-08.png
 
FreeBSD_10.2-2015-09-17-15-43-20.png
linux
相关资讯       FreeBSD安装  FreeBSD10.1