Q. I've installed FreeBSD server without ports. When installing my FreeBSD system, sysinstall asked my, if I would like to install the Ports Collection? I chose not to install it. Now, how do I obtain and install the FreeBSD ports collection in /usr/ports?
A. The FreeBSD Ports collection is a package management system which provides an easy and consistent way of installing software packages on the FreeBSD operating system.
Before you can install ports, you must first obtain the Ports Collection and placed in /usr/ports directory.
Obtaining the Ports Collection
Login as root and install portsnap package, if you are using FreeBSD 6.0 or older version:
# pkg_add -r portsnap
Obtain ports
Type the following command:
# mkdir /usr/ports
# portsnap fetch
# portsnap extract
Now, the ports collection installed in /usr/ports. You can install and update system using portupgrade and portsnap itself
You can also use sysinstall tool to install the ports collection :
# sysinstall
Select Configure > Distributions > Ports > Ok
You should follow me on twitter here or grab rss feed to keep track of new changes.
Featured Articles:
- 30 Handy Bash Shell Aliases For Linux / Unix / Mac OS X
- Top 30 Nmap Command Examples For Sys/Network Admins
- 25 PHP Security Best Practices For Sys Admins
- 20 Linux System Monitoring Tools Every SysAdmin Should Know
- 20 Linux Server Hardening Security Tips
- Linux: 20 Iptables Examples For New SysAdmins
- Top 20 OpenSSH Server Best Security Practices
- Top 20 Nginx WebServer Best Security Practices
- 20 Examples: Make Sure Unix / Linux Configuration Files Are Free From Syntax Errors
- 15 Greatest Open Source Terminal Applications Of 2012

- My 10 UNIX Command Line Mistakes
- Top 10 Open Source Web-Based Project Management Software
- Top 5 Email Client For Linux, Mac OS X, and Windows Users
- The Novice Guide To Buying A Linux Laptop















{ 3 comments… read them below or add one }
Thanks for sharing this.
i still cannot install ports,,pls help me =(*
any ideas on how to install stuff on 9 now that the installer is no longer invalid
I have almost spent a week now in lang / devel trying to install what is needed to create the installers for the ports i am wanting to install .. its proving very tiring
now wishing i stayed with 8.2
is it such a hard thing to have an option to install every compiler avail
instead of dependancies being installed it jsut keeps stoping at such and such is missing and off i go again doing make build-depends-list to find where to find the next part to be installed :S
ps thanks for all your posts they have helped me a lot this yr getting freebsd box going
goal
ZFS Raidz
Virtualbox-ose
KDE Desktop
Multimedia server box