update the server

jillelaine's picture
about this website
Submitted by jillelaine on October 5, 2006 - 5:36am.

install cvsup: this is what goes out to FreeBSD.org and fetches any changes in ports, so that you have the latest version. to get the one without all the gui stuff

#cd /usr/ports/net/cvsup-without-gui

#make install clean

#cd /usr/share/examples/cvsup
to see the example files

make your own ports-supfile, edit it as you see fit

#cp ports-supfile to /root edit ports-supfile in /root to point to cvsup host cvsup14.FreeBSD.org (or whatever cvsup-server you want)

command to run:

#cvsup -g -L 2 /root/ports-supfile

some users recommend running this every night via the crontab so that you always have fresh ports

need learn how to add the 'refuse' file to cvsup so that it doesn't bother to update all the foreign langs etc.

then, after cvsup always:

#portsdb -Uu
may take hours to run

installing ports: make config brings up config options for a port, useful if port has been previously installed, config file may be saved from previous install. you may need to delete the config file from a previous install. even after ports and packages are deinstalled, the config files may be left for reference, so remember to look

#pkgdb -u
to update the package database

#portversion –l “<”
prints only installed ports that are older than the current version (<) run after cvsup, -r and –R would also check for outdated dependencies in either direction, -v verbose

#pkg_version –l “<”
same as portversion but for packages

#portaudit –Fa
Updates “port vulnerabilities” database from FreeBSD and shows all installed ports that have vulnerabilities (F is update, a is all ports

#pkg_info –avp | more
show all installed packages, verbose, installation prefix

#pkg_info –xL | more
what files were installed with pkgname

#pkg_info –R | more
shows if other pkgs require pkgname as a dependencies, also use –r to show dependencies in other direction

#pkg_info –L | more
show all files installed by pkgname

#pkg_which
don’t know how to use this yet; to see why certain files exist (what pkgname they came with?)

#portupgrade –rRi
Checks dependencies in both directions and upgrades the specified port interactively (which means you are required to say 'yes' to make changes), do this as a ‘dry run’ with –nv no execute and verbose my experience with portupgrade has been that it works *very* well. read the man page for portupgrade for more information.

#portupgrade -aRr
to upgrade all ports and dependencies in both directions. be careful with this one!

#portsclean –n
Clean out working dirs of ports tree, old distfiles, outdated, obsolete, orphaned libraries and files, -n is no execute, -i is interactive (asks before deleting), -C is clean out working dirs in ports tree, -DD clean out all distfiles not reffed by installed ports, -L clean out old, duplicate, or orphaned libraries, -PP delete all package tarballs

#pkg_delete –nrv <packagename>
to delete a package -n is no execute (dry run), -v is verbose, -r is recursively clean out dependent packages that are otherwise unneeded.


( categories: )