Basic Administration-Commands Solaris11
Basic Administration-Commands Solaris11
Common system configuration tasks have changed in Oracle Solaris 11 with the
Service Management Facility (SMF) configuration repository being used to store
configuration data. With the addition of configuration layers, administrators now have better
control and assurance that their configuration changes will be preserved across system
updates.
Configuring nodename:
# sysconfig configure -s
Create a system configuration profile:
Boot Environments
Boot Environments are individual bootable instances of the operating system that
take advantage of the Oracle Solaris ZFS filesystem snapshot and clone capability. During
a system update, new boot environments are created so that system software updates can be
applied in a safe environment. Should anything go awry, administrators can boot back into
an older boot environment. Boot environments have low overhead and can be quickly
created giving administrators an ideal best practice for any system
maintenance work.
ok boot -L
Boot into a boot environment from SPARC boot PROM:
ok boot -Z rpool/ROOT/solaris-05032012
# pkg update
Do a dry run of a system update to understand what packages may change:
# pkg list
Get more information about an installed package called diagnostic/wireshark:
# pkg publisher
Connect to the Oracle support repository and update the system:
Disk Devices
Show all disks on a system:
# cfgadm -s “select=type(disk)”
Configure a disk to be used via iSCSI
# fdisk -B c3t2d0s0
# prvtoc /dev/rdsk/c3t0d0s0 | fmthard -s – /dev/rdsk/c3t2d0s0
On x86 systems:
# zoneadm list -v
List all configured zones:
# zoneadm list -c
List all installed zones:
# zoneadm list -i
Install a zone:
# zlogin -C testzone
Halt a zone
# zonestat -z testzone 10
Service Management Facility
Service Management Facility (SMF) provides a framework for managing services on Oracle
Solaris including the ability to automatically restart any service after failure. Each service
instance is named with a fault management resource indicator (FMRI).
# svcs
List detailed information about system/zones:
# svcs -l system/zones
List processes associated with the network/netcfg service:
# svcs -p network/netcfg
Show why services that are enabled but are not running, or preventing other services from
running:
# svcs -xv
Enable a service called network/dns/client:
# svcprop network/ssh
Interactively display the general/enabled property within the SMF configuration repository
for the service network/ssh:
# svccfg
svc:> select ssh:default
svc:/network/ssh:default> listprop general/enabled
svc:/network/ssh:default> exit
Set the port number of the application/pkg/server service to 10000:
Solaris 11 Networking
Oracle Solaris 11 uses profile based networking configuration, comprised of two
configuration modes – manual and automatic. These modes differ in how administrators
configure the system, either manually using dladm and ipadm, or through creating and
applying network configuration profiles.
# dladm show-phys
Create interface with static IPv4 configuration:
# netcfg
netcfg> create loc datacenter
Created loc ‘datacenter’. Walking properties …
activation-mode (manual) [manual|conditional-any|conditionalall]>
conditional-any
conditions> ip-address is 192.168.1.27
nameservices (dns) [dns|files|nis|ldap] dns
nameservices-config-file (“/etc/nsswitch.dns”)>
dns-nameservice-configsrc (dhcp) [manual|dhcp]> manual
dns-nameservice-domain> datacenter.myhost.org
dns-nameservice-servers> 192.168.1.1
dns-nameservice-search>
dns-nameservice-sortlist>
dns-nameservice-options>
nfsv4-domain>
ipfilter-config-file>
ipfilter-v6-config-file>
ipnat-config-file>
ippool-config-file>
ike-config-file>
ipsecpolicy-config-file>
netcfg:loc:datacenter>
netcfg:loc:datacenter> exit
Committed changes
Activate a network configuration profile:
# netadm enable -p ncp datacenter