zhwg1a:/usr/local/lsof/lsof-4.88 # uname -a
HP-UX zhda B.11.23 U ia64 4206295294 unlimited-user license
下载源文件:
http://hpux.connect.org.uk/hppd/hpux/Sysadmin/lsof-4.88/
解压我的目录是:/usr/local/lsof/
cd :/usr/local/lsof/lsof-4.88
查看安装语言:
zhda:/usr/local/lsof/lsof-4.88 # ./Configure
No target dialect was specified.
Usage: Configure <options> <target-dialect>
<options>: -clean : clean up previous configuration
-d|-dialects : display a list of supported dialect versions
-h|-help : display help information
-n : avoid AFS, customization, and inventory checks
<target-dialect> (****USE -d TO GET TESTED DIALECT VERSION NUMBERS****):
aix|aixgcc : IBM AIX xlc (aix) or gcc (aixgcc)
darwin : Apple Darwin
decosf : DEC OSF/1
digital_unix|du : Digital UNIX
freebsd : FreeBSD
hpux|hpuxgcc : HP-UX cc (hpux) or gcc (hpuxgcc)
linux : Linux
netbsd : NetBSD
nextstep|next|ns|nxt : NEXTSTEP
openbsd : OpenBSD
openstep|os : OPENSTEP
osr|sco : SCO OpenServer < 6.0.0, SCO devloper‘s compiler
osrgcc|scogcc : SCO OpenServer < 6.0.0, gcc compiler
osr6 : SCO OpenServer 6.0.0, SCO compiler
solaris|solariscc : Solaris gcc (solaris) or cc (solariscc)
tru64 : Tru64 UNIX
unixware|uw : SCO|Caldera UnixWare
此处选择hpux
配置:
./Configure hpux
提示运行gmake
运行gmake生成可执行文件lsof,将其拷贝到环境变量中有的目录中后安装完成。
cp lsof /usr/local/bin
zhda:/ #执行which lsof
/usr/local/bin//lsof