FreeBSD ports & packages

Slides:



Advertisements
Similar presentations
 Two technologies › Packages › Ports  Packages › contains pre-compiled copies of all the commands for the application, as well as any configuration.
Advertisements

Installing Applications in FreeBSD. Computer Center, CS, NCTU 2 Overview  Two technologies Packages Ports  Packages contains pre-compiled copies of.
Installing Applications Chia-Hung Tsai. Computer Center, CS, NCTU 2 Overview  Two technologies Packages Ports  Packages contains pre-compiled copies.
Software installation Chapter 7. Software installation Numerous software options Usually free Open source Several sources Installation CD Websites sourceforge.net.
Linux+ Guide to Linux Certification, Third Edition Chapter 11 Compression, System Backup, and Software Installation.
The Linux Operating System Lecture 2: Installation and Installing Programs Tonga Institute of Higher Education.
Installing Linux softwares Sirak Kaewjamnong. 2 Software packets  When Linux developers create their software they typically bundle all the executable.
Linux Operations and Administration
Guide to Linux Installation and Administration, 2e1 Chapter 3 Installing Linux.
Programming and Application Packages
NOC TOOLS rancid AfNOG Cairo, SI-E, 4 of 5 Sunday Folayan.
SUSE Linux Enterprise Server Administration (Course 3037) Chapter 4 Manage Software for SUSE Linux Enterprise Server.
Trilinos 101: Getting Started with Trilinos November 7, :30-9:30 a.m. Mike Heroux Jim Willenbring.
LOGO Linux Installation. Linux Distribution Including shells, libraries, tools, compiler, servers, applications. Redhat, Fedora, Mandrake, SuSE, Debian,
Review Security Hardening IPTables SELinux. Today Installations and updates – Rpm command and packages Apache “Issue Ownership”
April 30, 2007 openSUSE.org Build Service a short introduction Moiz Kohari VP Engineering.
Maintain Installed Applications. Computer Center, CS, NCTU 2 In Ports Tree  / Makefile  COMMENT pkg-descr  WWW pkg-message  Shown after installed.
Managing Software Patches 10/15/ Introducing Solaris OE Patches A patch contains collection of files and directories Patch replaces existing files.
XP Practical PC, 3e Chapter 3 1 Installing and Learning Software.
Keeping Up-to-date AfNOG X Cairo, Egypt. Recap on FreeBSD design Distribution includes kernel, and some user-land binaries (bind, shells, network tools,
Installation of packages Objectives –Using software packaging tools Contents –Application delivered as –Where to get commonly used rpm’s –Autofs on! –Getting.
What is a port The Ports Collection is essentially a set of Makefiles, patches, and description files placed in /usr/ports. The port includes instructions.
Installation of packages Objectives –Using software packaging tools Contents –Application delivered as –Where to get commonly used rpm’s –Autofs on! –Getting.
LOGO Linux Installation. Linux Distribution Including shells, libraries, tools, compiler, servers, applications. Redhat, Fedora, Mandrake, SuSE, Debian,
Course materials may not be reproduced in whole or in part without the prior written permission of IBM. 5.1 © Copyright IBM Corporation 2008 Unit 14 Basic.
Installing Applications in FreeBSD lctseng. Computer Center, CS, NCTU 2 Before we start  Permission issue root: the super user Like administrator in.
How to configure, build and install Trilinos November 2, :30-9:30 a.m. Jim Willenbring.
Installing Applications in FreeBSD. Computer Center, CS, NCTU 2 Install software  Package Pre-built rpm, yum, dpkg, … FreeBSD: pkg_add, pkg_delete, pkg_info.
Building programs LinuxChix-KE. What happens in your CPU? ● It executes a small set of instructions called "machine code" ● Each instruction is just a.
FreeBSD Introduction Joel Jaeggli rehashed for pacnog 2006.
Sitecore upgrades The Past, The Present, The Future.
1 April 2, Software Packaging and Releasing Best Practices William Cohen NCSU CSC 591W April 2, 2008.
Installing from Sources CHUGALUG Meeting Lachele Foley.
1 January 14, Evaluating Open Source Software William Cohen NCSU CSC 591W January 14, 2008 Based on David Wheeler, “How to Evaluate Open Source.
Gaël Cuenot / IUP1 GMI 1 May 12, 2005 Gnu / Linux.
FreeBSD ports & packages. FreeBSD ports & packages - overview Different UNIX distributions use differents package systems for distributing software Debian.
Autonomy Paradigm Warning: This document is a part of my “Responsible Programming” theme. All docs related to that theme just gather some of my ideas.
Installing Applications in FreeBSD
Exercise #1: Exploring Open-Source Operating Systems with Virtual Machines J. H. Wang Sep. 20, 2016.
* Web Servers/Clients * The HTTP Protocol
Installing and Learning Software
Guide to Linux Installation and Administration, 2e
Installing and Learning Software
Install external command line softwares
COP 4343 Unix System Administration
Dag Toppe Larsen UiB/CERN CERN,
Dag Toppe Larsen UiB/CERN CERN,
Welcome to Linux Chap#1 Hanin Abdulrahman.
Writing simple Java Web Services using Eclipse
DHCP server & Client Objectives Contents
Drivers and the kernel UNIX system has three layers: Kernel
Chapter 7 Installing Program &Backup Tool
Exercise #1: Exploring Open-Source Operating Systems with Virtual Machines J. H. Wang Sep. 19, 2017.
Keeping Up-to-date AfNOG X Cairo, Egypt.
How to Upgrade Your Geant4 Release
Lecture 13 RPM and its advantages.
More Scripting & Chapter 11
5 Optimization Techniques for WordPress Websites.
Exercise #1: Exploring Open-Source Operating Systems with Virtual Machines J. H. Wang Sep. 21, 2018.
IS3440 Linux Security Unit 7 Securing the Linux Kernel
A simple way to configure PHP and Apache for Assignment 2
A Collaborative Environment
Understanding Linux and the BASH shell v
Planning and Storyboarding a Web Site
Tonga Institute of Higher Education IT 141: Information Systems
Tonga Institute of Higher Education IT 141: Information Systems
Welcome to Linux Chap#1 Hanin Abdulrahman.
Welcome to Linux Chap#1.
Review of Previous Lesson
Presentation transcript:

FreeBSD ports & packages

FreeBSD ports & packages - overview Different UNIX distributions use differents package systems for distributing software Debian GNU/Linux and Ubuntu use .DEB SuSE, RedHat, Fedora use .RPM etc.. FreeBSD uses a simple format (.TGZ) Where do they come from ?

Installing software on FreeBSD Normally 3 ways to install software on FreeBSD: from the « source » # ./configure; make; make install from the port from the package

The FreeBSD ports collection Described in detail at http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/ports.html The ports is a collection of « skeleton » instructions (Makefile, patches) to retrieve, configure, build and install software The ports collection contains instructions for over 16.000 software programs as of 2007, and it is still growing.

Installing software ... Open source software is shipped in source form; to be usable on a system: 1. It must be unpacked 2. It must be adapted to the system one is running on (« porting ») 3. It may be compiled (source -> binary) 4. It must installed 5. It may need to be configured

Installing software ... The ports system takes care of steps 1 – 4, and sometimes 5 (preconfiguration) The build and installation process might trigger the build and installation of other required software – this is known as « dependencies ». For example, a graphics program might need a JPEG software library to be able to read and write JPEG images

From port to package Once the port is built, one can make a package A package is a pre-built port Packages can be installed... from the network via FTP from the FreeBSD CDROM Packages can be those built by the FreeBSD project or your own

Ports vs packages PACKAGES PORTS precompiled easy to install no need to have ports collection installed PORTS more and better configuration control / options (for example Apache and PHP) local patches possible tuning options

Installing packages pkg_add [-r] <package name> For instance: # pkg_add -r bash This will attempt to install the bash package from the network Problems: what if bash depends on other software ? which version of bash ? 2 or 3 ? pkg_add will try to install dependencies, if they are available

Installing packages If you have the package on CD, and the CD is mounted, you can install it directly, for instance: # pkg_add /cdrom/packages/All/zsh-4.3.10_2.tbz If you know the URL (Link) to the package on the Internet, you could: # pkg_add ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/8.0-RELEASE/packages/All/zsh-4.3.10_2.tbz

Ports To install a port, you can search by name or keyword: # cd /usr/ports; make search name=<name> # cd /usr/ports; make search key=<keywrd> Once you know where the port resides (its category), you can go to that directory, and install it: # cd /usr/ports/shells/zsh # make # make install # make clean That's it!

Ports If you want to build a package, you just need to type: # make package ... from the directory where you built the port from.

Best of both worlds But what if... you don't know in which category the port is located or which version you want; you can't find up-to-date packages for the version of FreeBSD you are running (maybe it's a bit older) ; you want to upgrade a package, but other packages depend on it ; For all the above reasons, it is strongly recommended to use a tool called portupgrade

Portupgrade Portupgrade is a « meta » package manager. It sits on a layer above the ports and package system, and makes your life easier Portupgrade greatly simplifies package installation, upgrades.

The big picture

Installing portupgrade Portupgrade is itself a port, and can be installed as such, or as a package: # cd /usr/ports/sysutils/portupgrade # make # make install # make clean or # pkg_add -r portupgrade It can also be installed at system install time (via sysinstall)

Using portupgrade To install a program with portupgrade # portinstall <port name> For instance: # portinstall bash

Using portupgrade Portupgrade can be told to try and install a pre-built package, using the -P option, one or more times: Try and install from a package, fallback to the port if the package isn't found: # portinstall -P <port name> Try and install from a package, stop if it's not found: # portinstall -P -P <port name>

Using portupgrade To upgrade an already installed software package: # portupgrade <package name> For instance: # portupgrade apache

Summary FreeBSD has three main ways to install software from the source from the port from the package Ports are “skeletons” that help you build from source and make sure it works with FreeBSD portupgrade is an interesting port that helps you manage your other ports.

Questions ? ?

Extra: Building FreeBSD from source FreeBSD ships a copy of the source code in /usr/src as well as the tools needed to compile this as well. Once built it allows you to install and make sure the configuration for the new system is correct in case changes have been made between FreeBSD versions. Documentation of what to do is both on the system and online on the FreeBSD website. * we may or may not get the chance to do this in class depending on how fast or slow we go.