Re: software install (68 Views)
Reply
Honored Contributor
steven Burgess_2
Posts: 1,493
Registered: ‎11-21-2001
Message 1 of 8 (68 Views)
Accepted Solution

software install

[ Edited ]

Hi all

I'm just getting to grips with NFS as part of study for the HP CERT exam - I have a couple of servers which I can use but basically want to keep everything in my own volume group vg04.

I have a copy of lsof which I want to install and then export to a client for use on that client -

The thing is - When I install lsof it defaults to the standard /opt directory - How can I install it to my own /software directory

I take it that the default install directory is within the source code - Is it possible to change this ? If so , how ?

Any help appreciated in this matter

Regards

Steve

 

 

P.S. this thread has been moved from HP-UX > System Administration to HP-UX > patches - HP Forums Moderator

take your time and think things through
Please use plain text.
Honored Contributor
steven Burgess_2
Posts: 1,493
Registered: ‎11-21-2001
Message 2 of 8 (68 Views)

Re: software install

Hi

Have installed the software and simply moved
/opt/lsof to /software

Didn't think it would be so simple

Still would be interested to know how to change the default destination though

Cheers

Steve
take your time and think things through
Please use plain text.
Respected Contributor
Mike Hassell
Posts: 191
Registered: ‎12-20-1999
Message 3 of 8 (68 Views)

Re: software install

Steve,

I don't have a HP-UX box around to test this on, but I've found the following that might help you.

1. If you are working with a package that was bundled using software distributor, then it typically defaults to /opt which can't be changed at install time. I think the reasoning for this is due to dependancies when it was compiled from source on the /opt directory itself.

2. You can use the -r on the command line to change the default root, for example:

swinstall -s /tmp/lsof.depot -r /software

This doesn't reach your goal though as it will install as /software/opt/lsof, instead of /software/lsof.

From the man page of swinstall in regards to -r:

(Optional) Causes the command to operate on target_selections that are alternate root directories (root filesystems other than /).

Note that you cannot use this option to relocate software during installation. You must use the l=location syntax in the software selection component.

Note that is_locatable must be true for l=:

So I would try this:

swinstall -s /tmp/lsof.depot

(enter the GUI)

Actions -> Change Product Location (lets you revise the source)

You may be able to edit the destination dir here, but I'm not sure on how the is_locatable factor comes into play.

If that doesn't work then install lsof to /opt and run:

swlist -a is_locatable

swinstall (change production location from above).

Let me know if any of the above works as I'm interested as well.

Of course you can always download the true source of lsof:

ftp://vic.cc.purdue.edu/pub/tools/unix/lsof/

I'm sure there's a ./configure option to change the default install directory there.

Hope that helps.

-Mike


The network is the computer, yeah I stole it from Sun, so what?
Please use plain text.
Honored Contributor
Michael Tully
Posts: 7,905
Registered: ‎04-15-1999
Message 4 of 8 (68 Views)

Re: software install

Steve,

I can't help you with source code (at least right now) but have you looked at installing a binary copy from the HP Porting Centre.

http://hpux.cs.utah.edu/hppd/hpux/Sysadmin/lsof-4.61/

Unzip it and the file is in a SD format ready to install. During the install, choose actions --> change target
This will then install it in whichever directory you choose.

Food for thought
Michael
Anyone for a Mutiny ?
Please use plain text.
Honored Contributor
Bill Hassell
Posts: 14,181
Registered: ‎05-29-2000
Message 5 of 8 (68 Views)

Re: software install

In the case of lsof, the program has nothing hardcoded that would prevent the program from running in any other directory. You definitely should not assume that situation with other applications. The days of a single executable are long gone for most significant applications. There are libraries, config files, backend processes, all of which *may* have hardcoded pathnames in the main or subprograms. A 'good' application will discover it's location and configure itself automaticaly.

Indeed, one of the problems with the / (root) filesystem filling up are applications that force their installation to some oddball directory in / and when you move the errant files to another location, the application crashes. So the only way to handle that situation is to create another directory then move everything to the new directory and replace the original directory with a symbolic link.

/opt is part of the SysV.4 specification which most SysV Unix flavors follow.
Please use plain text.
Honored Contributor
Santosh Nair_1
Posts: 1,020
Registered: ‎07-18-2000
Message 6 of 8 (68 Views)

Re: software install

The source for lsof doesn't come with an install script. In fact, if you try to do a make install, it just echo's the steps to "install" the program in the right place. In essence, it tells you to copy the excutable and man pages to a destination directory (which you choose) and and set the permissions properly, That said, there is nothing in the source, at least for lsof, that hardcodes the install path.

Hope this helps.

-Santosh
Life is what's happening while you're busy making other plans
Please use plain text.
Honored Contributor
steven Burgess_2
Posts: 1,493
Registered: ‎11-21-2001
Message 7 of 8 (68 Views)

Re: software install

Hi Mike

Thanks for the reply - I haven't used swinstall at all really - so this is good practice

I've managed to 'change target' and install to /opt/software

If I attempt to Change Product location i get

Product: lsof,r=4.61
is normally installed at:
/opt/lsof

It cannot be installed in a different directory.


I am just about to try your last suggestion

Thanks again

Steve
take your time and think things through
Please use plain text.
Honored Contributor
steven Burgess_2
Posts: 1,493
Registered: ‎11-21-2001
Message 8 of 8 (68 Views)

Re: software install

Thanks everyone
take your time and think things through
Please use plain text.
The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation