Ports system

From MineOS
Jump to: navigation, search

The ports system is the package manager of the CRUX distribution. Learn about ports from the CRUX Handbook.

Understand, the ports system is at its core just an automation process--it downloads stable versions of a program's source, configures it with CRUX-compatible arguments (meaning standardizing locations and feature inclusions), builds the binaries from source, and finally installs it in the appropriate location.

Updating ports listing

The location of all the ports-installer files is /usr/ports. By default, this directory is empty and owned by root. To populate the ports-installer files and download them to your server, execute the following command:

# cd /usr/ports
# ls
total 0
# ports -u
# ls
core  mineos opt
#
  • The core repository is installed in its entirety, so only updates will be useful from this repository.
  • The opt repository contains numerous other widely-used packages. A few of these have been pre-installed, such as Java and Python.
  • The mineos repository is a MineOS specific repository that contains packages not included in the above two. Tested packages like the hiawatha webserver reside here, as well as pigmap, PhpMyAdmin, and others.

A list of all packages available can be found at: http://crux.nu/portdb/ More detailed instructions on installing additional ports can be found at the above-linked CRUX handbook.

List available ports

# cd /usr/ports/core
# ls
acl          cpio        gawk       iproute2      libstdc++-compat   net-tools   psmisc         time
attr         curl        gcc        iptables      libtool            openrdate   rc             traceroute
autoconf     db          gdbm       iputils       libusb             openssh     readline       udev
automake     dcron       gettext    jfsutils      libusb-compat      openssl     reiserfsprogs  unzip
bash         dhcpcd      glib       kbd           lilo               patch       rsync          usbutils
bc           diffutils   glibc      less          m4                 pciutils    sed            util-linux-ng
bin86        e2fsprogs   grep       libarchive    make               perl        shadow         vim
bindutils    ed          groff      libcap        man                pkg-config  sudo           wget
binutils     exim        gzip       libdevmapper  man-pages          pkgutils    sysfsutils     which
bison        file        hdparm     libgmp        mlocate            ports       sysklogd       xfsprogs
btrfs-progs  filesystem  httpup     libmpc        module-init-tools  ppp         sysvinit       xz
bzip2        findutils   iana-etc   libmpfr       nasm               procps      tar            zip
coreutils    flex        inetutils  libpcre       ncurses            prt-get     tcp_wrappers   zlib
#

Installing a port

For example, to install the 'screen' program:

  1. Enter the port's directory
  2. Download (-d) and install (-i) the package
[ ... lengthy download and 'make' output ... ]
=======> Building '/usr/ports/opt/screen/screen#4.0.3-2.pkg.tar.gz' succeeded.
=======> Installing '/usr/ports/opt/screen/screen#4.0.3-2.pkg.tar.gz'.
pkgadd /usr/ports/opt/screen/screen#4.0.3-2.pkg.tar.gz
=======> Installing '/usr/ports/opt/screen/screen#4.0.3-2.pkg.tar.gz' succeeded.
#

Screen is installed! You can use 'which screen' to locate the binary file's location.