How to upgrade FreeBSD 11 to 12 Bsd System

How to upgrade FreeBSD 11 to 12

First note down the FreeBSD version by running the following commands: freebsd-version uname -mrs Make sure both FreeBSD base and packages are updates: freebsd-update fetch install pkg update && pkg upgrade WARNING: Make sure you backup all important data, config files, and database tables/DBS. The author is not responsible for any data loss and upgrading FreeBSD should only be attempted after backing up all data.   (more…)
How to build custom mfsbsd images. Bsd System

How to build custom mfsbsd images.

Generation of mfsbsd image You can generate your own mfsbsd image (see below) or just get one of the Testing/Beta ones from MFSBSD8. In the latter case, you will need to also download the original kernel.txz from a FreeBSD mirror site because by default mfsbsd does not include the geom_eli module and its dependencies (zlib, crypto). The generic image will just use DHCP to get all its network related data and start sshd. Just connect with the mfsroot password by...
snmpdiskio for ubuntu 13.10 LTS Bsd System

snmpdiskio for ubuntu 13.10 LTS

Step by Step: 1.sudo apt-get install snmp snmpd snmp-mibs-downloader  2.Download snmpdiskio package from "" and following README 3.Edit profiles for snmpd: 『/etc/snmp/snmpd.conf』 agentAddress udp: view systemonly included . view systemonly included . view systemonly included . extend . hdNum /usr/local/bin/snmpdiskio hdNum extend . hdIndex /usr/local/bin/snmpdiskio hdIndex extend . hdDescr /usr/local/bin/snmpdiskio hdDescr extend . hdInBlocks /usr/local/bin/snmpdiskio hdInBlocks extend . hdOutBlocks /usr/local/bin/snmpdiskio hdOutBlocks 『/etc/snmp/snmp.conf』 mibs : 『/etc/default/snmpd』 export MIBS=/usr/share/snmp/mibs SNMPDOPTS='-Lsd -Lf /dev/null -u snmp -g snmp -I interface,ifTable,ifXTable,cpu,cpu_linux,hw_mem,extend,versioninfo,snmp_mib,ip,at,system_mib -smux,mteTrigger,mteTriggerConf -p /var/run/'  4.Download...


for package fontspec: edit $texlive/texmf-dist/tex/latex/ctex/engine/ctex-xecjk-engine.def % ctex-xecjk-engine.def: for XeTeX engine with xeCJK % vim:ft=tex % compatibility with amssymb.sty etc and xunicode.sty v0.95+ \RequirePackage{savesym} \def\CTEX@save@symlist{hbar,Finv,aleph,beth,gimel,daleth,Game} \@for \reversed@a:=\CTEX@save@symlist \do{% \savesymbol{\reversed@a}} \RequirePackage{fontspec} \RequirePackage{xeCJK} \defaultfontfeatures{Ligatures=TeX} \@for \reversed@a:=\CTEX@save@symlist \do{% \restoresymbol{UTF}{\reversed@a}% \expandafter\ifx \csname\reversed@a\endcsname \relax \expandafter\let \csname\reversed@a\endcsname \CTEX@undefined \fi} \let\CTEX@save@symlist\CTEX@undefined \ifCTEX@punct \punctstyle{quanjiao} \else \punctstyle{plain} \fi \input{ctex-cjk-common.def} \ifCTEX@nofonts\else \ifCTEX@winfonts \input{ctex-xecjk-winfonts.def} \else\ifCTEX@adobefonts \input{ctex-xecjk-adobefonts.def} \fi\fi \fi \endinput for winfonts for ctex-xecjk $texlive/texmf-dist/tex/latex/ctex/fontset/ctex-xecjk-winfonts.def % ctex-xecjk-winfonts.def: Windows 的 xeCJK 字体设置,默认为六种中易字体 % vim:ft=tex \setCJKmainfont{SimSun} \setCJKsansfont{SimHei} \setCJKmonofont{FangSong} \setmainfont{Times New Roman} \setsansfont{Droid Serif} \setmonofont{Droid Sans...
Checking system uptime on FreeBSD Bsd System

Checking system uptime on FreeBSD

We usually check "sysctl:kernel.boottime" to get uptime on freebsd, but it does not work for version 6 and above. Be obtained by reading the source code uptime the system call,and then through the python to obtain accurate uptime. #!/usr/bin/env python # NOTE: ctypes require python 2.5 import os, sys, datetime from optparse import OptionParser EX_WARN = 1 EX_CRIT = 2 EX_UNKN = 3 try: import ctypes except ImportError: print "UPTIME CRITICAL: Python ctypes required (Python 2.5 or greater)" sys.exit(EX_CRIT) class...
Write blog with Emacs Bsd System

Write blog with Emacs

Emacs can be annoying to switch to something else for a text oriented task. With weblogger.el you can writting to your blog without ener leaving Emacs. I have wordpress installed,but it should work for any other blogging software with the same XMLRPC interface. Getting and Starting First getting the latest copy of webblogger.el and xml-rpc.el from Savannah. Just click the *.el file and then click "download". Once you've gotten both webblogger.el and xml-rpc.el place them somewhere that your Emacs can...
Screen, some tips Bsd System

Screen, some tips

Config Files: /etc/screenrc or ~/.screenrc CJK Support: Edit config files, then add these: defencoding utf-8 encoding utf-8 utf-8 If garbled, input these in screen process: Ctrl+a :encoding utf-8 utf-8