Outils pour utilisateurs

Outils du site


bsd:bdfu

Upgrade 12.2 -> 13.0


Let us note down the FreeBSD version by running the following commands:

freebsd-version
uname -mrs

Make sure you apply all existing pending updates for FreeBSD 12.x:

# freebsd-update fetch
# freebsd-update install
# pkg upgrade

Upgrading from previous releases of FreeBSD 12.2 to 13.0 using binary method:

# freebsd-update -r 13.0-RELEASE upgrade
..11090....11100....11110....11120....11130....11140....11150....11160....11170... done.
Applying patches... 
Fetching 627 files... ....10....20....30....40....50....60....70....80....90....100
...380....390....400....410....420....430....440....450....460....470....480....490
Attempting to automatically merge changes in files... done.
 
The following file will be removed, as it no longer exists in
FreeBSD 13.0-RELEASE: /etc/motd
Does this look reasonable (y/n)? y

Now that updates are downloaded, merged in a directory, it is time to commit changes to the disk. In other words, type the following command on your FreeBSD box to apply 12 to 13 updates:

# freebsd-update install
src component not installed, skipped
Installing updates...
Kernel updates have been installed.  Please reboot and run
"/usr/sbin/freebsd-update install" again to finish installing updates.

Therefore, I reboot the FreeBSD box:

# shutdown -r now
## OR ##
# reboot

Removing all old shared libraries and object files:

# freebsd-update install

Updating all apps and packages:

# pkg-static install -f pkg
# pkg bootstrap -f
# pkg update
# pkg upgrade

Now I installed all 3rd party apps such as Python, Nginx, and so on. We need to run the following command one more time for removing old shared object files. Hence, make sure one more last time you run the following command and you are done with updating FreeBSD from 12 to 13 using the CLI:

# freebsd-update install
src component not installed, skipped
Installing updates... done.

Is is also possible to upgrade the system using source based method. You need to read the information provided in /usr/src/UPDATING file. :

# vim /usr/src/UPDATING

Verifying FreeBSD 12 to 13 upgrade:

# ps aux
# sockstat -l
# sockstat -4
# sockstat -6
# netstat -a -n | grep LISTEN
top

Check out for errors in log file using the cat command/grep command/egrep command and other tools:

# tail -f /var/log/messages
# tail -f /var/log/nginx/myapp.log
# grep error /path/to/app
# egrep -i 'err|warn|cri' /var/log/messages

See version:

uname -mrs
freebsd-version

Remove Unwanted/Unused Dependencies in FreeBSD package (optional):

# pkg autoremove

How To BSD

bsd/bdfu.txt · Dernière modification : de 127.0.0.1