Stegnation
September 24th, 2003, 16:44
Hi,

I have a question on updating software. I've installed Apache with MySQL, PHP, mod_perl, mod_ssl, OpenSSL by compiling the sources. But what if I have to update one of these packages? Do I have to compile everything all over again?

I'm new to FreeBSD and I'm using version 4.8.

Jeroen

v902
September 24th, 2003, 16:55
Did you do this from ports/packages or did you fetch the sources from the project's site and compile them? If you did it through ports just get portupdate and read:
http://screamingelectron.org/phpBB2/viewtopic.php?t=221
If packages, then you can still use portupgrade, or uninstall and reinstall new one.

Note: Doing this may cause loss of information so backup ;)

Stegnation
September 24th, 2003, 16:58
I fetched the sources from all the different websites and compiled them. I did this because I had to set a lot of options.

v902
September 24th, 2003, 17:11
You can set options when compiling from ports by modifying the Makefile or setting a command line option.

I don't know what to tell you, you'll probably just have to manually re-install.

soup4you2
September 24th, 2003, 17:15
i would remove them and goto the /usr/ports/www/mod_php4 dir and run the install from there. it will present you w/ a dialog for what to compile in w/ it. then just cd into the mod_perl or whatever stuff you wish to have.. that way when things get outdated it's a snap to update.

Stegnation
September 24th, 2003, 17:16
Ok, so I can just install everything from ports and when I want to custom compile I'll just have to edit the Makefile or set a command line option? Great news!

This makes everything a lot easier I guess :D

Stegnation
September 24th, 2003, 17:20
Ok, one question. I've tried it before but I wasn't successful. How do I delete all the software I just compiled? I tried uninstalling but it only works with a few. What are all the files I have to delete, like config files of lines in config files?

Ow, and when I check the ports collection, even using FTP, some ports are really old releases. How do I get newer ones? That's another thing why I did it all by hand.

soup4you2
September 24th, 2003, 17:20
Ok, so I can just install everything from ports and when I want to custom compile I'll just have to edit the Makefile or set a command line option? Great news!

This makes everything a lot easier I guess :D

look in the makefile for statements like:

.if defined(WITH_MYSQL)

that means when you run make you can run it like:

make WITH_MYSQL=yes install clean

that would include mysql

and near the top you should see

CONFIGURE_ARGS= --with-mysql=no

you can put your normal configure args there if you want.. but i recommend the method above.. for the reason being when you run portupgrade you can have it include those WITH statements with out loosing them.. inside your /usr/local/etc/pkgtools.conf there's a statement like:


# MAKE_ARGS = {
# 'databases/mysql323-*' => 'WITH_CHARSET=ujis',
# 'ruby18-*' => 'RUBY_VER=1.8',
# 'ruby16-*' => 'RUBY_VER=1.6',
# }

MAKE_ARGS = {


you should get the jist of howto configure it..

bmw
September 24th, 2003, 21:51
Ow, and when I check the ports collection, even using FTP, some ports are really old releases. How do I get newer ones? That's another thing why I did it all by hand.
First thing when using ports: you need to keep it up-to-date. You should read up on using CVSup or plain old cvs to update your ports tree. See:

http://www.freebsd.org/ports/index.html

CVSup is the modern method, and re-uses your existing ports tree, but you have to build a few extra ports to get it setup. Plain old cvs is pretty easy to use, but it initially requires you to blow away your existing ports tree that you got off the CD ISO and re-fetch it via cvs (the CD ports tree is missing all the CVS info). Not a big deal tho, and takes only a couple of hours via DSL or cable modem. On my development boxes at work, I update nightly from a central server that gets its stuff via CVSup, also nightly. At home, I usually update via plain cvs about every couple of weeks, when I think of it. :-)

All those Top-10 ports you are using (eg mod_php) will be right up-to-date with the latest versions of their respective software I'll wager. Only more esoteric stuff is often found to be out-of-date.

elmore
September 24th, 2003, 21:58
Actually KrUsTy! wrote up a nice how-to on keeping ports up to date see here:

http://screamingelectron.org/phpBB2/viewtopic.php?t=221

bmw
September 24th, 2003, 22:06
Yeah, that's good, do what elmore sez ... ^^^

Loop
September 25th, 2003, 00:19
Actually KrUsTy! wrote up a nice how-to on keeping ports up to date see here:

http://screamingelectron.org/phpBB2/viewtopic.php?t=221

Shame that cvsupit is deprecated :shock:

Because compiling cvsup from the port is painful on a slow connection like mine, I install the cvsup-no-gui package and add this as a single line to /etc/crontab

[code:1:365abbe61d]# Update ports in the wee hours Wednesday
1 4 * * wed root cvsup -g /usr/local/etc/cvsup/ports-supfile 2>&1 | mail -s "FreeBSD ports cvsup run" root
[/code:1:365abbe61d]

My ports are updated automagically and the result emailed once a week.

I prefer to cvsup source (this is a -STABLE box) manually

Stegnation
September 25th, 2003, 11:48
Thank you for all the information :)

Just one last question.

What's the best way to delete all the software I've compiled?
Just delete all the directories, or are there any config files that have been changed in FreeBSD?

optyk
September 25th, 2003, 12:21
Removing self-compiled software can be a tricky proposition, since it doesn't have a db to track what was installed. *Sometimes* the developers will put an uninstall target in with the makefile, so it's as easy as 'make uninstall', but don't count on that as it isn't the norm. Depending on what and how much you have installed it might be easier to just wipe your drive and start clean.

Stegnation
September 28th, 2003, 14:37
Thank you all for helping me out. I've succesfully deleted everything and did an update with CVSup and installed some ports and already did a portupgrade :)

A question. I have a website hosted by some hosting company and everyday I get an email like this (on FreeBSD):

Sablot-0.98 < needs updating (port has 1.0)
XFree86-libraries-4.3.0_5 < needs updating (port has 4.3.0_6)
libtool-1.3.4_4 < needs updating (port has 1.3.5_1)
screen-3.9.15_1 < needs updating (port has 4.0.1)
webmin-1.100_9 < needs updating (port has 1.100_10)

I've checked the crontab but I didn't see anything special listed. So how do they do this?