Solaris

From Wikitech
(Difference between revisions)
Jump to: navigation, search
Line 93: Line 93:
 
  $ pkgtrans -s /var/spool/pkg `pwd`/WMFprogram.sparc.pkg WMFprogram
 
  $ pkgtrans -s /var/spool/pkg `pwd`/WMFprogram.sparc.pkg WMFprogram
 
  $ pkgadd -d WMFprogram.sparc.pkg
 
  $ pkgadd -d WMFprogram.sparc.pkg
 +
 +
== Live upgrade of OS ==
 +
 +
See [[Live Upgrade quickstart]]
  
  
 
[[Category:Operating system]]
 
[[Category:Operating system]]

Revision as of 16:44, 15 July 2009

Solaris is an operating system.

Contents

LDAP

# svcadm enable ldap/client
# ldapclient init \
  -a proxyDN=cn=proxyuser,dc=wikimedia,dc=org \
  -a domainName=pmtpa.wmnet \
  -a proxyPassword=whatever \
  -a authenticationMethod=simple 10.0.2.2

SVM

Solaris Volume Manager (formerly Solstice DiskSuite) is a software RAID package for Solaris.

  • display arrays:
# metastat -c
d8               m   19GB d6 d7
    d6           s   19GB c0t2d0s1 c0t3d0s1
    d7           s   19GB c0t4d0s1 c0t5d0s1
d2               m  380GB d0 d1 (resync-46%)
    d0           s  380GB c0t0d0s1 c0t1d0s7 c0t2d0s0
    d1           s  380GB c0t3d0s0 c0t4d0s0 c0t5d0s0
d5               m  8.5GB d3 d4
    d3           s  8.5GB c0t1d0s0
    d4           s  9.2GB c0t0d0s0

(leave off -c for more detailed information)

  • create a new raid-0 array named d0 on c0t0d0s0 and c0t1d0s0:
# metainit -f d0 1 2 c0t0d0s0 c0t1d0s0
  • create a new raid-1 array named d2 from d0 and d1:
# metainit -f d2 -m d0
# metattach d2 d1

(RAID-10 is accomplished by striping mirrors, i.e. it looks like RAID 0+1, except it's not, really)

More information:

Services

Solaris uses Service Management Facility for services.

# svcs -a                    (display all services)
STATE          STIME    FMRI
legacy_run     16:57:12 lrc:/etc/rcS_d/S50sk98sol
legacy_run     16:57:43 lrc:/etc/rc2_d/S20sysetup
...
# svcs -a | grep online      (displays online service)
online         16:57:07 svc:/system/svc/restarter:default
online         16:57:08 svc:/network/pfil:default
online         16:57:08 svc:/network/loopback:default
...
# svcadm disable sendmail    (disable sendmail)
# svcadm enable sendmail     (restart it again)
# svcs -x                    (display failed services)
svc:/network/security/ktkt_warn:default (Kerberos V5 warning messages daemon)
 State: maintenance since Mon 05 Sep 2005 12:04:11 PM BST
Reason: Restarter svc:/network/inetd:default gave no explanation.
   See: http://sun.com/msg/SMF-8000-9C
   See: ktkt_warnd(1M)
Impact: This service is not running.

More information:

Misc differences from Linux

  • /etc/vfstab, not /etc/fstab
  • use share to share NFS filesystems:
share -F nfs -orw=10.0.0.1 /export/homefs
  • df looks odd. use df -h

Software

Solaris packages are available in /h/w/src/solaris/. They install into /aux0/wmf. To build a package:

$ cd /home/wikipedia/src/solaris
$ gzip -dc program-1.0.tar.gz | tar xf -
$ cd program-1.0
$ ../configure.sh --prefix=/aux0/wmf/misc
$ make
$ make DESTDIR=/tmp/program install         # or INSTALL_ROOT= for some programs
$ cd ../
$ mkdir program
$ cd program
$ pkgproto /tmp/program=/ >prototype
$ echo 'i pkginfo' >>prototype
$ cat >pkginfo
PKG=WMFprogram
ARCH=sparc
VERSION=1.0
NAME=A program built for WMF
CATEGORY=application
BASEDIR=/
^D
$ pkgmk -o
$ cd ..
$ pkgtrans -s /var/spool/pkg `pwd`/WMFprogram.sparc.pkg WMFprogram
$ pkgadd -d WMFprogram.sparc.pkg

Live upgrade of OS

See Live Upgrade quickstart

Personal tools
Namespaces

Variants
Actions
Navigation
Ops documentation
Wiki
Toolbox