This tutorial will guide you step by step how to setup Solaris on OCI platform
References
Reference Commands
#zpool help
#zfs help
#pkg help
1. Register with OCI
Although this is simple process and expected to have a free account with Oracle Cloud Infrastructure
You simply register and complete the registration process from this point Oracle Cloud Infrastructure
Follow the simple instruction to create a new account and sign in.
Keep a note of Tenant, email, and of course your password
Cloud Infrastructures have their servers stacked into data centers which are clustered into one solid reliable unit called availability domain taking a form of AD-1,2, or 3 depends on how big the service area,
These availability domains are interconnected with each other with high performance network makes them work as whole unit serving an entire region
Why is that structure, this is a common practice between all service provider to provide high availability in case one whole data center or the entire Availability Zone goes down, it should have redundancy in another availability zone which minimizes the impact of affecting the service significantly.
you need to choose your default region, typically the one that is close to you, in my case it was US West (San Jose)
That’s it you are done. here.
- SI Support Identifier is the Support Identifier required for any SR to Oracle, New account will have a dedicated SI and become the Approver for the tenancy any other account can join the SI
- My Oracle Support is the central location for all support related tasks contains:
- Knowledge links – Information center, online docs, Oracle system handbook, Tools & Training,
- Service Requests (SR) – create and follow up with SR
- Patches & Updates – links to download products and patches
- Community
- Certifications
- Advanced Customer Services
- Settings
- Cloud Support
- Oracle Software Delivery Downloads
3. Remote connect to your instance
Now your instance got the green status Running, from this point on select your instance to get the details in the General Information tab, take a note of your Primary VNIC section and record your Public IPv4 address. should be something like this 204.28.39.143.
At this point, Oracle has placed your instance in a networking structure that can access the internet without problems. yet blocked the networking for security reason which is the default setting.
We need to connect to our instance using SSH protocol which uses port 22, so let’s open our network to allow this connection go through.
Use this guide to help you connect to a Linux instance.
as part of these steps, you need to follow the exact instructions to setup the remote connection using common tools such as Putty.
The default user for Linux ubuntu is ubuntu and for all other Unix like servers the default user is opc. with no password set.
once you log in, set your password
$sudo passwd <enter-new-password>
and we are done here, let’s grab a cup of coffee!
5. Virtual Network Computing VNC
- Install Desktop
- Install VNC Server
- Setup VNC users,
- Configure networking (open ports)
- Install VNC client
- Connect
- Drink Beer!
Create a package repository
- Create a package repository
- Repository Sources:
The Oracle Solaris release repository: http://pkg.oracle.com/solaris/release/
The Oracle Solaris support repository: https://pkg.oracle.com/solaris/support/
- Copy a repository from a Zip file
- Dependency and Architecture (SPARC & x86)
$pkgrepo verify
: verify packages- Oracle Solaris 11.4 Bundled Software Updates
- Compress data on copy, bandwidth restrictive, restart/resume transfer, checksum enabled, remove devices from pool, clone dataset, accelerate cp -z, storage pool, multiple filesystems, automatic mount/unmount, ACL(Access Control List)
- Storage Pool (128MB-any size)
2. create an instance
In the cloud, the term instance refers to the compute server you planning to employ, so basically think you are in the shopping mall want to buy a computer and you got to chose the Hardware which we call it here the instance Shape, and the operating system installed which we call it here the instance image.
One note you need to understand is the concept of compartment, a compartment is an organization structure to host related resources (such as compute instances, databases, storage etc.) and have a logical grouping or these resources. not physical!
About SSH keys, as per the fact that you would never been able to touch your server physically then your best option is to remote connect, yet you better be secure., that’s why we need to create a key pair key consists of private key and public key in accordance to the PKI Public Key Infrastructure standard which dictates that you should have two keys generated in pair, one to encrypt messages which is the public key, and the other to decrypt the messages which is called the private key, as the name implies, you distribute the public key to the public and make sure the private key is well protected and securely saved, never share it with any one, including your spouse (if you can). during the creation process you will generate this pair of keys and Oracle keeps the private key inside your new instance and asks you to download the private key. you will use it later to connect to the instance.
Choose the boot volume, use the default Use in-transit encryption that’s your instance storage
Follow this tutorial to create an Instance
Guess what! we done here too
4.Solaris GUI Desktop
- Links:
- Working with the X Window System
- Setting up Remote Desktop Access using VNC
- Download the Oracle Solaris VM Virtual Box
- Install Solaris Desktop Package
#pkg update --accept #pkg install solaris-desktop
-
- Xorg : /etc/X11/xorg.conf and xorg.conf.d)Administrator creates xorg.conf to allow change the default configurations.Restart the X Server
#svcadm restart gdm
-
- Oracle Solaris SMF configuration properties, use SMF service svc:/application/x11/x11-server
# svccfg -s svc:/application/x11/x11-server setprop options/config_file=xorg.conf
- Hardware Abstraction Layer HAL fdi files: configuring input devices
$XAUTHORITY
to establish connection with X Server
User Access granted using si:localuser
:
user@host:~$ xhost +si:localuser:root
user@host:~$ su
Password:
/**Visual Panel GUI**/
# /usr/bin/vp svcs
Use X11 Tunneling options of the ssh command to connect to a remote X Client
Use Virtual Network Computing (VNC) to view and interact with remote desktop.
Setup VNC to provide a guest graphical Login A boot environment is a bootable instance of the Oracle Solaris image and its component software packages. When you install Oracle Solaris for the first time, or upgrade the OS, a BE is automatically created on the system. The BE is also activated and becomes the default BE that is used when the system is rebooted.
Oracle Solaris 11.4 Information Library
The file system in Solaris consists of tree structure of file systems start with a root (/) file system. File systems can be attached (mounted) or detached (unmounted) from the file system tree.
Solaris uses VFS (Virtual File System) as an interface to all types of file systems. Supported file system types (such as ZFS, Network File Systems, Virtual File Systems)
Updating Systems and Adding Software
To Access Oracle Solaris Support repository follow these steps:
- Create SSL Certificate: Choose Solaris 11.4 and generate. Note: it is not visible then you have to do the update manually.
- Download the public/private keys from the certificate page to .ssh folder
$chmod 600 *.pem
- Set up publisher configuration for the Oracle Solaris Cluster 4 Repository
$sudo pkg set-publisher \
-k ~/.ssh/pkg.oracle.com.key.pem \
-c ~/.ssh/pkg.oracle.com.certificate.pem \
-G "*" -g https://pkg.oracle.com/solaris/release solaris
- Check Available Repositories
$ pkg publisher Solaris
Solaris OS Troubleshooting
- Solaris OS architecture
$/usr/bin/isainfo -kv
- Run Explorer, First time use Oracle Explorer Data Collector Best Practices
- Oracle Services Tools Bundle (STB)
Mounting Block Volumes
- Services Tools Bundle (STB) – Information Center (Doc ID 2419123.2)
(Note: No Permissions allowed to download installation files use zip files loaded in the files folder of this ACADEMY.HAHLABS.COM)
- Attach block volume to the instance and reboot
#explorer <-- use [-g] for first time installation; then [-w default] on next time #format to identify apid of the volume Ex. c0t607CC3B1C2734E01A16AF5360A039FEEd0
- Services Tools Bundle (STB) – Information Center (Doc ID 2419123.2)
- create a zpool of that volume
Command: zpool create {-m <mount-point>} <pool-name> <apid> #zpool create {-m /repo} repo c0t607CC3B1C2734E01A16AF5360A039FEEd0 <- default mountpoint is /pool-name
- Check filesystems
#zfs list <- now we have filesystem repo and mountpoint /repo
- zfs filesystem offers independant configurable filesystem. Folders share parent filesystem configurations offers fast file move, both folders and zfs filesystems can use standard file and folder shell commands, however move data between folder and zfs (cp,mv) is considered moving between different devices (very slow), — use of rm -r <zfs filesystem> will result of error Device busy.
#zfs create -o mountpoint=<path-to-filesystem> <zpool-name> #mkdir <path-to-folder>
- Download and install the package p36187033_24224416_Solaris86-64.zip
- Installation Guide
(*Note: Permission denied to download the files from Oracle, use files on ACADEMY Website*)
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut elit tellus, luctus nec ullamcorper mattis, pulvinar dapibus leo.
- Services Tools Bundle (STB) – Information Center (Doc ID 2419123.2)
(Note: No Permissions allowed to download installation files use zip files loaded in the files folder of this ACADEMY.HAHLABS.COM)
- Attach block volume to the instance and reboot
#explorer <-- use [-g] for first time installation; then [-w default] on next time #format to identify apid of the volume Ex. c0t607CC3B1C2734E01A16AF5360A039FEEd0
- Services Tools Bundle (STB) – Information Center (Doc ID 2419123.2)
- create a zpool of that volume
Command: zpool create {-m <mount-point>} <pool-name> <apid> #zpool create {-m /repo} repo c0t607CC3B1C2734E01A16AF5360A039FEEd0 <- default mountpoint is /pool-name
- Check filesystems
#zfs list <- now we have filesystem repo and mountpoint /repo
- zfs filesystem offers independant configurable filesystem. Folders share parent filesystem configurations offers fast file move, both folders and zfs filesystems can use standard file and folder shell commands, however move data between folder and zfs (cp,mv) is considered moving between different devices (very slow), — use of rm -r <zfs filesystem> will result of error Device busy.
#zfs create -o mountpoint=<path-to-filesystem> <zpool-name> #mkdir <path-to-folder>
Import and export a zpool
Export a pool -> move the device -> import again
Export: removes the zpool from the system
Import: makes the zpool available in the system
Manual System update
- Download the [SRU’s-Support Repository Update] Oracle Solaris IPS Repository Installation Guide 11.3.0.0.0 IPS Repository Installation Guide and IPS Repository patches from MOS- My Oracle Support(Knowledge).
- Create and Update a Solaris 11 Local Repository Server (Doc ID 1928542.1)
- for details Copying and Creating Oracle Solaris 11 Package Repositories
- Prepare Repository file system repository, use
Command: zfs create <the zpool>/<repo-filesystem>;
#zfs create repo/solaris-release <- creates mounted filesystem /repo/repoSolaris11
#zfs set atime=off repo/solaris-release <-for better performance
- Download the Repository from the internet
#pkgrepo create /repo/solaris-release <- Prepare the repository
#pkgrecv -s http://pkg.oracle.com/solaris/release/ -d /repo/repoSolaris11 '*'
- Copy a Repository from a File (or iso)
- download the media from Oracle Solaris 11.4 Repository Downloads (Software Downloads->IT infrastructure->Solaris 11 -> Create Local Repository), media comes in muti-parts, follow the instruction to construct the iso image file install-repo.ksh
- Install unzip package
- Copy a Repository from a File (or iso)
for Solaris 11.4 package compress/unzip was removed in purpose, need to force install
Download SRU 65 from MOS
# pkg change-facet facet.version-lock.compress/unzip=false
# pkg install compress/unzip
# pkg change-facet facet.version-lock.compress/unzip=none <- none sets it back to default
#./install-repo.ksh -d /repo/repoSolaris11-iso -v -I -c <-- needs 15GB storage space
- Check system locale
$locale
should include LANG=C - Build the search index
#pkgrepo -s /repo/repoSolaris11 refresh
- Client Access
- NFS File share
# zfs create -o mountpoint=/repo/repoSolaris11 rpool/repoSolaris11
# zfs set share=name=s11repo,path=/export/repoSolaris11,prot=nfs rpool/repoSolaris11
name=s11repo,path=/export/repoSolaris11,prot=nfs
# zfs set sharenfs=on rpool/repoSolaris11
# pkg set-publisher -G '*' -M '*' -g /repo/repoSolaris11/ solaris
# pkg publisher <-- list all publishers: should point to the new registery
# pkg info entire <--
# zpool status -l repo <-- information about a pool
Boot Environments
Solaris on VBox
- Full Text install of Oracle Solaris on VBox
Migrate to OCI Cloud
- eeporm set console=ttya (originally text)
Mounting FS on OCI Solaris
To mount a file system in Solaris, you can use the mount commands on the export of the file system
OCI Console–> File Storage –> File Systems –> File System details –> Export details
Mount File system
$sudo mount 10.30.30.70:/Classes-FS /mnt/Classes-FS
Automount File System
Edit /etc/vfstab
10.30.30.70:/Classes-FS - /mnt/Classes-FS nfs - yes rw
Enable NFS Client Service
# svcadm enable -r nfs/client