Showing results for 
Search instead for 
Did you mean: 

software install

Go to solution
steven Burgess_2
Honored Contributor

software install

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





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
steven Burgess_2
Honored Contributor

Re: software install


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


take your time and think things through
Mike Hassell
Respected Contributor

Re: software install


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:

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

Hope that helps.


The network is the computer, yeah I stole it from Sun, so what?
Michael Tully
Honored Contributor

Re: software install


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.

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
Anyone for a Mutiny ?
Bill Hassell
Honored Contributor

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.

Bill Hassell, sysadmin
Santosh Nair_1
Honored Contributor

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.

Life is what's happening while you're busy making other plans
steven Burgess_2
Honored Contributor

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:

It cannot be installed in a different directory.

I am just about to try your last suggestion

Thanks again

take your time and think things through
steven Burgess_2
Honored Contributor

Re: software install

Thanks everyone
take your time and think things through