Oracle … as usual

Oracle by Laurent Leturgez

Category Archives: Solaris 11

Step by step Solaris 11.1 installation guide on a virtual box VM (x86-64)

Solaris is an OS with many tools like dtrace. In my case, I installed it because I would like to test Oracle 12c and solaris specific views that detect long IO operation: V$KERNEL_IO_OUTLIER.

First of all, you need to download the installation medium which is available at https://edelivery.oracle.com. You need to download the Interactive text install medium :

S11_00

Next, you have to create a new VM. This can be done by following steps below:

S11_01

S11_02

S11_03

S11_04

S11_05

S11_06

Ok, the VM is created, now let’s configure it by attaching the S11.1 installation media, and adding a network adapter (I will add a another NIC later for my LAN access) :

S11_07

And boot the VM …

After booting the VM, the installation process will prompt you for many information (keyboard, hostname etc.):

S11_08

S11_09

Select your keyboard layout

S11_10

And the language for your installation.

S11_11

Select 1 to install Oracle Solaris

S11_12

During the installation process, you can go to the next step by pressing F2 and go back by pressing F3. Everything you can do is mentioned on the bottom of the screen :

S11_13

S11_14

In the next screen, I will use the local discovery method because my disk is locally attached.

S11_15

Select the discovered disk where you want to install S11 and then press F2.

S11_16

In this screen, I choose to use the entire disk for my installation. You can select another partition by selecting “Use a GPT partition of the disk”.

S11_17

Enter the computer name (short name), and choose how you want to configure your network. I decided to configure my network automatically (DHCP).

S11_18

No alternative naming service.

S11_19

Ok, now it’s time to configure time related information, first of all … Time zone

S11_20

S11_21

Ok timezone set.

S11_22

next, set date and time.

S11_23

Set the root password and eventually, create a user account.

S11_24

No need to register your system … it’s a VM

S11_25

Next screen is to configure the method to access oracle servers for OCM and Automatic SR features. Here it doesn’t make sense.

S11_26

Review your configuration and press F2 to install.

S11_27

Install in progress …

At the end of the process, you have to reboot your VM by pressing F8. In my case, instead of rebooting the server, I shut it down and took the time to detach the installation medium and to configure another Network adapter plugged into my LAN.

S11_28

Now I can boot my VM … I’m ready to configure it.

To configure network, I used the same method I described in this blog post : https://laurent-leturgez.com/2012/08/01/build-a-basic-network-configuration-on-solaris-11/

S11_29

Net1/v4 has to be configured S11_30

Link is up,so we can configure this NIC.

S11_31

S11_32

As we configured DHCP client on a NAT Virtualbox NIC, we retrieved DNS information:

S11_33

Now I can access to my VM from a putty client. But root access is disabled by default in sshd config. So you have to modify the sshd config  and restart the daemon

S11_34

Next thing I recommend to configure is the package repository. By default, if you have an internet access configured to your machine (which is my case because of my NATted network adapter), you don’t have to configure anything because your default repository is already configured to access Oracle remote repository.

root@S11:~# pkg publisher
PUBLISHER                   TYPE     STATUS P LOCATION
solaris                     origin   online F http://pkg.oracle.com/solaris/release/

root@S11:~# pkg publisher solaris

            Publisher: solaris
                Alias:
           Origin URI: http://pkg.oracle.com/solaris/release/
              SSL Key: None
             SSL Cert: None
          Client UUID: ddee2130-0292-11e2-b9e5-80144f013e20
      Catalog Updated: November  9, 2011 03:34:27 PM
              Enabled: Yes

If you want to configure other repositories (for example local repo), you can follow instructions at this link : http://docs.oracle.com/cd/E23824_01/html/E21802/publisher-config.html

Maybe you will need to install basic XWindow libraries (for example, if you want to export a display to your local X Server). If your repository is configured, you can execute the commands below:

root@S11:~# pkg install SUNWarc SUNWbtool SUNWhea SUNWlibms SUNWmfrun SUNWxorg-client-programs SUNWxorg-clientlibs SUNWxwfsw pkg://solaris/SUNWxwplt truetype/fonts-core
           Packages to install: 65
       Create boot environment: No
