Openbsd

来自linux中国网wiki
Evan讨论 | 贡献2021年11月21日 (日) 12:42的版本 →‎openbsd7 install xfce
跳到导航 跳到搜索

install

iso download

我的神舟本本 U盘启动是F7

https://www.openbsd.org/ftp.html

安装注意 今天硬盘是用了他的openbsd 分好多个区的

参考可如下 对了 https不行 要用http

试用一下 这个 https://mirrors.aliyun.com/openbsd/7.0/amd64/


Location of sets? (disk http or ‘done’) [http]

HTTP proxy URL? (e.g. ‘http://proxy:8080’, or ‘none’) [none]

HTTP Server? (hostname, list#, ‘done’ or ‘?') mirrors.aliyun.com #[cdn.openbsd.org] #这个可能要用国内的 mirrors 不然要好几个小时

Server directory? openbsd/7.0/amd64/ # [pub/OpenBSD/6.X/amd64]


Location of sets? (disk ) [done] 表示完成 下一步 时区

Asia/Shanghai

Select sets by entering a set name, a file na

https://mirrors.aliyun.com/openbsd/7.0/amd64/ https://mirrors.aliyun.com/openbsd/6.9/amd64/ 此时最新的是6.9 so

 axel https://mirrors.aliyun.com/openbsd/6.9/amd64/install69.iso
如果安装到硬盘的 是 install69.img 看官方文档可知 

 install70.img
[amd64] [arm64] [i386] [octeon] [powerpc64] [riscv64] [sparc64]
A disk image that can be written to a USB flash drive or similar device. Includes the file sets.




注意看 File Sets  下面的安装指导 大不了全选吧 哈哈 
game的可以不要 
    bsd The kernel required
    bsd.mp The multi-processor kernel (only on some platforms)
    bsd.rd The ramdisk kernel
    baseXX.tgz The base system required
    compXX.tgz The compiler collection, headers and libraries
    manXX.tgz Manual pages
    gameXX.tgz Text-based games
    xbaseXX.tgz Base libraries and utilities for X11 (requires xshareXX.tgz)
    xfontXX.tgz Fonts used by X11
    xservXX.tgz X11’s X servers
    xshareXX.tgz X11’s man pages, locale settings and includes

https://www.openbsdhandbook.com/installation/

桌面可以安装awesome 等等

https://openports.se/

安装上要改进的地方 Nov 20 2021

自动分区
这个是自动分区的 最好是 和linux一样的分分区会会好点 
evanbsd$ df  -h 
Filesystem     Size    Used   Avail Capacity  Mounted on
/dev/sd0a      986M    106M    830M    11%    /
/dev/sd0k     52.5G   22.0K   49.9G     0%    /home
/dev/sd0d      3.9G   12.0K    3.7G     0%    /tmp
/dev/sd0f      5.8G    1.1G    4.4G    20%    /usr
/dev/sd0g      986M    295M    642M    31%    /usr/X11R6
/dev/sd0h     15.7G    218K   14.9G     0%    /usr/local
/dev/sd0j      5.8G    2.0K    5.5G     0%    /usr/obj
/dev/sd0i      1.9G    2.0K    1.8G     0%    /usr/src
/dev/sd0e     12.8G    7.2M   12.2G     0%    /var
evanbsd$ 


ksh: 要改回bash ?

desktop 初始化

换源

vi /root/.profile

export PKG_PATH=https://mirrors.tuna.tsinghua.edu.cn/pub/OpenBSD/7.0/packages/amd64/



OpenBSD
# pkg_add git



WireGuard 是一个 VPN 内核实现,代码行数少(相比之下 OpenVPN 有超过 10 万行代码),优先考虑性能,配置简单,试图在做到配置简单的同时提供高性能。WireGuard 基于 UDP,数据包在一端加密之后封装在 UDP 包内发送到远程端点,然后解密。并且其支持更广泛的加密算法与协议。

WireGuard 已被多家大公司使用,并被整合到工具、发行版,移动手机和数据中心,此前也已经进入了 Linux 5.6 内核主线。此次进入 OpenBSD,又拿下一个阵营,也意味着未来 OpenBSD 将能原生支持 WireGuard VPN。

https://git-scm.com/download/linux


openbsd7 install xfce

感觉openbsd7 这字体好好看

Connect to the Internet install firmware packages and update the base system


For licencing reasons some firmware packages cannot be included on the OpenBSD install media. Run the fw_update command as root to install any firmware that is available...
出于许可原因,OpenBSD安装媒体上无法包含某些固件包。以root运行fw_update命令以安装可用的任何固件...


fw_update

syspatch

Connect to WiFi

To find out the name of the WiFi driver, type the ifconfig command as root...

foo# ifconfig | grep flag                                               
lo0: flags=8049 mtu 32768
em0: flags=8802 mtu 1500
ath0: flags=808843 mtu 1500
enc0: flags=0<>
pflog0: flags=141 mtu 33136
The output from ifconfig tells me that my Thinkpad X61s has an Atheros wifi card installed and will use the ath driver which is distributed with the base system. To connect to an authenticated WiFi, you can create a hostname.if file...

foo# echo "join myhomewifi wpakey pass_phrase" >> /etc/hostname.ath0
foo# echo "dhcp" >> /etc/hostname.ath0
...and then restart the network...

foo# sh /etc/netstart
...and use ping to check that your connection is working...

foo# ping openbsd.org 
PING openbsd.org (129.128.5.194): 56 data bytes
64 bytes from 129.128.5.194: icmp_seq=

Install third party packages

The pkg_add command is used to install packages. OpenBSD has a global mirror system that is accessed through a content delivery network and the address of the package repository is written to /etc/installurl during installation. The commands below will install nano an easy to use command line editor.

foo# pkg_add  emacs  vim 

Install xfce4, Firefox and a pdf viewer

foo# pkg_add xfce xfce-extras firefox xfce4-power-manager upower # evince

Enable power management and allow xfce to shutdown and reboot

Use rcctl to enable and start the apmd daemon (straight from the FAQ page). Suspend to RAM should then work.

foo# rcctl enable apmd
foo# rcctl set apmd flags -A
foo# rcctl start apmd
Next enable and start the messagebus (aka dbus-daemon)...

foo# rcctl enable messagebus
foo# rcctl start messagebus
rcctl actually writes lines into /etc/rc.conf.local and that file can be edited directly from a root command prompt.

Finally when you start an X Window session, the server looks for a file called ~/.xsession in the root of your home drive and runs the commands in that file. Below is the contents of my .xsession file for running Xfce based on the pkg-readme...

foo$ cat ~/.xsession
# See pkg-readme for xfce
# Dbus/message bus enabled in rc.conf.local
# Want to be able to suspend from xfce4 logout menu
/usr/local/bin/startxfce4 --with-ck-launch





Running OpenBSD 7.0 on your laptop is really hard (not)

常用命令

shutdown  -p now

reference

https://www.openbsdhandbook.com/installation/

安装OpenBSD 6.4的步骤

OpenBSD桌面安装

openbsd安装-命令行操作-virtualbox

Linux 生活第十三期,BSD 小试牛刀

使用 BSD 作为桌面系统

openbsd安装教程


教程/OpenBSD启动脚本

OpenBSD上的doas简介

使用OpenBSD一年的总结

https://bsdmag.org