Good Unix Admin Practices

Good Unix Admin Practices

Post by new2os » Sun, 03 Nov 2002 07:26:52



I never wanted to do unix system administartion but as mac os x has
forced me into it: It comes with a lot of applications and utilities
but many I want are missing and I have to install them. Also I have to
manage a few accts even if many of them are my own. (In os9 too we had
many user and application folders but not the issue of permissions
etc).

Since I have to do it anyway, I thought I should learn elements of good
style before I make a big mess and sprinkle hundreds of files all over
my hard drive.

Here is my basic wish list:

1. All apps should be usable by all users.
2. It should be easy to upgrade to new versions of a particular package
with as little fuss as possible.
3. It should be possible to upgrade to new os versions w/o disturbing
the applications.

With those in mind, and assuming the number of apps I install is only
likely to grow, what are good style practices?

Should all binaries go to one directory? Should I use /usr/local? It is
empty now, but will it be wiped out when I install 10.3 or if I have to
reinstall 10.2? Should I create a brand new folder like /MyApps ?

Should each major app get its own folder with some alias placed for the
binary in a bin directory? Or should I try to classyfy them according
to type (say editors, document-processing, browsers, math, graphics,
etc.) or source (gnu)? Or should all the files of one type (sources,
dosument, manuals, binaries, etc.) go into one folder?

If you have faced these questions and arrived at some answers, I would
be greatful if you'd share your thoughts.

new2osx

 
 
 

Good Unix Admin Practices

Post by ZnU » Sun, 03 Nov 2002 06:43:57




> I never wanted to do unix system administartion but as mac os x has
> forced me into it: It comes with a lot of applications and utilities
> but many I want are missing and I have to install them. Also I have to
> manage a few accts even if many of them are my own. (In os9 too we had
> many user and application folders but not the issue of permissions
> etc).

> Since I have to do it anyway, I thought I should learn elements of good
> style before I make a big mess and sprinkle hundreds of files all over
> my hard drive.

> Here is my basic wish list:

> 1. All apps should be usable by all users.
> 2. It should be easy to upgrade to new versions of a particular package
> with as little fuss as possible.
> 3. It should be possible to upgrade to new os versions w/o disturbing
> the applications.

> With those in mind, and assuming the number of apps I install is only
> likely to grow, what are good style practices?

> Should all binaries go to one directory? Should I use /usr/local? It is
> empty now, but will it be wiped out when I install 10.3 or if I have to
> reinstall 10.2? Should I create a brand new folder like /MyApps ?

> Should each major app get its own folder with some alias placed for the
> binary in a bin directory? Or should I try to classyfy them according
> to type (say editors, document-processing, browsers, math, graphics,
> etc.) or source (gnu)? Or should all the files of one type (sources,
> dosument, manuals, binaries, etc.) go into one folder?

> If you have faced these questions and arrived at some answers, I would
> be greatful if you'd share your thoughts.

Have you, uh, actually used OS X? Things like /usr/local are hidden. GUI
applications get installed in /Applications, usually via drag-and-drop
or an installer of the same sort you'd use in OS 9. The occasional
support file goes in /Library/Application Support. For the most part,
/Applications can be organized however you like. If you don't want to
mess with Unix system administration, don't install Unix apps, and
you'll never have to know that /usr/local exists.

If you really don't mind working with the Unix side of the system, let
Fink manage things for you: http://fink.sourceforge.net/

--
"There's an old saying in Tennessee -- I know it's in Texas, probably in
Tennessee -- that says, fool me once, shame on -- shame on you. Fool me -- you
can't get fooled again."
                             -George W. Bush, Nashville, Tenn., Sept. 17, 2002

 
 
 

Good Unix Admin Practices

Post by Flip » Sun, 03 Nov 2002 06:56:25




> I never wanted to do unix system administartion but as mac os x has
> forced me into it: It comes with a lot of applications and utilities
> but many I want are missing and I have to install them. Also I have to
> manage a few accts even if many of them are my own. (In os9 too we had
> many user and application folders but not the issue of permissions
> etc).

