Download presentation
Presentation is loading. Please wait.
1
Installing Applications Chia-Hung Tsai
2
Computer Center, CS, NCTU 2 Overview Two technologies Packages Ports Packages contains pre-compiled copies of all the commands for the application, as well as any configuration files or documentation Ports a collection of files designed to automate the process of compiling an application from source code Both packages and ports understand dependencies
3
Computer Center, CS, NCTU 3 Overview Package benefits tarball is typically smaller Packages do not require any additional compilation Ports benefits you can tweak the compilation options to generate code that is specific to a different processor Some applications have compile time options relating to what they can and cannot do
4
Computer Center, CS, NCTU 4 Package System pkg_add(1) pkg_add pkg_name # pkg_add lsof-4.56.4.tgz pkg_add -r pkg_name If you don’t have a source of local packages If you are using FreeBSD-CURRENT or FreeBSD-STABLE, pkg_add will download the latest version of your application If your are using FreeBSD-RELEASE, it will grab the version of the package that was built with your release PACKAGESITE environment variable
5
Computer Center, CS, NCTU 5 Managing Packages pkg_info(1) pkg_version(1) pkg_delete(1) # pkg_delete xchat-1.7.1
6
Computer Center, CS, NCTU 6 Ports system Find your application cd /usr/ports make search name=program name make search key=string change to the directory for the port you want to install Type “make install clean” to install your application make make install make clean
7
Computer Center, CS, NCTU 7 Ports system When your type “make”, the ports system uses fetch(1) to download the filesfetch(1) MASTER_SITES environment variable make MASTER_SITE_OVERRIDE= \ ftp://ftp.FreeBSD.org/pub/FreeBSD/ports/distfiles/ fetch /etc/make.conf Using pkg_delete pkg_name to delete your application
8
Computer Center, CS, NCTU 8 Obtaining the Ports Collection sysinstall cvsup (or csup, … etc) cd-rom Using cvsup to update your ports collection
9
Computer Center, CS, NCTU 9 Upgrading Ports using portupgrade pkg_version -v portupgrade The utility is designed to easily upgrade installed ports cd /usr/ports/sysutils/portupgrade; make install clean portupgrade -a Portupgrade -R firefox
10
Computer Center, CS, NCTU 10 portaudit portaudit check if installed ports are listed in a database of published security vulnerabilities portinstall portaudit portaudit -Fa
11
Computer Center, CS, NCTU 11 Installation failed cvsup ports tree /usr/ports/UPDATING portsdb -Fu Generate the ports database named INDEX.db from INDEX pkgdb -F An interactive tool for fixing the package registry database portupgrade -aR portinstall again
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.