Create backup boot environment: No
            Services to change:  5

DOWNLOAD                                PKGS         FILES    XFER (MB)   SPEED
Completed                              65/65     5045/5045    40.9/40.9  280k/s

PHASE                                          ITEMS
Installing new actions                     6797/6797
Updating package state database                 Done
Updating image state                            Done
Creating fast lookup database                   Done

Then logoff and re-login, you can now export your display and launch X Programs:

$ ssh root@192.168.99.130
Last login: Wed Oct 16 14:14:47 2013 from 192.168.99.1
Oracle Corporation      SunOS 5.11      11.1    September 2012
root@S11:~# echo $DISPLAY
localhost:10.0
root@S11:~# xlogo

To conclude this installation, if you want to configure a complete Desktop Manager, you have to install the slim_install package which deploys 315 packages to your system … so it can take a while.

root@S11:~# pkg install slim_install
           Packages to install: 315
       Create boot environment:  No
Create backup boot environment: Yes
            Services to change:  13

DOWNLOAD                                PKGS         FILES    XFER (MB)   SPEED
Completed                            315/315   50633/50633  524.2/524.2  259k/s

PHASE                                          ITEMS
Installing new actions                   81666/81666
Updating package state database                 Done
Updating image state                            Done
Creating fast lookup database                   Done

Reboot your machine and you will display a nice Desktop manager environment:

S11_36

This step by step guide is available at this address : http://www.slideshare.net/lolo115/install-solat

Advertisements

Where are X11 libs after a Solaris 11 fresh install

If you already installed Solaris 11 (for example in a Virtual Box VM), you may want to install X11 libs.

To do this, you have to install this bunch of packages:

root@s11:~# pkg install SUNWarc SUNWbtool SUNWhea SUNWlibms SUNWmfrun SUNWxorg-client-programs SUNWxorg-clientlibs SUNWxwfsw pkg://solaris/SUNWxwplt truetype/fonts-core
           Packages to install: 70
       Create boot environment: No
Create backup boot environment: No
            Services to change:  5

DOWNLOAD                                  PKGS       FILES    XFER (MB)
Completed                                70/70   5344/5344    41.2/41.2

PHASE                                        ACTIONS
Install Phase                              7322/7322

PHASE                                          ITEMS
Package State Update Phase                     70/70
Image State Update Phase                         2/2
  

 

 

Build a basic network configuration on Solaris 11

Here are some commands to create a basic network configuration on Solaris 11.

First of all, the physical network service must be started and the network automagic (nwam) service has to be stopped (for information, nwam is a new solaris 11 service that automates network configuration).

– Check physical network service:

root@S11:~# svcs | grep network/physical
online 20:09:37 svc:/network/physical:upgrade
online 20:09:45 svc:/network/physical:default

– Check nwam:

root@S11:~# svcs | grep nwam
root@S11:~#

If you have to start or stop those services, you can use these commands:

root@S11:~# svcadm disable network/physical:nwam 
root@S11:~# svcadm enable network/physical:default

In my first example, I run a Solaris 11 x86-64 virtual machine with 3 network interfaces (net0 and net1 are used for my own use, and net2 which is used for this example. A fourth interface net3 will be added to illustrate my second example).

First command is dladm which is use to administer data-links. I use the show-phys option to get physical information of my interfaces:

root@S11:~# dladm show-phys
LINK              MEDIA                STATE      SPEED  DUPLEX    DEVICE
net0              Ethernet             up         1000   full      e1000g0
net1              Ethernet             up         1000   full      e1000g1
net2              Ethernet             unknown    0      unknown   e1000g2

There’s another useful option “show-link” which will help you to show your interface status and other information (for example, the MTU).

root@S11:~# dladm show-link
LINK                CLASS     MTU    STATE    OVER
net0                phys      1500   up       --
net1                phys      1500   up       --
net2                phys      1500   unknown  --

