freebsd:basic
差異處
這裏顯示兩個版本的差異處。
| 兩邊的前次修訂版前次修改 下次修改 | 前次修改 | ||
| freebsd:basic [2007/08/07 21:30] – sshd wenpei | freebsd:basic [2011/04/28 01:17] (目前版本) – wenpei | ||
|---|---|---|---|
| 行 1: | 行 1: | ||
| ====== SSHD ====== | ====== SSHD ====== | ||
| + | 啟動系統內建的 SSH Server | ||
| # vim / | # vim / | ||
| + | 增加一行: | ||
| sshd_enable=" | sshd_enable=" | ||
| 行 7: | 行 9: | ||
| ====== .cshrc ====== | ====== .cshrc ====== | ||
| + | 安裝 gnuls | ||
| + | # cd / | ||
| + | |||
| < | < | ||
| + | alias ls gnuls --color=auto | ||
| + | |||
| setenv | setenv | ||
| setenv | setenv | ||
| 行 45: | 行 52: | ||
| WITH_CHARSET=utf8 | WITH_CHARSET=utf8 | ||
| WITH_XCHARSET=complex | WITH_XCHARSET=complex | ||
| + | </ | ||
| + | |||
| + | ====== pkg_add ====== | ||
| + | 如果執行 pkg_add -r xxxxxx 時出現: | ||
| + | < | ||
| + | Error: FTP Unable to get ftp:// | ||
| + | pkg_add: unable to fetch ' | ||
| + | </ | ||
| + | |||
| + | 代表套件庫裡面找不到檔案,可先到 ftp:// | ||
| + | # setenv PACKAGESITE ftp:// | ||
| + | 將 X 替換成適合的值 | ||
| + | |||
| + | 來更換預設的套件下載站。 | ||
| + | |||
| + | ====== portupgrade ====== | ||
| + | ===== 換版本分之 ===== | ||
| + | 原本一直使用的主要版本,有可能會因為版本大更新,而做出一個分支,但是不想要換太大,可以透過 portupgrade 來切換到分支版本。例如:postfix 分支從 2.6 升級到 2.8,並且另外獨立了一個 postfix26 分支出來,此時可透過 | ||
| + | |||
| + | portupgrade -o mail/ | ||
| + | |||
| + | 指令,將 postfix 的版本維持在 2.6 版。 | ||
| + | |||
| + | 另外,由 php5 要保持在 php52,要升級的套件非常龐大,可以利用別人寫好的 bash 語法來完成: | ||
| + | |||
| + | for d in `portversion -vL= | grep php5 | awk ' | ||
| + | |||
| + | 會產生所有需要升級的指令,將結果複製貼上去執行就可以了! | ||
| + | |||
| + | ====== Port 安裝時 MD5/SHA256 錯誤 ====== | ||
| + | 如果在 Ports 編譯時,出現類似訊息: | ||
| + | < | ||
| + | # make | ||
| + | ===> | ||
| + | => No MD5 checksum recorded for python/ | ||
| + | => No SHA256 checksum recorded for python/ | ||
| + | => No suitable checksum found for python/ | ||
| + | *** Error code 1 | ||
| + | |||
| + | Stop in / | ||
| + | </ | ||
| + | |||
| + | 代表 / | ||
| + | |||
| + | 根據出現錯誤的套件,刪除相對的檔案。 | ||
| + | |||
| + | ====== vimrc ====== | ||
| + | < | ||
| + | set nocompatible | ||
| + | |||
| + | " Vim5 and later versions support syntax highlighting. Uncommenting the next | ||
| + | " line enables syntax highlighting by default. | ||
| + | syntax on | ||
| + | set nu | ||
| + | |||
| + | """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" | ||
| + | " Text options | ||
| + | """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" | ||
| + | set noexpandtab | ||
| + | set shiftwidth=4 | ||
| + | set softtabstop=4 | ||
| + | set tabstop=4 | ||
| + | set backspace=2 | ||
| + | set formatoptions+=mM " so that vim can reformat multibyte text(eg. Chinese) | ||
| + | |||
| + | set enc=utf-8 | ||
| + | set fileencoding=utf-8 | ||
| + | set termencoding=big5 | ||
| + | |||
| + | " Favorite file types | ||
| + | set ffs=unix, | ||
| + | nmap < | ||
| + | nmap < | ||
| + | |||
| + | " If using a dark background within the editing area and syntax highlighting | ||
| + | " turn on this option as well | ||
| + | set background=dark | ||
| + | |||
| + | " Uncomment the following to have Vim jump to the last position when | ||
| + | " reopening a file | ||
| + | if has(" | ||
| + | au BufReadPost * if line("' | ||
| + | \| exe " | ||
| + | endif | ||
| + | |||
| + | " Uncomment the following to have Vim load indentation rules according to the | ||
| + | " detected filetype. Per default Debian Vim only load filetype specific | ||
| + | " plugins. | ||
| + | if has(" | ||
| + | filetype indent on | ||
| + | endif | ||
| + | |||
| + | " The following are commented out as they cause vim to behave a lot | ||
| + | " differently from regular Vi. They are highly recommended though. | ||
| + | set showcmd | ||
| + | "set showmatch | ||
| + | "set ignorecase | ||
| + | "set smartcase | ||
| + | "set incsearch | ||
| + | "set autowrite | ||
| + | "set hidden | ||
| + | "set mouse=a | ||
| + | set ruler | ||
| + | |||
| + | |||
| + | """""""""""""""""""""""""""""" | ||
| + | " Status line | ||
| + | """""""""""""""""""""""""""""" | ||
| + | set laststatus=2 | ||
| + | |||
| + | "func! CurDir() | ||
| + | " | ||
| + | " | ||
| + | |||
| + | " Format the status line | ||
| + | "set statusline=\ %F%m%r%h\ %w\ \ CWD:\ %r%{CurDir()}%h\ \ \ Line:\ %l/%L | ||
| + | set statusline=\ %F%m%r%h\ %w\ [%{& | ||
| </ | </ | ||
freebsd/basic.1186493431.txt.gz · 上一次變更: 由 wenpei
