LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Other *NIX Forums > *BSD
User Name
Password
*BSD This forum is for the discussion of all BSD variants.
FreeBSD, OpenBSD, NetBSD, etc.

Notices

Reply
 
LinkBack Search this Thread
Old 01-20-2012, 03:48 PM   #1
baronobeefdip
Member
 
Registered: Jul 2009
Distribution: Debian Squeeze
Posts: 906

Rep: Reputation: 32
how do you install these programs from source in freebsd and openbsd


i have downloaded the tarballs of the programs i want to install, because they aren't on the disk and these programs are only available through ports and unless i know how to find out how to make my own ports software collection and make the BSD computer retrieve them from that ports collection, what i want to accomplish there is to make the ports collection local (and the package collection as well) so i don't have to access the internet every time i want to install something thats only available through ports

since these programs aren't pre-installed or on the disk i wanted to compile them from source
-dhcpd
-samba
(more might be added later)

how do you install these programs from source in FreeBSD and if possible OpenBSD)
 
Old 01-20-2012, 04:50 PM   #2
ocicat
Member
 
Registered: May 2007
Posts: 193

Rep: Reputation: 43
Quote:
Originally Posted by baronobeefdip View Post
i have downloaded the tarballs of the programs i want to install...
I will only speak for OpenBSD since I don't use FreeBSD.

Yes, one can download *tgz files from the various mirrors, but you should be cautioned if your expectation is that there is a one-to-one relationship between applications & files. Frequently, there are various & numerous dependencies of an application to other applications & libraries. Upon installation, you may find that an insufficient number of files have been downloaded which means that you will have to go back to the mirrors & download even more files.

This can be tedious.

You can find out a priori what dependencies any particular package requires by running the print-run-depends target described on the ports(7) manpage.

A better solution would be to simply install applications directly from a mirror as described in Section 15.2.2 of the official FAQ. If you are wanting to capture all packages for local use, look at the output of pkg_info(1). This will generate a list of all installed packages.

Quote:
how do you install these programs from source in FreeBSD and if possible OpenBSD)
Again for OpenBSD, note that the end result of building applications from the ports tree is packages -- the very same packages which can be found on the mirrors. If make install is issued on the command-line, the final step is to install the application from the built package(s). These packages can be found in /usr/ports/packages.

Familiarizing yourself with the information found in Section 15 of the FAQ will answer many of your follow-up questions.
 
Old 01-20-2012, 06:23 PM   #3
jmccue
Member
 
Registered: Nov 2008
Location: US
Distribution: slackware
Posts: 38

Rep: Reputation: 7
Hi baronobeefdip

I do not fully understand, to compile just from source is usually just like on linux, but you may want to get gmake. But still a bit confused, so please see:

You do not want to use posts because the box is not connected to the internet ? If so
you can copy the src tar files to /usr/ports/distfiles and use ports. This assumes the
md5 for the source you downloaded agrees with what ports expect. If not, remove the file
in /usr/ports/distfiles try a make, it will attempt to download and fail. Then you
will see where it attempted to get the source from. Thus you can download the src from
another machine, copy and repeat. As ocicat said it can be tedious.

HTH
John
 
Old 01-21-2012, 10:31 AM   #4
baronobeefdip
Member
 
Registered: Jul 2009
Distribution: Debian Squeeze
Posts: 906

Original Poster
Rep: Reputation: 32
I can't use the packages and ports because it's not on a local network. plus the lab i am doing this in doesn't have internet access and doesn't plan to, so how do i create a software repositories for OpenBSD and FreeBSD that way i don't have to connect to the internet (which requires a lot when doing this in a lab that isn't supposed to have internet). is there a way to create a local software repository for these operating systems, if possible then how do i configure the operating systems to fetch te packages and ports from the local server instead of out on the internet
 
Old 01-21-2012, 12:54 PM   #5
jmccue
Member
 
Registered: Nov 2008
Location: US
Distribution: slackware
Posts: 38

Rep: Reputation: 7
Maybe your best/easiest bet is to install from ports on a system with internet access (home pc?) and once done clone /usr/ports to the pc without internet access via a flash drive or dvd. When installing from ports source files are downloaded to /usr/ports/distfiles/

These Links may have more info:
http://www.freebsd.org/doc/en_US.ISO...rts-using.html
http://www.freebsd.org/ports/

John
 