(dladm has a lot of option you can explore with the man page or oracle official documentation : http://docs.oracle.com/cd/E23824_01/)

Ok, now we need to create our interface. In this example, we will create an IP interface (We will see later how to create an IPMP interface).

To do this operation, we will use the “ipadm” tool (ipadm is the tool used to configure the IP protocol).

root@S11:~# ipadm create-ip net2
root@S11:~# dladm show-link
LINK                CLASS     MTU    STATE    OVER
net0                phys      1500   up       --
net1                phys      1500   up       --
net2                phys      1500   up       --

Now the link is up but is not active:

root@S11:~# ipadm show-if
IFNAME     CLASS    STATE    ACTIVE OVER
lo0        loopback ok       yes    --
net0       ip       ok       yes    --
net1       ip       ok       yes    --
net2       ip       down     no     --

To finish this basic configuration, we have just to create the address on this interface. We have the choice to use a static configuration or a dynamic one by getting the address from a DHCP Server.

Note that addresses are managed by an address object which is formatted like this : interface/IP protocol

  • Dynamic configuration.
root@S11:~# ipadm create-addr -T dhcp net2/v4

Note: if you want to configure which information will be requested by the client to the DHCP server, you can edit the /etc/default/dhcpagent file (especially the PARAM_REQUEST_LIST parameter).

  • Static configuration.
root@S11:~# ipadm create-addr -T static -a 192.168.99.102/24 net2/v4

Now the address is up and the routing table has been updated:

root@S11:~# ipadm show-addr
ADDROBJ           TYPE     STATE        ADDR
lo0/v4            static   ok           127.0.0.1/8
net0/v4           dhcp     ok           10.0.2.15/24
net1/v4           static   ok           192.168.99.101/24
net2/v4           static   ok           192.168.99.102/24
lo0/v6            static   ok           ::1/128

root@S11:~# netstat -r

Routing Table: IPv4
  Destination           Gateway           Flags  Ref     Use     Interface
-------------------- -------------------- ----- ----- ---------- ---------
default              10.0.2.2             UG        3        169 net0
10.0.2.0             10.0.2.15            U         3          0 net0
S11                  S11                  UH        4        310 lo0
192.168.99.0         192.168.99.102       U         3         63 net2
192.168.99.0         192.168.99.101       U         2       1172 net1

Routing Table: IPv6
  Destination/Mask            Gateway                   Flags Ref   Use    If
--------------------------- --------------------------- ----- --- ------- -----
S11                         S11                         UH      2      14 lo0

On the second example, I will show how to configure an IPMP (IP Multipath address). IPMP interface can be used on a RAC configuration to secure network link.

Well, now you know how to configure an IP address on an IP interface, this will be too easy 😉

First, configure two network IP interfaces and configure two IPv4 addresses on it:

root@S11:~# ipadm create-ip net2
root@S11:~# ipadm create-ip net3
root@S11:~# ipadm create-addr -T static -a 192.168.99.102/24 net2/v4
root@S11:~# ipadm create-addr -T static -a 192.168.99.103/24 net3/v4

Next, create an IPMP interface and add it both interfaces you have just configured:

root@S11:~# ipadm create-ipmp ipmp0
root@S11:~# ipadm add-ipmp -i net2 -i net3 ipmp0

At this step, we have an IPMP interface configured with two “slave” interfaces. Final step is to configure an address on this interface:

root@S11:~# ipadm create-addr -T static -a 192.168.99.105/24 ipmp0/v4
root@S11:~# ifconfig ipmp0
ipmp0: flags=8001000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4,IPMP> mtu 1500 index 11
        inet 192.168.99.105 netmask ffffff00 broadcast 192.168.99.255
        groupname ipmp0

Our ipmp address is now configured and active (you can make some tests or “snoop” the ipmp0 interface to view what’s happening on it).

root@S11:~# ipadm show-if
IFNAME     CLASS    STATE    ACTIVE OVER
lo0        loopback ok       yes    --
net0       ip       ok       yes    --
net1       ip       ok       yes    --
net2       ip       ok       yes    --
net3       ip       ok       yes    --
ipmp0      ipmp     ok       yes    net2 net3