下面安装在真机上进行,安装的是KDE界面,virtual box虚拟机上安装,安装前设置中显示改为VBoxSVGA,缩放设置为150%要不然安装后界面文字非常小看不见,其他基本一样。
总结出来的简易安全快速安装步骤方法:
freebsd 14.1 简易安全安装步骤
1.下载ISO刻录到优盘,刻录工具rufus 4.5p
2.拔掉网线安装,完成后登录启用pf防火墙:
vi /etc/rc.conf 添加
pf_enable="YES"
pf_rules="/etc/pf.conf"
并设置/etc/pf.conf内容,不能有域名:
block all
pass proto {udp} from any to any port {domain}
pass proto {udp} from any to any port {ntp}
pass proto {tcp} to 192.50.199.247 port {http,https}
pass proto {tcp} to 210.231.212.91 port {http,https}
pass proto {tcp} to 75.153.149.118 port {http,https}
再设置/etc/pfa.conf,添加pfctl -f /etc/pfa.conf 到~/.shrc最后一行:
/etc/pfa.conf基础内容:
block all
pass proto {udp} from any to any port {domain}
pass proto {udp} from any to any port {ntp}
pass proto {tcp} to 192.50.199.247 port {http,https}
pass proto {tcp} to 210.231.212.91 port {http,https}
pass proto {tcp} to 75.153.149.118 port {http,https}
pass quick inet proto {tcp} to pkg.freebsd.org port {http,https}
pass quick inet proto {tcp} to git.freebsd.org port {http,https}
pass quick inet proto {tcp} to update1.freebsd.org port {http,https}
pass quick inet proto {tcp} to update2.freebsd.org port {http,https}
再在/.shrc中添加:/.shrc:
pfctl -f /etc/pfa.conf
防火墙设置完成
3. 关闭电脑插入网线,再开启电脑运行,测试防火墙网络ping www.baidu.com应该不通,ping www.163.com通的。再安装KDE桌面:#pkg install pkg #pkg install portsnap #mkdir /var/db/portsnap #portsnap fetch update
4. pkg install desktop-installer
5. 运行#desktop-installer
6.按照提示安装界面,中间提示是否用最新库,选择否;中间提示是否覆盖/usr/ports选择是;提升是否扫描其他声音设备,选择是;界面选择KDE5;
7.提示重启选择是重启后运行startx或者提示试用界面选择是,否则最后会提示是否安装界面自动运行,不经过sh启动。
8.系统设置,进入KDE后一定要设置取消开机恢复关机前程序(System Settings->Startup and Shutdown->Desktop Session中关闭),好像有bug, 卡起不动。最好还修改电源选项为不休眠,要不然等一会又自己睡着了(System Settings->Power Management->Energy Saving中关闭, Display And Monitor->Compositor->Latency->Prefer lower latency这样系统反应速度会更快)。关闭自动更新,Software Update->更新方式改为Manually, Frequency改为never, 要不然会有更新提醒。Search->Index Hidden Files And Folders勾选。Workspace Behavior -> Screen Locking -> 关闭定时锁屏。
9.安装liteide 38.3, 先安装默认是38.2#pkg install qt5,liteide,重新编译liteide 38.2为38.3:
a.cd /usr/ports/devel/liteide
b.make install
c.看见在编译代码了ctrl+C
d.替换源码liteide38.2为liteide38.3的源码
e.删除libvterm下Makefile
f.make reinstall
10.安装golang github.com/therecipe/qt
a./etc/local/include/qt5 include中目录向上拷贝一个
b.设置环境变量在
export QT_DIR=/usr/local/lib/qt5
export QT_VERSION=5.15.13
export GOROOT=/usr/local/go121
export GOPATH=/root/go
export GO111MODULE=off
export PATH=/usr/local/go121/bin:/usr/local/lib/qt5/bin:$PATH
export QT_IM_MODULE=fcitx
export GTK_IM_MODULE=fcitx
export QT_QMAKE_DIR=/usr/local/lib/qt5/bin
#QT_API用于therecipe/qt qtsetup
export QT_API=5.13.0
c.重启使.shrc中配置生效
d.golang.org访问不了,手动在github.com/golang下载到/root/go/src中,go get -u -d github.com/therecipe/qt
e.用liteide打开therecip/qt,修改internal/utils/env.go freebsd路径:
path := filepath.Join(QT_DIR(), "" /QT_VERSION_MAJOR()/, "" /"gcc_64"/, "bin", tool)
if !ExistsDir(filepath.Join(QT_DIR(), QT_VERSION_MAJOR())) {
path = filepath.Join(QT_DIR(), "" /QT_VERSION()/, "" /"gcc_64"/, "bin", tool)
}
f.用liteide 编译qtsetup
g.运行命令qtsetup -test=false:
10.安装输入法,开发环境,常用工具:
#pkg install fcitx5 fcitx5-qt5 fcitx5-qt6 fcitx5-gtk-common fcitx5-gtk2 fcitx5-gtk3 fcitx5-gtk4 fcitx5-configtool zh-fcitx5-chinese-addons
11.安装要用的文件系统fusefs-ntfs fusefs-ntfs-compression fusefs-exfat exfat-utils
12.安装qt c++ 开发环境 #pkg install qtcreator portaudio qt5 liteide cmake gimp flibreoffice irefox opencv glfw
13.设置添加摄像头功能,添加下面行到/etc/rc.conf:
webcamd_enable="YES"
也可以sysrc命令加上面行设置
14.添加设置exfat ntfs,蓝牙开机启动,添加下面行到/boot/loader.conf:
fusefs_load="YES"
cuse_load="YES"
ng_ubt_load="YES"
15.进入KDE界面后启动项目可以添加到/root/.profile
也可以sysctl命令加上面行设置,设置其他的先测试下;
16.常用命令:优盘挂载:mount -v -t msdosfs /dev/da0s1 /media/upan
修改密码passwd
查看当前Shell #echo $0
版权归原作者 suirosu 所有, 如有侵权,请联系我们删除。