PC-BSD Quick Guide


Installing Applications

There are several methods of installing software on a PC-BSD system. Each method will be described in more detail below.

When you install software from a PBI you will be presented with a simple graphical interface which takes you through the steps to install your software. Similar to many other popular operating systems you just click and go. Since PBI programs are created from traditional FreeBSD ports and packages, they are fewer and less up to date than ports.

Ports and Packages are the traditional ways of installing software.

You can get the most up to date software by compiling directly from ports. The quicker method of installation is by package, but not all software is available as a package.

Installing software via PBI

When you install a program through the PcBsdInstaller system it is placed with all required files in its own folder in /Programs and linked into the system. This is very simple and safe to the system as it is not changed more than necessary to allow the software to function.

To install a PBI we need to go to the PBI Directory and download a program:

PBI Directory home page

Once the download is completed, simply double click on the file to launch the installer. It will prompt you once for the super user password before beginning the installation process. This is effective as a security measure, parental control, and prevents accidental alteration of the system.

Click "Next" at the welcome screen, you will then be asked to read any license agreements that comes with the program you are installing. Check the "I agree" box and click "Next" to continue installation. You may have the options of placing icons on your desktop and entries in the PBI Programs section of the application menu. Check all boxes that apply and click "Install":

PBI Installer

Once the installation has completed, click “Finished” and try out your program.

You can also install in text mode from a console session by changing directory to the location of the PBI and run the following as the super user.

# ./PBI_File -text pbifilename-1.0-PV1.pbi

If at a later date you wish to add an icon to your desktop for software installed during a PBI install you may do so by right clicking on the desktop and selecting "Create new link to application". This will open a menu where you can set the name of the icon, its picture (click the cog image). Then click the "Application" tab. Here you will have to set the program you wish to create an icon for, you can set a comment, description, the work path, and file types as required.

Removing PBI applications

To remove a .pbi application, just go to "Start Menu > Settings > System Administration > Remove Programs (PBIs)". You will see the list of installed PBI applications:

PBI Removal

Click the application you want to remove and press the "Remove" button in the lower-left corner. When you are done, click "OK".

Installing packages

Packages are prepared files for installing software, they install software into the system and can cause dependency issues. The package system is comparable to yum, and apt-get used in several Linux distributions. To find the name of a package, first you need to search on the FreeBSD ports database. For instance if we want to install Skype, we search for "skype" and we find 2 search results: the development release and the stable release. If you pass your mouse over the name of the package of the stable release, you see something like http://cvsweb.freebsd.org/ports/net/skype in the status bar of your browser. The /net/skype part tells you that the name of the package is skype and that it belongs to the net category. You don't have to download anything, as the package manager will take care of that for you. Just remember the name of the package. Installing packages requires you to open a console with root permissions. You can type kdesu konsole in a run dialog from the K-Menu or open a konsole from the K-Menu in super user mode, or open a konsole and type su - and press "Enter". You will be prompted for the root (super user) password, it will not display the password on screen for security reasons. After switching to the super user account you have complete access to the system and can install software at will. You can install a program using the package system thusly:

# pkg_add -r irssi

This will install the "irssi" program with all required files but not update the K-Menu or desktop. You can generally find the binary (executable) in /usr/local/bin, configuration files in /usr/local/share/ or your home directory and the libraries (like .dll) will be placed into the system as needed and shared between applications.

You can uninstall a package by using the pkg_delete command and the name and version of the package or a wild card.

# pkg_delete  irssi-0.8.10_2		# And pkg_delete "irssi-*" are equivalent.

You can get info about an installed package the same way using the pkg_info command.

# pkg_info "irssi-*"		# Or pkg_info | grep irssi

Installing software using ports

Traditionally BSD installs software from source; the ports collection. You first need to install an up to date ports collection before you may use the ports collection to install software. New users coming from Gentoo GNU/Linux will find this similar to the “Emerge” system which is based on FreeBSD ports.

To install the ports collection click on the K-Menu and navigate to: "Settings > Administration > PC-BSD System". Enter the super users password to access the admin panel and click on the "Tasks" tab. Now click "Fetch ports" and it will begin downloading the necessary files and installing them. This will take a while depending on your Internet connection and Processor speeds.

Tasks

If you wish to do this from the command line open a console as the super user as described in fetching packages and run the following command:

# cvsup -g -L 1 /root/ports-supfile

You can also use the portsnap method

# portsnap fetch extract

If you install ports using portsnap you should not update the ports collection with cvsup, instead use:

# portsnap  fetch && portsnap update

if you installed ports using cvsup you may update them in the same way as before:

# cvsup -g  -L 1 /root/ports-supfile

You can edit the supfiles and set a download mirror closer to you, please see the FreeBSD handbook for more information on using CVSUP.

Now that the ports collection is installed if you look in /usr/ports you will see a simple tree structure of folders. The structure is in the format of category > program name.

Then, to install an application from ports, just go to the application directory, for instance /usr/ports/net/skype and start compilation:

# cd /usr/ports/net/skype
# make install clean

After a few minutes or hours, depending on the size of the package, the application is installed on your system.

Removing a package or a port

To remove a package or port, first you need to find the name of the package. For instance if you want to remove kopete, to find out its full name, you will type:

# pkg_info | grep kopete
kdenetwork-kopete-0.11_1 KDE multi-protocol instant messenger (IM)

Then to uninstall the package, type as root:

# pkg_delete kdenetwork-kopete-0.11_1

If you installed from the ports, you can also uninstall going to the specific port directory and you can uninstall from there:

# cd /usr/ports/net-im/kopete
# make deinstall

To learn more about ports and packages, feel free to read the excellent FreeBSD handbook. Let's see how we can add users in PC-BSD now.


Index