FreeBSD Update Port Tree

Time:2019-7-6

In order to make the software we installed the latest version, we need to update Port Tree regularly.The so-called update port is to update patches

1,CVSup/csup
Note: csup is a rewrite of C VSup software in C language. It is provided as part of the system in FreeBSD 6.2 and later.
Before running CVSup for the first time, make sure / usr / ports is empty! If you have previously installed a Ports suite elsewhere, CVSup may not automatically delete patch files that have been deleted on upstream servers. First install the package cvsup-without-gui-16.1h. You can install it with ports or package. CHANGE_THIS.FreeBSD.org is modified to a CVSup server closer to you.
#cp /usr/share/examples/cvsup/ports-supfile ~/
#ee ~/ports-supfile
Amendment:
* default host = Change_this.freebsd.org# tells cvsup where to get updates (change_this.freebsd.org to the server you think is the fastest)
* Location of default base=/var/db# cvsup support file
* Where do default prefix=/usr# files go
* default releases = CVS tag =. FreeBSD-CURRENT (branch =., or HEAD)
* default delete use-rel-suffix # delete files created by cvsup that have been deleted in CVS
Src-all # All FreeBSD source code
Ports-all tag=. All ports. Here, tag=. is used to replace the default branch. If you use RELENG_4, be sure to keep tag=.!!
To update:
# cvsup -L 2 /root/ports-supfile
The additional parameter means:
If you don’t run X11 or don’t like GUI, you need to add two options on the command line when you run cvsup:
# cvsup -g -L 2 supfile
– G tells CVSup not to use GUI. If you are not running X11, this is automatic, otherwise you must specify it.
– L 2 tells CVSup to output details of all upgrading files. There are three levels to choose from, from – L 0 to – L 2. The default is 0, which means that nothing is output except error messages.
– s requires incremental synchronization of cvsup to reduce network pressure, so you can’t add it to the first time!

Features: Old brand new methods, with a long history, can also be used to update the source, the first time takes a relatively long time, about 10 minutes. If updated in time (for example, in Cron set hourly synchronization once), it will only take about 2 minutes.

2. Unzip after downloading ports. tar. GZ
#fetch ftp://ftp4.FreeBSD.org/pub/FreeBSD/ports/ports/ports.tar.gz
#tar -zxvf ports.tar.gz -C /usr/
Features: It’s also an old-fashioned method, faster than the first one, but often not the latest (relatively speaking)
Now ports. tar. GZ is about 37MB in size. I need to download it with the fastest mirror.
Downloaded 36.6 megabytes in 3:02 seconds. (205.96 KB/s)
Decompression takes 3 minutes and 20 seconds, totaling about 7 minutes.

3.Portsnap
Portsnap is another way to publish ports suites. It was first introduced in FreeBSD 6.0. In earlier systems, you could install it through ports-mgmt/portsnap package.
First run Portsnap
# portsnap fetch
# portsnap extract
Update Ports Tree
# portsnap fetch update

Modify the mirror site:
#ee /etc/portsnap.conf
SERVERNAME=portsnap.tw.FreeBSD.org

Features: It is a new method introduced in recent years. The first download size is about 47 MB. The speed is not ideal, only about 20 Kb/s, if you download it every day.
It takes the shortest time to update in time, but if the update is not timely, there will be no advantage in speed accumulated.

CVS List:

Chinese Mainland
cvsup.cn.FreeBSD.org

cvsup2.cn.FreeBSD.org

cvsup3.cn.FreeBSD.org

cvsup4.cn.FreeBSD.org

cvsup5.cn.FreeBSD.org

Taiwan, China
cvsup.tw.FreeBSD.org

cvsup3.tw.FreeBSD.org

cvsup4.tw.FreeBSD.org

cvsup5.tw.FreeBSD.org

cvsup6.tw.FreeBSD.org

cvsup7.tw.FreeBSD.org

cvsup8.tw.FreeBSD.org

cvsup9.tw.FreeBSD.org

cvsup10.tw.FreeBSD.org

cvsup11.tw.FreeBSD.org

cvsup12.tw.FreeBSD.org

cvsup13.tw.FreeBSD.org

Recommended Today

Server Core Knowledge

Catalog 1. Computer: a tool to assist human brain 2. Composition of computer hardware 3. power supply 4.CPU 5. memory 6. Classification of computer use 7. Introduction to common Internet servers 8. Server classification 1. Computer: a tool to assist human brain Nowadays people touch computers almost all the time! Whether it’s a desktop computer, […]