#!# Informational:: Using the FreeBSD ports collection //FreeBSD

Discussion in 'Archives' started by 1ce, Mar 25, 2011.

#!# Informational:: Using the FreeBSD ports collection //FreeBSD
  1. Unread #1 - Mar 25, 2011 at 8:25 PM
  2. 1ce
    Joined:
    Mar 11, 2011
    Posts:
    261
    Referrals:
    1
    Sythe Gold:
    0

    1ce Forum Addict
    Banned

    #!# Informational:: Using the FreeBSD ports collection //FreeBSD

    Well guys, today I'll be writing a guide for using the FreeBSD ports collection. It is amazingly helpful, I'll give you some information and examples.

    What is this?::
    The FreeBSD Ports collection is a MASSIVE software management archive for BSD unix.

    First, assuming you installed ports while installing FreeBSD we'll start off with this guide:

    <guide>

    Your ports collection is a MASSIVE software archive managed by the usage of "make" commands, typically the only 2 you will be using is "make install clean" and "make deinstall". It can found in /usr/ports and is split into catagories:

    <catagories>

    accessibility
    arabic
    archivers
    astro
    audio
    benchmarks
    biology
    cad
    chinese
    comms
    converters
    databases
    deskutils
    devel
    distfiles
    dns
    editors
    emulators
    finance
    french
    ftp
    games
    german
    graphics
    hebrew
    hungarian
    irc
    japanese
    java
    korean
    lang
    mail
    math
    mbone
    misc
    multimedia
    net
    net-im
    net-mgmt
    net-p2p
    news
    palm
    polish
    ports-mgmt
    portuguese
    print
    russian
    science
    security
    shells
    sysutils
    textproc
    ukrainian
    vietnamese
    www
    x11
    x11-clocks
    x11-drivers
    x11-fm
    x11-fonts
    x11-servers
    x11-themes
    x11-toolkits
    x11-wm

    </catagories>

    Each of these catagories hosts another large list of programs. For example if you wished to install.. pidgin, a multi-protocol instant messenger, can simultaneously connect to facebook, icq, irc, msn, yahoo, gmail, ect ect...

    That would be in the catagory of net-im, and you would install it by moving to the program's directory and using your "make install clean" command.

    <example>
    cd /usr/ports/net-im/pidgin && make install clean
    </example>

    And to remove it, just move into it's directory and use your deinstall command.

    <example>
    cd /usr/ports/net-im/pidgin && make deinstall
    </example>

    Also, you have your distfiles direcotry: /usr/ports/distfiles This is a neat archive, it is used by ports to see if certain programs have been installed or not, However; sometimes if you deinstall and reinstall a program, you'll be unable to fetch it from the server because it's listed in distfiles, in which case you will need to clean it up a bit. I typically use:

    <example>
    cd /usr/ports/distfiles && rm -f *
    </example>

    Some ports need to be installed as super user (root). FreeBSD doesn't automatically make entries into the sudoers file (sudo "says") and I will probably write a guide on that as well. However; you can use substitute user.

    <example>
    su
    password: enterithere
    </example>

    You can also upgrade your ports collection (you will need to do this as root)
    by doing:

    <example>
    portsnap upgrade
    </example>

    also, if you can't find a port in the tree, you can add it using:
    <example>
    pkg_add -r portname
    </example>
    And this will add the port to your collection. For information on an installed port, you can use pkg_info to check and see if a port is installed.

    </guide>

    This next guide is incase, for some miracle reason you did not install FreeBSD with the ports collection, I will show you how you can get it up and running.

    (hey, we all make mistakes, ammirite?)

    <guide>

    First order of buisness, we need to fetch our collection!
    This can be done with cvsup or portsnap, for this guide I'll show you how to add your collection using portsnap.

    For the following, you will need to be doing this as root!

    Ok, first and formost, we need to get an image of our collection in /usr/ports. So do the following:

    <example>
    cd /usr/ports && portsnap fetch
    </example>

    After that, you will need to extract the archive, to do that:

    <example>
    cd /usr/ports && portsnap extract
    </example>

    ###NOTICE###
    This collection is HUGE, and may take a while!
    ###NOTICE###

    When that has finished processing, your ports collection is ready for use, and you may use the above guide as necessary.

    </guide>

    I did not intend this guide for advanced users, I intended it for newbies who are getting used to FreeBSD and are overwhelmed by many of it's unique and amazing features.

    It is at times, overwhelming at first, and for that I will write a few guides on it. If you feel I left anything important out, please don't reply, instead send me a private message and I'll add it.

    If this guide is confusing in any way, please don't reply in thread, pm me and I'll help you out.

    If you have any feedback, constructive criticism, or would otherwise like to add-onto the guide please don't pm me, post a reply ;)
     
< My Shyness/Awkwardness = LONER? | Cjmt905's UE Application | Attempt #3 | Under Construction | >

Users viewing this thread
1 guest


 
 
Adblock breaks this site