Solaris
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. Each service has an identifier called an FMRI, that looks like a URI.
# 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
- (NOT FOR ZFS!) use share to share NFS filesystems:
share -F nfs -orw=10.0.0.1 /export/homefs
- make sure to edit /etc/dfs/dfstab afterwards to include the share command, so it takes effect on reboot.
- For ZFS, do this instead:
zfs set sharenfs=rw=10.0.0.1 export/homefs
- no need to edit any files, sharenfs is persistent.
- df looks odd. use df -h
Software
We use the Toolserver (TS) packages for installing extra software. All the package names start with TS, like TSmutt, and install into /opt/ts/bin (config in /etc/opt/ts).
Check out the ts-specs repo:
$ svn co https://svn.toolserver.org/svnroot/toolserver/trunk/ts-specs
Build + install something:
$ pkgtool build www/TSphp53
You can also use build-only (to skip installing), install-pkgs and uninstall-pkgs. Be aware that one spec, like TSmutt, might map to several Solaris packages (TSmutt-root, TSmutt).
Check for packages that need upgrading:
$ ./upgrade -a
Live upgrade of OS
Patch commands
Ordinarily you will be able to just bring your current copy of Solaris up to speed (or create an alternate boot environment and bring that up to speed) with the /opt/ts/bin/pca command (see Live Upgrade quickstart for more info on this). Some useful commands:
- pca -l
- show all patches not yet installed
- showrev -p
- show the patches installed on your currently running system
lumount name-of-alt-boot-env-here showrev -p -R /.alt.name-of-alt-boot-env-here
- show the patches installed on your alternate boot environment
Note that PCA is not part of Solaris. The Sun equivalent is smpatch, but it's annoying to use, so use PCA instead (everyone else does).
Installing Solaris
See Installing Solaris.