LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
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
  Search this Thread
Old 07-19-2002, 08:38 AM   #1
sancho5
Member
 
Registered: Jul 2001
Location: Utah
Distribution: RedHat v7.3, OpenBSD 3.3, FreeBSD 5.0
Posts: 327

Rep: Reputation: 30
Updating process on FreeBSD 4.6


We just set up a new FreeBSD 4.6 server and I was wondering the process for keeping it up to date in two different scenarios - I guess I'm looking at it from the openbsd standpoint that goes both ways:

1.) patch the specific binaries/etc that you want to update by downloading the diffs from the errata page
- or -
2.) take the time to rebuild the system fully with a new kernel and new userland and binaries from a cvs download.

Is there a similar distinction in FreeBSD? For instance, right now I'd like to rebuild OpenSSH to 3.4 and Apache to 2.x latest-stable.
At a later date when we can down the server, I'd like to do a full system rebuild and update from fresh cvs.

What's the suggested process for both?
 
Old 07-25-2002, 12:58 PM   #2
algould
LQ Newbie
 
Registered: Jul 2002
Distribution: FreeBSD 4.6 Stable, Mac OS X
Posts: 24

Rep: Reputation: 15
I recommend reading the documentation on cvsup and installing cvsupit. cvsupit can be found in the ports at:

/usr/ports/net/cvsupit

If you run cvsup periodically, your download times will remain relatively short. Then you can recompile the kernel or base operating system whenever it is convenient for you.

When you recompile the operating system, don't forget to run mergemaster. mergemaster helps you install new configuration files without losing changes that you've made to the original files.

On my 900MHz AMD Thunderbird with 1.5GB RAM (it's a database server), recompiling the kernel and base operating system takes less than 2 hours.

Best of luck,

Andrew Gould
 
Old 07-25-2002, 11:30 PM   #3
sancho5
Member
 
Registered: Jul 2001
Location: Utah
Distribution: RedHat v7.3, OpenBSD 3.3, FreeBSD 5.0
Posts: 327

Original Poster
Rep: Reputation: 30
Thanks for the tip. Would you recommend cron'ing the cvsup process? I've ran cvsup and synced my src tree, but I wonder if that can be used to update the ports tree periodically as well?

Also, am I to understand that cvsup docs will explain what commands to use to compile and install new kernel and userland? Including make world, etc? I've got the OpenBSD update process down, but having a hard time pinning the Free- way.
 
Old 07-26-2002, 06:36 AM   #4
algould
LQ Newbie
 
Registered: Jul 2002
Distribution: FreeBSD 4.6 Stable, Mac OS X
Posts: 24

Rep: Reputation: 15
Yes, you can execute cvsup from cron. I don't simply because I don't leave my server on all the time.

Recompiling the kernel:
1. cd /usr/src/sys/i386/conf/
2. Copy GENERIC
 
Old 07-26-2002, 06:48 AM   #5
algould
LQ Newbie
 
Registered: Jul 2002
Distribution: FreeBSD 4.6 Stable, Mac OS X
Posts: 24

Rep: Reputation: 15
Darn it, I accidentally hit the submit button! Here we go again:

Yes, you can execute cvsup from cron. I don't simply because I don't leave my server on all the time.

Here are quick instructions for recompiling the kernel and system:

Recompiling the kernel:
1. If your computer is networked, to into single-user mode.
2. cd /usr/src/sys/i386/conf/
3. If you want to make changes to the kernel configuration,
copy GENERIC to a new configuration file:
cp GENERIC MYKERNEL (use all caps)
4. Edit MYKERNEL to meet your needs.
5. cp /usr/src
6. make buildkernel KERNCONF=MYKERNEL
7. make installkernel KERNCONF=MYKERNEL
8. shutdown -r now

Recompiling the base operating system:
1. If your computer is networked, to into single-user mode.
2. man mergemaster (you'll want to use this)
3. cd /usr/src
4. make world
5. mergemaster (I use 'mergemaster -i')
6. shutdown -r now

Best of luck,

Andrew Gould
 
Old 07-26-2002, 07:52 AM   #6
sancho5
Member
 
Registered: Jul 2001
Location: Utah
Distribution: RedHat v7.3, OpenBSD 3.3, FreeBSD 5.0
Posts: 327

Original Poster
Rep: Reputation: 30
Awesome. This should get me moving. The docs are always a little easier to swallow when I see ahead of time where they're going.

Is this the process that should be followed every time a new errata update comes out? For instance with the recent Apache chunked encoding exploit, would you cvsup and then rebuild userland fully to fix apache, or is there a simpler process for updating just the one part of your tree?

And the question remains, is the ports tree periodically updated and if so, how does one update thier ports tree?

TIA
 
Old 07-26-2002, 08:40 AM   #7
algould
LQ Newbie
 
Registered: Jul 2002
Distribution: FreeBSD 4.6 Stable, Mac OS X
Posts: 24

Rep: Reputation: 15
Whether you apply a patch or recompile the system is up to you. The decision may be determined by whether you can afford the downtime. You can apply individual patches; but I've never done it, so I have no advice for you. Basically, I cvsup on a fairly regular basis; but I only recompile when issues occur that affect how I use of the server.

Install cvsup by installing cvsupit from the ports. The configuration process will ask you which sources you want to update and whether you want to update the ports system and/or documentation. I selected everything.

Please note that applications that have been installed via ports are not updated when cvsup updates the ports system or when you recompile the base system. You have to update these applications separately.

Have fun,

Andrew Gould
 
Old 07-26-2002, 04:38 PM   #8
sancho5
Member
 
Registered: Jul 2001
Location: Utah
Distribution: RedHat v7.3, OpenBSD 3.3, FreeBSD 5.0
Posts: 327

Original Poster
Rep: Reputation: 30
Great - and thanks for the time you took to explain.
 
  


Reply



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



Similar Threads
Thread Thread Starter Forum Replies Last Post
how a father process know which child process send the signal SIGCHLD icoming Programming 10 07-20-2010 07:26 AM
As a FreeBSD user, what is the best things you like about FreeBSD? t3gah *BSD 6 06-10-2005 02:38 PM
how can i get the process id on exec a process antony_csf Linux - Software 1 06-17-2004 03:06 AM
Bash Scripting - child process affecting parent process mthaddon Linux - General 1 05-02-2004 01:19 PM
problem with binding process and than execute another process chapa Programming 0 08-27-2003 03:47 AM

LinuxQuestions.org > Forums > Other *NIX Forums > *BSD

All times are GMT -5. The time now is 05:56 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration