installing speed

Hi,

Just installed FreeBSD9 and been reading through the handbook. I am a regular user of linux but want to start using FreeBSD due to some projects we are doing, but it mainly comes down to running apache and security issues, and as far as I am aware this software handles them well.

I administer a couple of debian boxes so i am familiar with the apt package manager. And i think i have my head around ports... (i assume its quite similar except you are actually downloading source rather than pre-compiled binaries, and then extracting them, checking what you want to include when its compiled, then compile it and clean up the archive mess.

However, its taking an awful long time to install KDE4. (its been going for hours).

Please correct me if I am wrong about the way ports works, but I will eventually install an IDE and start writing C++/JAVA when I get into this software a bit more.
 
daz said:
However, its taking an awful long time to install KDE4. (its been going for hours).
Yeeeppp. And don't get us started on OpenOffice. Some of us like sticking needles in our eyes. Big ports take a long time to compile, especially on slower machines, but even on fast ones. Some things you should just use packages for.
 
Any reason you're not using packages? Compiling from source will take a long time - if you're used to Debian, you can get software installed in a similar manner to debian's apt by using

Code:
pkg_add -r
 
throAU you make a perfectly valid point. Is there any advantage to installing from ports over packages? Obviously packages would be very similar to what I am used to. (aptitude). Is the ports mainly so you can compile code for hardware which is not mainstream? Or so you can edit the source and recompile? Because yes ports takes forever.
 
daz said:
throAU you make a perfectly valid point. Is there any advantage to installing from ports over packages? Obviously packages would be very similar to what I am used to. (aptitude). Is the ports mainly so you can compile code for hardware which is not mainstream? Or so you can edit the source and recompile? Because yes ports takes forever.

Once compiled and installed ports are really just packages. Advantages of using ports:
1) You get to choose options to include/exclude, as well as setup compiling flags. Overall the code should be more optimized for your machine.
2) Packages in -STABLE get compiled on average every few weeks. This could be issue with security patches.
3) You just like to compile.

If you have older machine, and you don't care about optimizing you might want to just download packages especially for huge blobs like KDE4, LibreOffice and whatnot.
 
The way I do it is a bit of a hybrid approach.

I'll use packages for everything unless there's some showstopper security problem that needs to be fixed urgently - then I'll recompile what is needed from ports.

Compiling is all well and good, however I find the downsides are:
- you need a lot of disk
- you need a lot of CPU time
- you need a lot of admin time to select the relevant options in each and every package

I figure rather than me picking some non-sensible options in the port building process, I'll rely on someone who has set sensible package defaults as much as possible.

As far as compile flags go: well yeah there may be some optimisation there. You're also more likely to expose yourself to compiler bugs, "gotchas" with some packages not liking specific optimisations, etc. Most of my boxes have plenty of idle CPU time anyhow.

If its just a desktop box (sounds like it, with KDE) then go for it... but if its a production box you can shoot yourself in the foot if you're not careful :D
 
  • Thanks
Reactions: daz
Cool thanks.

Yes this is a dev box, and I want to get netbeans and some other bits and bobs sorted on here too. When i create a production environment, i will probably just have it running the bare minimum.

A couple of things.
Firstly yes this is actually running in a VM so I can test some software. And do some development. I am a PHP/MySQL developer (but i prefer to use postgres when I get the choice, as that database has better features. (mainly allowing better searching than InnoDB but still allowing FK contraints) and the stored procedures/etc are more customizable. + oracle doesn't change the default settings each time they release a new version.

Anyway, yeh I put KDE on, after about 3 days of compiling I canned it and installed from packages. I had installed a LOT of ports packs. I got a few warnings saying I had a couple of newer versions of this/that installed when I installed KDE but it loaded up fine.

However, my next problem is the mouse does not work in KDE. I have read the handbook and it said under 6.4.2: Xorg uses HAL to autodetect keyboards and mice. The sysutils/hal and devel/dbus ports are installed as dependencies of x11/xorg, but must be enabled by the following entries in the /etc/rc.conf file:

so I did that using (EE), I rebooted and sure enough it still does not work. Do you have any suggestions of which I may try?
 
I restarted again, and it just started working.. dont know why No biggie..

But I have 1 question about ports.

If ports knows what all the options for all the packages are (recursively) is there any way of answering ALL the questions about what packages to select for the one you are installing and its dependancies dependancy and so on (yes I do understand what recursion is as I am a OOP programmer). Is there no application which allows you to pick it all, before the downloading and building starts? So you can then walk away for a day while ports compiles the system? Because I have to keep going back and choosing packages (half of which I don't even know what some of them are so i just leave the defaults).

If you could build some sort of tree, of the freebsd source packages then have your selections chosen whilst you are in front of the PC. I could have compiled this overnight or something.
 
# make config-recursive
# make fetch-recursive

Then it is good to run this again in case dependency is missed with last fetch.
# make config-recursive
 
Cheers, this is exactly what I want:

make config-recursive

Thanks for the link to the ports manual too. I was sure you could do something like that. I just didn't know how.. I guess if you don't ask or read about it somewhere then you will never know, but this should save me time.
 
drhowarddrfine said:
Yeeeppp. And don't get us started on OpenOffice. Some of us like sticking needles in our eyes. Big ports take a long time to compile, especially on slower machines, but even on fast ones. Some things you should just use packages for.

Oh mannnnnnnnn. I did Open Office on my 1.6GHz dual core laptop about 2 years ago, took about 30 hours.

I now run on a hex-core i7 and I generally can buildworld, buildkernel, release, and install Xorg, firefox, linuxulator, and all of the other goodies required to have a 'typical' desktop in about 3-4 hours. Massive difference from my dual core. I've never actually tried a quad core... I guess I skipped a phase. (I also did an Xorg build on an 800MHz P3... oh man that was fun).

-Brandon
 
Back
Top