FreeBSD跟其它系统相比一大特色就是ports系统。
The Ports Collection is a set of Makefiles
, patches, and description files. Each set of these files is used to compile and install an individual application on FreeBSD, and is called a port.
By default, the Ports Collection itself is stored as a subdirectory of /usr/ports
.
ports系统就是源代码系统,包含了Makefile文件,补丁以及说明文件等。ports安装就是源代码编译安装,使用ports安装更适合极客们。ports放在/esr/ports目录里。
从现在开始,FreeBSD的ports系统开始使用github进行代码的更新,比以前的porsnap更加的好用!
对一台新机器来说,要先安装git
pkg安装git
pkg install git
然后就可以
下载ports
git clone https://git.FreeBSD.org/ports.git /usr/ports
下载之后就可以按照以前的ports方法安装了,比如这时候再安装git 就可以:
用ports安装软件
cd /usr/ports/devel/git
make install
更新ports代码
更新代码,直接到/usr/ports目录执行git pull即可:
/usr/ports # git pull
remote: Enumerating objects: 68230, done.
remote: Counting objects: 100% (22222/22222), done.
remote: Compressing objects: 100% (10403/10403), done.
remote: Total 17060 (delta 9019), reused 13834 (delta 6550), pack-reused 0
接收对象中: 100% (17060/17060), 6.03 MiB | 224.00 KiB/s, 完成.
处理 delta 中: 100% (9019/9019), 完成 2348 个本地对象.
来自 https://mirrors.ustc.edu.cn/freebsd-ports/ports
9ea0f4e09c..c0b151adb2 main -> origin/main
更新 fa093308a5..c0b151adb2