Monday, August 20, 2012

lsof adventures on sol11.

Solaris 11, I heart you. But I h8 you. I do. You've skipped out of one of the most useful toolks known to sysadmindom:
lsof

Why? Well... we can roll our own, can't we? Sure we can.

Solaris 11 does not have a /usr/local/bin or /usr/local/sbin .
Create skel directories:
# mkdir -p /usr/local/bin
# mkdir -p /usr/local/man/man8

Then, with your downloaded lsof.tar.Z code from
ftp://sunsite.ualberta.ca/pub/Mirror/lsof/lsof_4.86.tar.Z

Read the READMES. Read them again..
# ./Configure solariscc
# make
# make install

And then you see...

Please write your own install rule. Lsof should be installed...

grumble. Thanks Vic for assuming I have half a brain... heh...

$ vi Makefile

DESTDIR= /usr/local
BIN=    ${DESTDIR}/sbin
DOC=    ${DESTDIR}/man/man8
GRP= sys  



 install -m 2755 -o root -g ${GRP} ${PROG} ${BIN}
 install -m 444 ${MAN} ${DOC}

If it still craps out...
# cp lsof /usr/local/sbin/.
# chmod 2755 /usr/local/sbin/lsof
# chown root:sys /usr/local/sbin/lsof
# cp lsof.8 /usr/local/man/man8/.
# chmod 755 /usr/local/man/man8/lsof.8

No comments: