06-20-2002 04:07 PM - last edited on 11-20-2012 06:48 PM by Maiko-I
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
Solved! Go to Solution.
06-20-2002 04:42 PM
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
06-20-2002 05:08 PM
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.
06-20-2002 05:15 PM
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
06-20-2002 05:26 PM
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.
06-20-2002 05:30 PM
Hope this helps.
06-20-2002 05:37 PM
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
is normally installed at:
It cannot be installed in a different directory.
I am just about to try your last suggestion