Old 01-22-2012, 02:21 PM   #6
ocicat
Member
 
Registered: May 2007
Posts: 193

Rep: Reputation: 43
Quote:
Originally Posted by baronobeefdip View Post
...the lab i am doing this in doesn't have internet access and doesn't plan to, so how do i create a software repositories for OpenBSD and FreeBSD...
Again, I will only speak for OpenBSD as I don't use FreeBSD.

You have outlined restrictions which makes the goal unduly tedious.

My recommendation to you is to download all packages for whichever flavor you are using: -release, -stable, or -current for your architecture of choice. If you don't understand OpenBSD's flavors, study Section 5.1 of the official FAQ. It is imperative to match the version of the ports tree downloaded to the version of the operating system used. Carefully study Section 5.3.3 of the FAQ along with Section 15. Mismatching the ports tree to the OS used can result in both blatant & subtle errors. Don't mismatch versions or flavors. It is not supported.

You will also want to download the entire contents of the pub/OpenBSD/distfiles directory on the mirrors. When building applications from the ports tree, the various Makefile's will first look for the tar files, etc. locally in /usr/ports/distfiles. If the needed files are not found there, the logic will connect to any number of servers to download them. If connections cannot be made, the logic will then turn to the distfiles directories on the mirrors. Copying all distfiles should prevent the need for an Internet connection.

Again, much of this information can be found in the FAQ & related documents. Understanding the related manpages is a must. Before embarking, you will save yourself significant time & aggravation by understanding the process upfront.

Last edited by ocicat; 01-22-2012 at 02:29 PM.
 
Old 02-09-2012, 07:30 AM   #7
grave_violin
LQ Newbie
 
Registered: Jan 2012
Posts: 6

Rep: Reputation: Disabled
OpenBSD:

Most of the time you do not need to compile software and usage of binary packages is encouraged. So I shall talk about how to make a repository of packages in binary form.

you need to make a directory for downloaded packages:

# export PKG_CACHE=/location/to/directory

now every package retrieved shall be copied to this directory and you can make a backup of this directory to use it in future.


FreeBSD:

In FreeBSD many people use ports instead of binary installation.

It has been very long since I used FreeBSD so if my memory serves correctly source code is retrieved and saved in /usr/ports/distfiles

You can copy the distfiles from this directory and save it at some other place for future use.

In FreeBSD, as far as my memory works, there is no PKG_CACHE directory.
 
Old 02-09-2012, 08:33 AM   #8
baronobeefdip
Member
 
Registered: Jul 2009
Distribution: Debian Squeeze
Posts: 906

Original Poster
Rep: Reputation: 32
i don't like ports, since i am trying to do this on a network without internet access (bummer right?) and i am trying to create a local freebsd repository server that will serve all of the packages whenever we have a machine requesting them to install software. for instance the dhcp serveris not pre-installed (unlike openbsd where most of the necessary software for a functional server is pre-installed you just need to enable them if not enabled by default) in freebsd, neither is samba3 so i really need to build the packages collection without it i will never be able to use freebsd in it's full potential i just need to try and make a samba server and shcp server with it. and postfix isn't in the package collection on the disk so i might be using that in the future too
 
Old 02-09-2012, 05:35 PM   #9
teckk
Senior Member
 
Registered: Oct 2004
Distribution: FreeBSD Arch
Posts: 1,408

Rep: Reputation: 104Reputation: 104
There is this

http://freebsd-custom.wikidot.com/start

Also look at
make package
 
Old 02-10-2012, 03:23 PM   #10
baronobeefdip
Member
 
Registered: Jul 2009
Distribution: Debian Squeeze
Posts: 906

Original Poster
Rep: Reputation: 32
nice link tekk but the dhcp server packages aren't in there so this is of no use to me
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
OpenBSD: nvidia drivers, screen resolution and FreeBSD binaries on OpenBSD ::: *BSD 2 08-21-2009 04:18 AM
Why use OpenBSD and not Freebsd? nesrail *BSD 7 01-18-2009 12:05 AM
OpenBSD and FreeBSD danny_beta_read *BSD 13 06-15-2004 01:07 AM
FreeBSD vs. OpenBSD rehab junkie *BSD 14 01-21-2004 08:55 PM
FreeBSD...Programs Install methods... Obscure *BSD 12 06-03-2003 02:35 AM


All times are GMT -5. The time now is 07:24 PM.

Main Menu
 
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration