Project

General

Profile

Feature #871

Installing Packages on OpenBSD

Added by Daniel Curtis about 4 years ago. Updated almost 4 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Target version:
Start date:
11/13/2016
Due date:
% Done:

100%

Estimated time:
0.50 h
Spent time:

Description

I recently installed OpenBSD and went to install a few packages. I'm accustomed to FreeBSD's pkg command, and OpenBSD's pkg_add isn't as friendly.

  • To install the nginx package for the current release and architecture, the long form is:
    pkg_add http://ftp.openbsd.org/pub/OpenBSD/`uname -r`/packages/`uname -p`/nginx-1.10.1.tgz
    
  • To make pkg_add a little more intuitive, set the PKG_PATH environment variable:
    export PKG_PATH=http://ftp.openbsd.org/pub/OpenBSD/`uname -r`/packages/`uname -p`/
    
    • Now install the screen package, in short form:
      pkg_add screen
      
  • To make the PKG_PATH permanent, add it to .profile:
    echo 'export PKG_PATH=http://ftp.openbsd.org/pub/OpenBSD/`uname -r`/packages/`uname -p`/' >> ~/.profile
    
  • Updating packages using pkg_add:
    pkg_add -vui
    

Resources

History

#1 Updated by Daniel Curtis about 4 years ago

  • % Done changed from 0 to 100
  • Status changed from New to Resolved

#2 Updated by Daniel Curtis almost 4 years ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF