Solaris setup

BigAdmin has patch info and howtos

Get software from www.sunfreeware.com

Solaris Admin and HOWTOs

Install:
  wget
  gnu tar
  lsof -> or use pfiles <pid>
  top -> or use prstat [-a]
  vim

For gnu tar:
gunzip libgcc package: gzip -d ...
pkgadd libgcc: pkgadd -d ...

Check install:
pkginfo | grep tar
Check details:
pkginfo -l SMCtar

to remove: pkgrm SMCtar

create link in /usr/local/bin for gtar
cd /usr/local/bin
ln -s /usr/sfw/bin/gtar gtar

Check patch level:
ls -l /var/sadm/patch
OR
showrev -p

uname -X (release, number of CPUs)
/usr/sbin/psrinfo [-v] (cpu status, type, and speed)
listusers (lists all users)
/etc/passwd file format
groupadd -g 400 develop (add group 'develop' with GID 400)
usermod -G develop existing_user (add existing_user to group develop)

grpck (check consistency of group file)
pwck (check consistency of passwd file)

useradd -d /export/home/username -m -s /usr/bin/bash -c "some comment" username

Recursive, change encountered Links, Prevent following links
chown -R -L -P <owner>:<group> <dir | file>
using * for chown for dir or file on Solaris 10 did not work, had to go up a dir and specify dir

Gathering system info

Run levels:

Run level
2 is multi-user mode one step beyond single-user
3 is normal user mode

Create links to start stop scripts:
/etc/rc#.d/S##<name> start process
/etc/rc#.d/K##<name> stops process

r#.d is run level
## provides script ordering

/etc/profile for default profile

common paths to utils
/usr/bin
/usr/sbin
/usr/local/bin
/usr/sfw/bin


Solaris tar is broken, it gets hung with the tar file growing forever until you kill tar
tar with exclude
create exclude file listing all the directories and files you don't want included
tar -cvpfX newTarFile.tar excludeFile whatToTar

gnu tar works
gtar -cvpf newTarFile.tar -X excludeFile dirToTar > tarFile.log

excludeFile contains list of dirs and/or files to exclude

Routing tables:

netstat -r

To see IP addresses:


netstat -rn

To find required patches:
Go to sunsolve.sun.com
Click on Patch Cluster & Patch Bundle Downloads
Under 'J2SE Patch Clusters'
Expand: J2SE Patch Clusters
Click on README and compare with output of showrev -p
You will need a support contract to download these.

Comments

Popular posts from this blog

Sites, Newsletters, and Blogs

Oracle JDBC ReadTimeout QueryTimeout