> Since I have to do it anyway, I thought I should learn elements of good
> style before I make a big mess and sprinkle hundreds of files all over
> my hard drive.

> Here is my basic wish list:

> 1. All apps should be usable by all users.
> 2. It should be easy to upgrade to new versions of a particular package
> with as little fuss as possible.
> 3. It should be possible to upgrade to new os versions w/o disturbing
> the applications.

> With those in mind, and assuming the number of apps I install is only
> likely to grow, what are good style practices?

> Should all binaries go to one directory? Should I use /usr/local? It is
> empty now, but will it be wiped out when I install 10.3 or if I have to
> reinstall 10.2? Should I create a brand new folder like /MyApps ?

> Should each major app get its own folder with some alias placed for the
> binary in a bin directory? Or should I try to classyfy them according
> to type (say editors, document-processing, browsers, math, graphics,
> etc.) or source (gnu)? Or should all the files of one type (sources,
> dosument, manuals, binaries, etc.) go into one folder?

> If you have faced these questions and arrived at some answers, I would
> be greatful if you'd share your thoughts.

Personally, I have at least 4 partitions on each system:

1. OS X partition
2. OS 9.2 partition
3. Partition with all my data
4. Partition with all applications

Notes:

1. Some apps insist on being in the OS X partition. While this is bad
coding, you need to allow for it, so make sure the OS X partition is
large enough.

2. I don't need to back up most of the information very often. If you
have an occasional backup of everything, your daily or weekly backups
probably only need to include the data partition and the user folder.

3. This method allows you to do a clean OS installation without
disturbing your apps or data. Granted a few apps (like Photoshop) are
badly behaved and will need to be reinstalled after you upgrade, but
that's the exception and would probably be the case no matter how you
set it up.

 
 
 

Good Unix Admin Practices

Post by new2os » Sun, 03 Nov 2002 08:41:20



> Have you, uh, actually used OS X? Things like /usr/local are hidden...

Well yes, depends on what "actually" refers to. Email, web browsing,
Usenet surfing, creating a few user accts, etc. :-) To do more I have
to install many packages the computer didn't come with. Hence my
musings.

I found /usr/local in unix manner. I don't mind using it, my concern
was will it be overwritten if the os is upgraded or reinstalled? Or am
I better off creating a directory with a name nobody heard of?

Quote:> If you really don't mind working with the Unix side of the system, let
> Fink manage things for you.

I would also happily let Apple manage things for me and not worry, if
that was possible. Problem is, neither Apple nor Fink will do
everything I want. I'll use them when I can but there will be many
times when I have to do it myself and those are the ones my question
was concerned with.

Example in point: Fink doesn't have slrn, so if I want to try it I'll
get it myself. And there will be many such instances.

 
 
 

Good Unix Admin Practices

Post by new2os » Sun, 03 Nov 2002 08:51:35



> Personally, I have at least 4 partitions on each system:

> 1. OS X partition
> 2. OS 9.2 partition
> 3. Partition with all my data
> 4. Partition with all applications

Partitioning is something I have never done, so please excuse my basic
questions.

Is it going to wipe out what is on the hard disk? If so, now is
probably the best time to do it, when the computer is new and there is
very little user information on it (I mean some customization of apps,
but not a whole lot more so far)!

Does Apple give us a good partitioning utility or do I have to get one?

You impllied that it is easier to back up user or data files if they
are on a separate *partition*; why would it be any less convenient if
they were in a separate *directory*?

Thanks.

 
 
 

Good Unix Admin Practices

Post by Matthew Gardine » Sun, 03 Nov 2002 12:12:37



> I never wanted to do unix system administartion but as mac os x has
> forced me into it: It comes with a lot of applications and utilities but
> many I want are missing and I have to install them. Also I have to
> manage a few accts even if many of them are my own. (In os9 too we had
> many user and application folders but not the issue of permissions etc).

> Since I have to do it anyway, I thought I should learn elements of good
> style before I make a big mess and sprinkle hundreds of files all over
> my hard drive.

> Here is my basic wish list:

> 1. All apps should be usable by all users. 2. It should be easy to
> upgrade to new versions of a particular package with as little fuss as
> possible.
> 3. It should be possible to upgrade to new os versions w/o disturbing
> the applications.

> With those in mind, and assuming the number of apps I install is only
> likely to grow, what are good style practices?

> Should all binaries go to one directory? Should I use /usr/local? It is
> empty now, but will it be wiped out when I install 10.3 or if I have to
> reinstall 10.2? Should I create a brand new folder like /MyApps ?

> Should each major app get its own folder with some alias placed for the
> binary in a bin directory? Or should I try to classyfy them according to
> type (say editors, document-processing, browsers, math, graphics, etc.)
> or source (gnu)? Or should all the files of one type (sources, dosument,
> manuals, binaries, etc.) go into one folder?

> If you have faced these questions and arrived at some answers, I would
> be greatful if you'd share your thoughts.

> new2osx

It really depends what version of UNIX you are running, I you are running
Solaris, SUN tends to throw its development tools in /opt, and the rest in
/usr/local which can cause problems sometimes, esp for newbies who don't
know how to setup paths of ldconfig lib directories.

Linux tends to be a little relaxed. Some puritans say that user
applications should be kept seperate from the operating system, as with
the case of FreeBSD/Slackware and other "strict" distros. Personally, as
so long as the package management is up to scratch and all files are kept
track of, it should matter where they are placed.

As for MacOS X, IIRC, user applications are kept in /applications,
however, I am not 100% sure.

As for the source code, /usr/src or in the case of FreeBSD /usr/src for
system and /usr/local/src for user application sources.

Matthew Gardiner

--
UNIX is user-friendly; it's just picky about its friends!

Look, it's a fact of life. Birds fly. Fish swim. IE has
holes big enough to fly a 747 through. What else is new?

 
 
 

Good Unix Admin Practices

Post by Linonu » Sun, 03 Nov 2002 13:31:14


After takin' a swig o' grog, new2osx belched out this bit o' wisdom:

Quote:> Should each major app get its own folder with some alias placed for the
> binary in a bin directory? Or should I try to classyfy them according
> to type (say editors, document-processing, browsers, math, graphics,
> etc.) or source (gnu)? Or should all the files of one type (sources,
> dosument, manuals, binaries, etc.) go into one folder?

> If you have faced these questions and arrived at some answers, I would
> be greatful if you'd share your thoughts.

Use the Gnome source tree.

You can put the executables anywhere.  Non system stuff should go into
/usr/local/bin.

Put the bins in /usr/local/bin, the mans in /usr/local/man, blah blah
blah.  Render unto Torvalds what is Torvalds.   You can tar the whole
lot (/usr/local) and restore them faster than you can edit a Registry
entry.

Chris
--
Microsoft, the company that rejects 30 years of computing that works.

 
 
 

Good Unix Admin Practices

Post by Rev. Don Koo » Sun, 03 Nov 2002 23:13:04



> I never wanted to do unix system administartion but as mac os x has
> forced me into it:

        Sorry to break it to you, my young friend but MAC OS X is not a UNIX
system.  As such, discussion of it is off-topic on "comp.unix.admin".

                Hope this helps,
                        Don

--
***************************      You a bounty hunter?
* Rev. Don McDonald, SCSA *      Man's gotta earn a living.
* Baltimore, MD           *      Dying ain't much of a living, boy.
***************************      "Outlaw Josey Wales"

 
 
 

Good Unix Admin Practices

Post by Rev. Don Koo » Sun, 03 Nov 2002 23:15:20




>>I never wanted to do unix system administartion but as mac os x has
>>forced me into it: It comes with a lot of applications and utilities but
>>many I want are missing and I have to install them. Also I have to
>>manage a few accts even if many of them are my own. (In os9 too we had
>>many user and application folders but not the issue of permissions etc).

>>Since I have to do it anyway, I thought I should learn elements of good
>>style before I make a big mess and sprinkle hundreds of files all over
>>my hard drive.

>>Here is my basic wish list:

>>1. All apps should be usable by all users. 2. It should be easy to
>>upgrade to new versions of a particular package with as little fuss as
>>possible.
>>3. It should be possible to upgrade to new os versions w/o disturbing
>>the applications.

