Oracle Solaris Guide For Linux Users
Oracle Solaris Guide For Linux Users
Audience
People who have basic knowledge of Linux
People who are planning to operate an Oracle Solaris system
Positioning of documents
Review Design Build Operate
Oracle Solaris Guide for Linux Users Oracle Solaris Command Reference
(This document) for Linux Users
I want to apply a
patch, but what is
the command... How do I check
the status of
How do I services?
change the
IP address?
Intended for Linux users, this document explains the operations and
functions required in Solaris operation scenarios.
- The Solaris OS runlevels to keep in mind are 0 (OS stopped), s (single user), 3 (multi-user), 5 (power off),
and 6 (OS restart).
- For details on service starts that differ by runlevel, see "5. Service Management."
7/72 Copyright 2014-2016 FUJITSU LIMITED
Starting the OS Environment
OS startup in Linux and Solaris
Linux
- After powering on the hardware, select the boot kernel from the GRUB2
environment.(In RHEL 6, the environment is GRUB.)
- You can start the OS in single user mode by modifying an option from the
GRUB2 environment.
Solaris
- After powering on the hardware, start from the OBP (OpenBoot PROM)
environment.
- OBP is an environment including both the PC server BIOS and Linux GRUB.
- Use exclusive commands at the prompt shown as "ok" (commonly called the
"ok prompt").
Execution
example
Start the Solaris OS.
{0} ok boot
- In the OBP environment, you can check the boot disk and start options (single user mode, etc.).
Operations in addition to that
include checking the connected devices and setting various OBP parameters.
8/72 Copyright 2014-2016 FUJITSU LIMITED
Implementation of a GUI Environment Solaris
- For details, see the Oracle Solaris 11.3 Desktop Administrator's Guide.
http://docs.oracle.com/cd/E53394_01/html/E54808/gmdah.html#scrolltoc
- RHEL 7
Execution
example
Stop the Linux OS.
# systemctl poweroff
- You can continue using the shutdown command in RHEL 7 to maintain compatibility. However, we
recommend using the systemctl command.
10/72 Copyright 2014-2016 FUJITSU LIMITED
Stopping the OS Environment 2/2
Solaris
- Although Solaris uses the shutdown command in the same way as RHEL 6,
the specification of options is different.
- In the –g option, specify the time (in seconds) until the OS stops. In the –i
option, specify an operation such as stopping or restarting the OS.
Execution
example
Start in single Add a runlevel. Add a runlevel. Start in single user mode from the
user mode kernel /vmlinuz-... systemd.unit=rescue.target OBP (OpenBoot PROM) environment.
root=... 1 {0} ok boot –s
Stop OS Specify the stop option (-h) Specify the stop option Execute the shutdown command.
in the shutdown command. (poweroff) in the systemctl Specify the stop option (-i5).
# shutdown -h now command. # shutdown -y -g0 –i5
# systemctl poweroff
Restart OS Specify the restart option (- Specify the restart option Execute the shutdown command.
r) in the shutdown (reboot) in the systemctl Specify the restart option (-i6).
command. command. # shutdown -y -g0 -i6
# shutdown -r now # systemctl reboot
Other execution - Stop at 10 o'clock. - Suspend the OS. - Start via a network.
examples # shutdown -h 10:00 # systemctl suspend {0} ok boot net:dhcp
- Stop after 5 minutes. - Hibernate the OS. - Restart after 30 seconds.
# shutdown -h +5 # systemctl hibernate # shutdown -y -g30 -i6
For details, see the Oracle Solaris Command Reference for Linux Users.
12/72 Copyright 2014-2016 FUJITSU LIMITED
Reference: Solaris System Locale Solaris
- The locale –a command can check for the locales that can be set.
BE01
BE01 BE01 BE01 BE02 BE02 BE02
BE02 BE02
BE01
Free BE01 BE01
area
Package
Media
Linux server
2. Application via Internet from supplier site
or
Package supplier
Apply via Internet
or
Oracle (release repository)
Package Solaris server
Provide
Media Repository image package
Package
Display package
yum info package_name pkg info package_name
information
For details, see the Oracle Solaris Command Reference for Linux Users.
18/72 Copyright 2014-2016 FUJITSU LIMITED
Reference: Environment Recovery to Before Solaris
Package Application 1/2
Environment recovery using Boot Environment (BE)
By using a BE in Solaris, you can failback to the environment from a time
before before package application.
If the OS does not start because a package was applied, you can select
and start a pre-package-application BE from OBP.
- A BE environment is not a system backup. System backups must be obtained in case of disk
error and other failures.
Execution
example
(To specify a BE on the OBP environment)
1. From the BE list, specify the number of the BE to start. (Execute boot –L.)
{0} ok boot -L
Boot device: /virtual-devices@100/channel-devices@200/disk@1 File and args: -L
1 solaris-1
2 solaris-2
Select environment to boot: [ 1 - 2 ]:1
Group - By default, the user belongs to the group - The user belongs to not only the group
with the same name as the user name. but also the category called project. It is a
resource control unit such as an IPC
parameter(*).
* IPC (Inter Process Communication)
- The user management commands (useradd, usermod, userdel) have the same names in Linux and
Solaris. However, you need to note that the meanings may differ depending on the option.
- When configuring/changing accounts and passwords, do not edit an authentication file (/etc/passwd,
/etc/shadow) directly. Instead, configure/change them by using the respective commands (usermod,
passwd, etc.).
- The encryption method has a default setting (Hash) and can be changed.
23/72 Copyright 2014-2016 FUJITSU LIMITED
User Password Expiration Time
Password expiration time settings
In Linux, use the chage command to set the user password expiration
time. In Solaris, use the passwd command.
Basic Operation Red Hat Enterprise Linux Oracle Solaris
Set maximum number # chage -M 90 user_name # passwd -x 90 user_name
of days
Set minimum number # chage -m 30 user_name # passwd -n 30 user_name
of days
Display password # chage -l user_name # passwd -s user_name
expiration information Last password change: July 29, 2015 admin PS 07/29/15 30 90
Password expires : Never
Password inactive : Never
Account expires : Never User Last changed
Minimum number of days between name
password changes: 30 Min. days
Maximum number of days between Status till expiry
password changes: 90
Number of days of warning before Max. days
expiry: 7 till expiry
- Solaris also has user password expiration time settings. You can set the time in the
same way, though the commands and options are both different.
For details, see the Oracle Solaris Command Reference for Linux Users.
Project A Project B
Application middleware
User 1 User 2
- Resources include the CPU usage time, core file size, maximum heap size, and IPC
parameters for processes. You can configure/change project parameter settings while
the OS is running.
27/72 Copyright 2014-2016 FUJITSU LIMITED
4. Network Management
- The network management mechanism and command system in Solaris have changed
greatly from Solaris 11. Network virtualization and network redundant configuration with the
OS standard functions are possible.
- Linux: Configuration by the nmcli command automatically updates the definition file.
- Solaris: Configuration by the ipadm command automatically updates the definition file.
31/72 Copyright 2014-2016 FUJITSU LIMITED
IP Address Configuration Method Solaris
Setting an IP address
(Format: ipadm create-addr -T static -a local=IP_address/netmask_length interface_name/
arbitrary_character_string)
# ipadm create-addr -T static -a local=192.168.1.10/24 net1/v4
For details, see the Oracle Solaris Command Reference for Linux Users.
- As shown above, all of IPMP can be configured with the ipadm command. A combination
of subcommands is used to make each setting.
RHEL 7
- The service manager called systemd provides the on-demand start of services,
and improves the dependency management of transactions. This has greatly
reduced the start times.
- The start of important services can be given a higher priority than that of less
important services.
- Solaris SMF always monitors not only service starts but also the status of running
services. Thus, a check for the investigation of a service stop due to a failure and a
check of the affected range can be done immediately.
38/72 Copyright 2014-2016 FUJITSU LIMITED
Automatic Service Start
Linux and Solaris differences in automatic service starts
RHEL 6
- Different commands configure the service start and automatic start settings.
Execution
example
RHEL 7
- Starts are managed by the systemctl command alone.
- Different commands configure the service start and automatic start settings.
Execution
example
- In RHEL 7, processes equivalent to conventional services are managed as files with the
.service extension. Specify such a name when executing a service-related process.
39/72 Copyright 2014-2016 FUJITSU LIMITED
Automatic Service Start
Linux and Solaris differences in automatic service starts
Solaris
- Starts are managed by the svcadm command alone.
- The started/stopped service states are inherited at the next OS startup.
Execution
example
init process
inittab entry
Start each service
svc.startd
Logical volume
(LV) /data /usr ...
Extract
Non-redundant
Striping (RAID-0)
Storage pool
Mirror (mirroring)
Multi-way mirroring supported (RAID-1)
Physical disk
RAID-Z
Physical disk Physical disk Single parity (similar to RAID-5)
- A Solaris storage pool can improve file system performance and reliability by
configuring a RAID array and registering physical disks.
Storage pool
Backup
zfs send External media
Transfer
Snapshot Backup data data such as tape device
zfs receive
Restore
- For details on ZFS, see the ZFS Overview and Design Guide.
http://www.fujitsu.com/global/products/computing/servers/unix/sparc/downloads/documents/
49/72 Copyright 2014-2016 FUJITSU LIMITED
Linux and Solaris Command Comparison (6)
File system and storage management commands to keep in mind
Basic Operation Red Hat Enterprise Linux Oracle Solaris
RHEL 6 RHEL 7
Linux: Create volume group zpool create pool_name RAID
vgcreate volume_group_name device_name
Solaris: Create storage pool device_name
Linux: Create logical volume
lvcreate -L size -n logical_volume_name
Solaris: Create ZFS file zfs create file_system_name
volume_group_name
system
lvcreate -s -L size –n snapshot_name
Create snapshot zfs snapshot snapshot_name
original_device
Roll back from snapshot lvconvert --merge snapshot_name zfs rollback snapshot_name
For details, see the Oracle Solaris Command Reference for Linux Users.
50/72 Copyright 2014-2016 FUJITSU LIMITED
Reference: Disk Label and Device Path Solaris
/dev/(r)dsk/cvtwdxsy
y: Slice number
v: Logical controller
number
x: Drive number
Disk device(*)
w: Physical bus target number
Device directory
* dsk is block type device. rdsk is a character-type device (raw device).
represent the device path. (Example: /dev/rdsk/c2t0d1s0) Disk with EFI label
- s2 of the SMI label is a special slice that represents the
overall disk. s0
s1
- Use the format command to configure the slices. s2
s3
s4
s5
s6
s8
Solaris
- Specify hsfs as the file system format and mount a file.
Execution
example
Mount /ISO/media.iso to the /mnt directory.
# mount -F hsfs /ISO/media.iso /mnt --- Mount ISO file to /mnt
Main directories
Name Description
/dev Directory that contains special device files
/etc Directory that contain system-specific management files and configuration files
/bin Directory that contains executable files that general users can also use
/sbin Directory that contains executable files used for system recovery by the boot process or
manually
/usr/lib Additional system library required by programs at runtimes
/tmp Directory for temporary files. It uses tmpfs, the file system on memory.
For details, see the Oracle Solaris Command Reference for Linux Users.
- You can use commands such as the top command for monitoring process states,
in Solaris in the same way.
cron
Editing cron
- Edit cron with the crontab command.
# crontab -e
10 3 * * * /usr/sbin/logadm --- Format
^ ^ ^ ^ ^ ^
M H D Mon day command
KVM
- Hypervisor-type virtualization software creates a virtual environment called a
guest OS.
- Since hardware is virtualized using the CPU virtualization support function,
various OSs (Windows, etc.) other than Linux can be used as a guest OS.
- KVM does not have its own hypervisor, and it controls the guest OS by using
Linux itself as the host OS.
Firmware Firmware
Hardware Hardware
Web server B
Zone Zone Zone Zone
Oracle Solaris 11 Web Web Web Mail
server A server B server C server
Oracle Solaris 11
Mail server Virtual Solaris Virtual Solaris Virtual Solaris Virtual Solaris
Web server C
Oracle Solaris 11
Oracle Solaris 11
OS maintenance and backup required just
once, so operational load is lower
Oracle Solaris 11 Varying usage of servers
Very difficult to manage so many servers
Want to reduce electricity and space used
64/72 Copyright 2014-2016 FUJITSU LIMITED
Solaris Virtualization Technology - Oracle VM - (1) Solaris
Host OS Firmware
Hardware Hardware
Oracle Solaris 11
Linux-related information
Product Documentation for Red Hat Enterprise Linux
https://access.redhat.com/documentation/en/red-hat-enterprise-linux/
Trademarks
UNIX is a registered trademark of The Open Group in the United States and other countries.
SPARC Enterprise, SPARC64, SPARC64 logo, and all other SPARC trademarks are
trademarks or registered trademarks of SPARC International, Inc. in the United States and
other countries and used under license.
Oracle and Java are registered trademarks of Oracle Corporation and/or its affiliates in the
United States and other countries.
All other product names mentioned herein may be product names, trademarks, or registered
trademarks of their respective owners.
72/72 Copyright 2014-2016 FUJITSU LIMITED
Copyright 2010 FUJITSU LIMITED