{"id":182,"date":"2017-04-26T15:38:30","date_gmt":"2017-04-26T15:38:30","guid":{"rendered":"http:\/\/info.ffteixeira.net\/2017\/04\/26\/freebsd-using-the-ports-collection\/"},"modified":"2017-04-26T15:38:30","modified_gmt":"2017-04-26T15:38:30","slug":"freebsd-using-the-ports-collection","status":"publish","type":"post","link":"https:\/\/blog.ffteixeira.net\/?p=182","title":{"rendered":"FreeBSD Using the Ports Collection"},"content":{"rendered":"<p>The Ports Collection is a set of Makefiles, patches, and description files. Each set of these files is used to compile and install an individual application on FreeBSD, and is called a port.<\/p>\n<p>By default, the Ports Collection itself is stored as a subdirectory of \/usr\/ports.<\/p>\n<p>Before an application can be compiled using a port, the Ports Collection must first be installed. If it was not installed during the installation of FreeBSD, use one of the following methods to install it:<\/p>\n<div class=\"procedure\">\n<div class=\"procedure-title\">Portsnap Method:<\/div>\n<p>The base system of FreeBSD includes <span class=\"application\">Portsnap<\/span>. This is a fast and user-friendly tool for retrieving the Ports Collection and is the recommended choice for most users. This utility connects to a FreeBSD site, verifies the secure key, and downloads a new copy of the Ports Collection. The key is used to verify the integrity of all downloaded files.<\/p>\n<ol class=\"procedure\" type=\"1\">\n<li class=\"step\">\n<p>To download a compressed snapshot of the Ports Collection into \/var\/db\/portsnap:<\/p>\n<pre class=\"screen\">\n<code># portsnap fetch<\/code><\/strong><\/pre>\n<\/li>\n<li class=\"step\">\n<p>When running Portsnap for the first time, extract the snapshot into \/usr\/ports:<\/p>\n<pre class=\"screen\">\n<code># portsnap extract<\/code><\/pre>\n<\/li>\n<li class=\"step\">\n<p>After the first use of Portsnap has been completed as shown above, \/usr\/ports can be updated as needed by running:<\/p>\n<pre class=\"screen\">\n<code class=\"prompt\"><strong># portsnap fetch<\/strong><\/code>\n<code class=\"prompt\"><strong># portsnap update<\/strong><\/code><\/pre>\n<p>When using <u>fetch<\/u>, the <u>extract <\/u>or the update operation may be run consecutively, like so:<\/p>\n<pre class=\"screen\">\n<code class=\"prompt\"><strong># portsnap fetch update<\/strong><\/code><\/pre>\n<\/li>\n<\/ol>\n<\/div>\n<p>&nbsp;<\/p>\n<p><a href=\"https:\/\/www.freebsd.org\/doc\/handbook\/ports-using.html\" target=\"_blank\" rel=\"noopener noreferrer\">Credits<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>The Ports Collection is a set of Makefiles, patches, and description files. Each set of these files is used to compile and install an individual application on FreeBSD, and is called a port. By default, the Ports Collection itself is &hellip; <a href=\"https:\/\/blog.ffteixeira.net\/?p=182\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[15],"class_list":["post-182","post","type-post","status-publish","format-standard","hentry","category-uncategorized","tag-freebsd"],"_links":{"self":[{"href":"https:\/\/blog.ffteixeira.net\/index.php?rest_route=\/wp\/v2\/posts\/182","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.ffteixeira.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.ffteixeira.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.ffteixeira.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.ffteixeira.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=182"}],"version-history":[{"count":0,"href":"https:\/\/blog.ffteixeira.net\/index.php?rest_route=\/wp\/v2\/posts\/182\/revisions"}],"wp:attachment":[{"href":"https:\/\/blog.ffteixeira.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=182"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.ffteixeira.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=182"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.ffteixeira.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=182"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}