>>With those in mind, and assuming the number of apps I install is only
>>likely to grow, what are good style practices?

>>Should all binaries go to one directory? Should I use /usr/local? It is
>>empty now, but will it be wiped out when I install 10.3 or if I have to
>>reinstall 10.2? Should I create a brand new folder like /MyApps ?

>>Should each major app get its own folder with some alias placed for the
>>binary in a bin directory? Or should I try to classyfy them according to
>>type (say editors, document-processing, browsers, math, graphics, etc.)
>>or source (gnu)? Or should all the files of one type (sources, dosument,
>>manuals, binaries, etc.) go into one folder?

>>If you have faced these questions and arrived at some answers, I would
>>be greatful if you'd share your thoughts.

>>new2osx

> It really depends what version of UNIX you are running, I you are running
> Solaris, SUN tends to throw its development tools in /opt, and the rest in
> /usr/local which can cause problems sometimes, esp for newbies who don't
> know how to setup paths of ldconfig lib directories.

        Then there is reality.  SUN doesn't put anything in "/usr/local".  A
clean install of SOLARIS doesn't have a "/usr/local".

Quote:> Linux tends to be a little

        non UNIX operating system for PCs.

        [...off-topic discussion of non UNIX systems
        such as OS X, LINUX and FreeBSD snipped...]

        Happy to have cleared things up for you,
                        Don

--
***************************      You a bounty hunter?
* Rev. Don McDonald, SCSA *      Man's gotta earn a living.
* Baltimore, MD           *      Dying ain't much of a living, boy.
***************************      "Outlaw Josey Wales"

 
 
 

Good Unix Admin Practices

Post by Woofber » Mon, 04 Nov 2002 04:23:42





> > I never wanted to do unix system administartion but as mac os x has
> > forced me into it:

>    Sorry to break it to you, my young friend but MAC OS X is not a UNIX
> system.  As such, discussion of it is off-topic on "comp.unix.admin".

This is interesting news. What's your level of Mac OS X expertise, and
what features of Mac OS X lead you to this conclusion?

--
Woofbert, Chief Rocket Surgeon, Infernosoft
Now that Mac OS is based on Unix, does that mean we have to adopt the same
cutesy lame-ass plurali standarden as the rest of the Unix world?

 
 
 

Good Unix Admin Practices

Post by David Magd » Mon, 04 Nov 2002 04:48:27



> This is interesting news. What's your level of Mac OS X expertise, and
> what features of Mac OS X lead you to this conclusion?

The Rev. is a troll: please do not feed him. You will find that
adding him to your killfile lowers your aggravation level.

--
David Magda <dmagda at ee.ryerson.ca>
Because the innovator has for enemies all those who have done well under
the old conditions, and lukewarm defenders in those who may do well
under the new. -- Niccolo Machiavelli, _The Prince_, Chapter VI

 
 
 

Good Unix Admin Practices

Post by ScriptOmati » Mon, 04 Nov 2002 05:23:37



> I never wanted to do unix system administartion but as mac os x has
> forced me into it: It comes with a lot of applications and utilities
> but many I want are missing and I have to install them. Also I have to
> manage a few accts even if many of them are my own. (In os9 too we had
> many user and application folders but not the issue of permissions
> etc).

> Since I have to do it anyway, I thought I should learn elements of good
> style before I make a big mess and sprinkle hundreds of files all over
> my hard drive.

> Here is my basic wish list:

> 1. All apps should be usable by all users.
> 2. It should be easy to upgrade to new versions of a particular package
> with as little fuss as possible.
> 3. It should be possible to upgrade to new os versions w/o disturbing
> the applications.

> With those in mind, and assuming the number of apps I install is only
> likely to grow, what are good style practices?

> Should all binaries go to one directory? Should I use /usr/local? It is
> empty now, but will it be wiped out when I install 10.3 or if I have to
> reinstall 10.2? Should I create a brand new folder like /MyApps ?

