FreeBSD

Upgrade installed software using Packages

  1. ports-mgmt/portmaster: has no dependency but needs an up-to-date ports tree
    • portmaster -P: use packages, but build port if not available;
    • portmaster -PP: fail if no package is available;
    • portmaster -r: build the specified port and all ports that depend on it;
    • portmaster —clean-distfiles: delete out-dated distfiles not referenced by any installed port.
  2. ports-mgmt/portupgrade: needs the ports tree
    • portupgrade -aP: will upgrade all your packages and build those missing in the latest version from the ports tree;
    • portupgrade -aPP: will upgrade only when packages are available;
    • portmaster -r: act on all those packages depending on the given packages as well;
    • portmaster -R: act on all those packages required by the given packages as well;
    • portupgrade -aD: delete failed distfiles for all packages.
  3. pkg_upgrade in sysutils/bsdadminscripts: does not need the ports tree
  4. Sample workflow:
    • Security patches:
    freebsd-update fetch
    freebsd-update install

    freebsd-update does not change the patch level shown by “uname -a” (such as from 9.0-RELEASE-p3 to 9.0-RELEASE-p5), unless the kernel is also updated. The file “/var/db/freebsd-update/tag” will always contain the actual patch level information.

    • Major and minor version update:
    freebsd-update -r 8.2-RELEASE-p9 upgrade
    portmaster -f #all third party software needs to be rebuilt and re-installed, as they may depend on libraries which have been removed during the upgrade process
    freebsd-update install #tie up all the loose ends in the upgrade process
    • Update Ports Collection:
    portsnap fetch update
    • Upgrade Ports:

    First read /usr/ports/UPDATING for additional steps users may need to perform when updating a port. Then use either portmaster or portupgrade to perform the actual upgrade.

    portupgrade -aP

    or

    portupgrade -PrR [package_name]

System Settings

Disabling the hardware bell/beep

Type the following command to disable for current session:

sysctl hw.syscons.bell=0

Make sure settings remains same after you reboot the laptop, enter:

echo "hw.syscons.bell=0" >> /etc/sysctl.conf

/etc/rc.conf

defaultrouter="111.222.111.254"
hostname="server.dept.univ.edu"
ifconfig_bge0="inet 111.222.111.222  netmask 255.255.255.0"
ifconfig_xl0="inet 10.1.255.127  netmask 255.255.0.0"
nfs_client_enable="YES"
nfs_server_enable="YES"
rpcbind_enable="YES"
sshd_enable="YES"
apache22_enable="YES"
mysql_enable="YES"
fusefs_enable="YES"
zfs_enable="YES"
ipfilter_enable="YES"
ipfilter_rules="/home/admin/scripts/FreeBSD/ipf.rules"
ipmon_enable="YES"
ipmon_flags="-Ds"
#inetd_enable="YES"
#ntpd_enable="YES"
#cvslockd_enable="YES"
#ftpd_enable="YES"

/etc/ntp.conf

restrict default ignore
restrict 127.0.0.1
restrict -6 ::1
restrict 128.101.162.0 mask 255.255.255.0 nomodify notrap
server 127.127.1.0
fudge 127.127.1.0 stratum 10

Comments

Comments powered by Disqus