Solaris Notes: Difference between revisions

From Federal Burro of Information
Jump to navigationJump to search
Line 203: Line 203:
   OPTIONS="$OPTIONS -C /etc/mail/local.cf"
   OPTIONS="$OPTIONS -C /etc/mail/local.cf"
  fi
  fi
 
  /usr/lib/sendmail $MODE -q$QUEUEOPTION$QUEUEINTERVAL $OPTIONS &
  /usr/lib/sendmail $MODE -q$QUEUEOPTION$QUEUEINTERVAL $OPTIONS &
  /usr/lib/sendmail -Ac -q$CLIENTQUEUEINTERVAL $CLIENTOPTIONS &
  /usr/lib/sendmail -Ac -q$CLIENTQUEUEINTERVAL $CLIENTOPTIONS &

Revision as of 14:59, 12 June 2012

Context: Solaris 10

Packages

Examining the files of a package that's not install yet:

pkgchk -d SMSmon -l  SMSmon

What package owns file X

pkgchk -l -p /usr/bin/bash

verify, rpm -V for solaris pkgchk:

# pkgchk SMCap2059
ERROR: /usr/local/apache2/conf/ssl.conf
    modtime <08/26/06 05:20:35 AM> expected <06/07/11 04:23:51 PM> actual
    file size <10924> expected <11034> actual
    file cksum <15466> expected <25346> actual

listfiles in a package:

pkgchk -l SUNWsndmr | grep ^Path

Basics

Nice big PS

/usr/ucb/ps -elf

compile man page index, the windex db:

/usr/bin/catman -w

Interfaces

Interface unvwmare: use e1000 devices, it works why not vxnet3?

create hostname file

/etc/hostname.e1000g0

externalname.domain.com

/etc/hostname.e1000g0

internalname.domain.com

plumb bum!

ifconfig e1000g0 plumb
ifconfig e1000g0 plumb

Watching the machine start

http://www.sun.com/bigadmin/content/selfheal/smf-quickstart.jsp

at the ok prompt:

boot -m verbose

Packages of note

SUNW:

SUNWdoc
SUNWman

Getting sshd setup from a core build:

pkgadd -d . SUNWsshcu SUNWsshdr SUNWsshdu SUNWsshr SUNWsshu
system      SUNWsshcu                        SSH Common, (Usr)
system      SUNWsshdr                        SSH Server, (Root)
system      SUNWsshdu                        SSH Server, (Usr)
system      SUNWsshr                         SSH Client and utilities, (Root)
system      SUNWsshu                         SSH Client and utilities, (Usr)

create host keys:

/lib/svc/method/sshd -c

enable service:

svcadm enable network/ssh:default

Test:

ssh localhost

Other

  • that
  • this
  • lsof


UTF-8 issues

if:

Can’t convert to UTF-8: Cannot convert the local codeset strings to UTF-8

then:

mount cdrom
pkgadd -d . SUNWuiu8


ZFS

show volume iostat
zfs list
show performance arc -h

hidden dirs:

.zfs
.zfs/.snapshots
.zfs/.snapshots/ALL THE SNAPSHOTS

controlling access to snap shot dirs:

zfs set snapdir=visible tank/home/administrator

To hide the .zfs folder:

zfs set snapdir=hidden tank/home/administrator

more: https://blogs.oracle.com/amw/entry/using_windows_previous_versions_to1

Nexenta

interfaces : nmc (comnad line) and nmv ( web interface)

shares are called folders.

block size : use default 128k good for many apps. possible to change blocks size on the fly.

in the nmc get a bash shell for OS access:

options expert_mode=1
!bash
show appliance syslog

snapmirror nexenta style:

setup auto-sync create -g

Setting you manpath

look at all the man paths:

[root@alpha-ldap-01 log]# grep "man d " /var/sadm/install/contents | awk '{print $1}'
/opt/csw/share/man
/usr/local/apache2/doc/apache2/docs/man
/usr/local/apache2/man
/usr/local/doc/openldap/doc/man
/usr/local/man
/usr/local/mysql/man
/usr/local/mysql/share/mysql/german
/usr/local/php/man
/usr/local/share/man
/usr/local/ssl/man
/usr/sfw/share/man
/usr/share/man
[root@alpha-ldap-01 log

make a new line for your profile:

grep "man d " /var/sadm/install/contents | \
awk 'BEGIN{ORS=":"}{print $1}' | \
awk '{print "setenv MANPATH=" substr($0, 0, length($0)-1 ) }' >> ~/.profile

run after installing new software. NOT PERFECT, system wide?

Service Administration

Solaris now uses SMF Service Management Facility. Here is a wonderful cheatsheet:

http://www.princeton.edu/~unix/Solaris/troubleshoot/smf.html

Sendmail

from: http://thegreyblog.blogspot.ca/2009/11/configuring-sendmail-on-solaris-10.html


svccfg -s svc:/network/smtp:sendmail listprop
...
config/local_only                    boolean  true
...

/lib/svc/method/smtp-sendmail

local=`/usr/bin/svcprop -p config/local_only $SMF_FMRI 2>/dev/null`
if [ $? = 0 -a "$local" = "true" ]; then
 OPTIONS="$OPTIONS -C /etc/mail/local.cf"
fi

/usr/lib/sendmail $MODE -q$QUEUEOPTION$QUEUEINTERVAL $OPTIONS &
/usr/lib/sendmail -Ac -q$CLIENTQUEUEINTERVAL $CLIENTOPTIONS &