> Should each major app get its own folder with some alias placed for the
> binary in a bin directory? Or should I try to classyfy them according
> to type (say editors, document-processing, browsers, math, graphics,
> etc.) or source (gnu)? Or should all the files of one type (sources,
> dosument, manuals, binaries, etc.) go into one folder?

> If you have faced these questions and arrived at some answers, I would
> be greatful if you'd share your thoughts.

> new2osx

Please check out the open source version of OpenSysMon which can
be used for monitoring your UNIX/MacOS systems.  It does have a
link for SLA (Service Level Agreements) pages which is where the
system adminstrator gets to tell users what the policies are that
are in effect -- for example: users can't call you up at 10minutes
to 5 and demand that you spend 2 hours fixing the printer they
broke -- it says so in the SLA's.
Hope you find it useful!

--
http://ftp.opensysmon.com is a shell script archive site with an
open source system monitoring and network monitoring software package.
Many platforms are supplied already compiled.

 
 
 

Good Unix Admin Practices

Post by ZnU » Mon, 04 Nov 2002 07:10:42





> > I never wanted to do unix system administartion but as mac os x has
> > forced me into it:

> Sorry to break it to you, my young friend but MAC OS X is not a UNIX
> system.  As such, discussion of it is off-topic on "comp.unix.admin".

OS X -> NeXTSTEP -> 4.3BSD -> UNIX 32V -> UNIX Time Sharing System

Are you complaining that Apple doesn't license the trademark? Let the
Open Group hire people for that job.

--
"There's an old saying in Tennessee -- I know it's in Texas, probably in
Tennessee -- that says, fool me once, shame on -- shame on you. Fool me -- you
can't get fooled again."
                             -George W. Bush, Nashville, Tenn., Sept. 17, 2002

 
 
 

Good Unix Admin Practices

Post by Nikola Milutinovi » Tue, 05 Nov 2002 15:22:55



> Here is my basic wish list:

> 1. All apps should be usable by all users.
> 2. It should be easy to upgrade to new versions of a particular package
> with as little fuss as possible.
> 3. It should be possible to upgrade to new os versions w/o disturbing
> the applications.

On Tru64 UNIX I use the following setup:

- All "first time, just trying" installations go to /usr/local
   Since they are built from source packages, this is the default.

- All "regular" installations go to */opt/<PKG NAME>

Tru64 uses 3 (possibly more) */opt/ locations:

/opt/<PKG NAME> is for root FS stuff that should be visible from single user
mode, like startup scripts, kernel drivers, etc.

/usr/opt/<PKG NAME> is for "readonly files". This is from regular user's point
of view, of course. This portion includes: binaries, include files, dynamic and
static libraries, documentation - basically, the bulk of the package. You should
make symbolic links to places that are common for a particular type of files,
i.e. /usr/bin/ for binaries, /usr/lib for static libs, /usr/shlib for dynamic
libs, etc.

/var/opt/<PKG NAME> is for "variable data". This includes log files, socket/pipe
locations and similar.

Also, Tru64 uses it's own packages, with "Subset Control Scripts" which do
checking and package locking (it is a subset of RPM functionallity). These can
also perform symbolic link creation, if you set things up properly from the start.

So, when I decided to build my own AMaViS 3.0 package, I set it up like this:

/opt/AMaViS-3.0/ - startup scripts
/usr/opt/AMaViS-3.0/ - binaries
/var/opt/AMaViS-3.0/ - "virusmails" and "amavis"

Then SCP creates symbolic links for startup scripts and binaries and that is it.

I restrain myself from using /usr/local too much, since it gets poluted over the
time, with tens, even hundreds of installations (consider deploying a full suite
of GNU tools, plus Perl, plus all that you might need).

Nix.

 
 
 

Good Unix Admin Practices

Post by those who know me have no need of my nam » Tue, 05 Nov 2002 18:57:01


in comp.unix.admin i read:

Quote:>I restrain myself from using /usr/local too much, since it gets
>poluted over the time, with tens, even hundreds of installations
>(consider deploying a full suite of GNU tools, plus Perl, plus all
>that you might need).

use a management tool, e.g., stow.

--
bringing you boring signatures for 17 years