October 19th, 2001, 09:34 AM
Setting up ports
I've been using FreeBSD4.3 for a couple of months now, and feel like I'm getting the hang of it. I've setup samba, linking it to our Win2k network, and got it showing up like a Windows machine on the network. I've got Apache set up with ssl and php and mysql and everything works well.
My problem is that when I was installing FreeBSD in the first place I said 'no' to installing the ports collection, thinking that I would have less to deal with and less to confuse me. Now I want to try and install some ports, but don't really know how to start.
I've looked for ages in the handbook, and searched for help, but couldn't find any.
I have no /usr/ports dir, and I'm not sure what I need to do to be able to use ports.
October 19th, 2001, 06:20 PM
One of the biggest advantage BSDs over Linux is the ports system.
Ports vs. Packages
- Precompiled binaries. Compiling from source takes time, therefore, installing programs from packages takes no time.
- Unlike Linux RPMs which often fail to locate the neccessary dependencies from version to version, *BSDs packages is smart enough to locate/download/install the needed dependencies for you automatically whenever you install something.
- Not durable and unreliable. When installing software from packages, as mentioned above, it will check/fetch dependencies automatically, however, it doesn't check for errors. Say you are unable to install a software from ports successfully but it goes smoothly with precompiled binary. Do you think your program is durable and reliable? Obviously no, just because something must be wrong with your compiler or so. Continue using that program is unreliable and what you should do is to find out what went wrong and fix the problems.
- Not configurable. Like RPM, you can't specify configure options like you normally do with ./configure --prefix=/foo/bar. When you are accepting everything by default, that's not flexible and there might be some features you wanted to enable but it's disabled by default.
- Highly configurable
- Time saving. Each port in the ports tree must have a port maintainer in order to make it to the ports tree. What a port maintainer do is to update the version, write necessary patches, find out all the required dependencies, write scripts to do what pre-install and post-install should do. It's alot works, hard ones that you would normally do if you choose to compile a software from source.
- Some programs might take forever to get it installed. Say your system has no X and you are trying to install the latest KDE, it could take you 50 hours to get it and dependenices installed. Not to mention in the event of a compilation failure, you might have to start the whole long process all over again from scratch.
>> I have no /usr/ports dir, and I'm not sure what I need to do to be able to use ports
Install the ports collection from your CD.
If you want to use current port, you need to track 4.x-STABLE. The ports in your CD are really outdated.