1.2. Creating an Instance and configure OS

1.2.1. Creating an Instance

1.2.1.1. Creating a Bootable Volume

You need to move to “Virtual Server” then “Image Storage”, after signing in to the Control Panel, as below.

../../_images/image006.png
../../_images/image007.png

Search for the name of Official Image Template for Oracle SE2/EE from among the list of “Official Template”.

../../_images/image008.png

Then, click “Create Volume” at the action list of Official Image Template.

../../_images/image009.png

Volume Name

Fill in “Volume Name”, which is necessary items.

Descriptions

Also fill in the “Description”, a description of the Volume (voluntarily)

“Use as Image Source”

Please make sure select Official Image Template for Oracle SE2/EE.

Size (GB)

40 NOTE: You need to surely choose “equal to or greater than [ 40G ]”.

Zone / Group

Select [Group] whare Oracle SE2/EE are available. NOTE: Available Oracle version are different within regions. For further details, please refer to “Available Region / Group” in “Oracle” service descriptions.

After filling in the details, click “Create Volume”. You will be moved to [Virtual Server] → [Volume] screen automatically. NOTE: The “Downloading” will display the processing status at the screen, while any Volume has been created.

../../_images/image011.png

Once you have completely created the Volume Instance, you can change the volume as appeared above. Finally, you have already created the “Bootable” volume.


1.2.1.2. Creating an Instance

You need to move to [ “Virtual Server” ] then [ “Volume” ].

../../_images/image012.png

Select the “Boot as an Instance“ in the action list of “Oracle_SE2_ins1_OS_Vol”.

../../_images/image013.png

Zone / Group

You need to specify the same Zone as the Bootable Volume.

Instance Name

You need to specify any name of the Instance, such as “Oracle_SE2_ins19”.

Flavor

You need to select a specific VM flavor, such as [ 2CPU-8GB ].

Boot Source

You need to select “Boot from Volume

Volume

Select “Oracle_SE2_ins1_OS_Vol.

After you input the details, click the “Network” tab.

../../_images/image014.png

Select a specific Network, which you will connect to the Virtual Network, from among the list of “Available Logical Networks”.

../../_images/image015.png

Then, click the “+” mark as shown above, which will connect to the Virtual Machine.

../../_images/image016.png
Verify that the selected Network is in the list of “Selected Logical Networks”.
You are required to input the IP Address, which you would like to specify.
../../_images/image017.png

After your configuring an Instance, click “Create Instance”. So, the screen will be automatically moved from the “Virtual Server” to “Instances”.

../../_images/image018.png

You need to verify that the Virtual Server, such as “Oracle_SE2_ins1”, will be “active” and “running”. Finally, you have already completed the Instance creation.


1.2.2. Configuring the OS settings.

1.2.2.1. Log in

After you sign in to the Control Panel, you need to move to “Virtual Server” then “Instances”.

../../_images/image019.png

Select the “Console” at the action list of the Virtual Server, e.g. “Oracle_SE2_ins1”.

../../_images/image020.png

NOTE: If you can NOT directly input the console, you need to select “Click here if you want to show only the console”.

../../_images/image021.png

You need to verify “uek” at the screen as shown above. Then, you need to log in by utilizing the root user account. The password has been described in the service description. The hostname is set the name of virtual machine, you specified at the time of virtual machine creation.


1.2.2.2. Network Settings

You need to configure the Network settings. For more information on how to configuring in this document is as below.

Items

Variables

Interface

eth0
IP 192.168.100.1/24

Auto-Connect

Yes

Boot Protocol (Method)

Manual
Gateway 192.168.100.100

You need to change a name of an attached Interface.

# nmcli c mod "System eth0" connection.id eth0

You need to configure the IP Address settings.

# nmcli c m eth0 ipv4.address 192.168.100.1/24

You need to set that the Interface will be automatically booted up at the time of boot.

# nmcli c m eth0 connection.autoconnect yes

Then, configure the boot method (boot protocol) not by DHCP but by manual.

# nmcli c m eth0 ipv4.method manual

You need to configure the Gateway settings.

# nmcli c m eth0 ipv4.gateway 192.168.100.100

You need to reboot the Interface.

# nmcli c down eth0; nmcli c up eth0

Verify the respective settings.

# nmcli c show eth0 | grep ipv4
../../_images/image022.png

You need to verify that the IP Address, the Gateway and the Method (“Boot Protocol”) have been correctly configured, as described above.

# nmcli c show eth0 | grep autoconnect
../../_images/image023.png

Here, you need to verify that the settings defines as “autoconnect” as described above.

1.2.2.3. SSH Connectivity

In some cases, you may have found any difficulties to input the non-alphabetical letters, if you utilize the English keyboard. We recommend that you connect with a SSH credential then utilize your own keyboard, after you have configured the network settings.
You need to configure the public key settings, in order to utilize a SSH connectivity. Please configure them, based on your own environment.

1.2.2.4. Change the Root User Password.

You need to change the root user password. Please change it as soon as possible, due to the security maintenance.

# passwd

1.2.2.5. Configuring the Hostname

You need to configure the host name settings. The following command will be configured, if you set the “oracle-se-ins1” as hostname.

# nmcli general hostname oracle-se2-ins1.cloud.lab.oratest.com

You are required to verify the host name has been configured.

# hostname

oracle-se2-ins1.cloud.lab.oratest.com

If the host name is appeared, you have successfully configured the settings.

1.2.2.6. Configuring the “/etc/hosts”

You need to configure the hosts files. You have configured the settings when installing the Oracle.

# vi /etc/hosts
192.168.100.1 oracle-se2-ins1.cloud.lab.oratest.com oracle-se2-ins1

1.2.2.7. Configuring the “tmpfs”

You need to configure the settings as below, if you want to change the “tmpfs” size.

# vi /etc/fstab
tmpfs /dev/shm tmpfs defaults,size=16G 0 0
As described above, you need to specify the size then store it. (Please configure the respective size, based on your own environment as needed.)
Such settings will be fixed into your program at the time of reboot. You can alter the size temporally, too, if you specify the size and retry to mount it.
Following is how to mount.
# mount -o remount,size=<tmpfs size>,noatime /dev/shm

1.2.2.8. Configuring the DNS

You need to configure the DNS settings,

# vi /etc/resolv.conf
nameserver <DNS Server IP>

Please rewrite down the above contents, then restore it.

1.2.2.9. Configuring the NTP

Following shows how to configure the settings, if you have already prepared for the Server in advance.

  • Modifying the setting files

    # vi /etc/chrony.conf
    
Comment out the existing server lines, then add to write the following lines.
server <NTP server IP> iburst
You need to write down the additional comment and store it.
  • Restart the service

    # systemctl restart chronyd
    
  • Verification

    # chronyc sources
    210 Number of sources = 1
    MS Name/IP address Stratum Poll Reach LastRx Last sample
    ============================================================
     ^\* <NTPServerIP> 2 6 17 7 -28us[ +17us] +/- 44ms
    

Finally, you have completely configured the settings, if you have got back the NTP Server information as specified above.

  • The following operations will be required when you utilize the Cloud Computing NTP.

  • Configuring the Common Function Gateways.

    First, you need to sign in to the Cloud Computing then you are required to go to “Network” and “Common Function Gateways”.

    ../../_images/image024.png

Click “Create Common Function Gateways”.

../../_images/image025.png

Name

You are required to input the name of Common Function Gateways.

Descriptions

You are required to input the description

Common Function Pool

You need to utilize the default settings at Common Function Pool.

After your configuring the various variables, click “Create Common Function Gateways”.

../../_images/image026.png
Verify the Common Function Gateway has been created above.
Verify the NTP Server IP Address.
../../_images/image027.png

Select “Common GW”, which you have already created Common Function Gateways.

../../_images/image028.png
You need to verify that the NTP link local address is “169.254.127.1”.
Then, verify that the Logical Network will be automatically configured.
You need to move to “Network” then “Logical Network”.
../../_images/image029.png

You are required to verify that “common_function_gw_access_<ID>” as appeared above. You need to connect to this Logical Network when you utilize the NTP.

  • Add the network interface to the Instance

    You are required to sign in to Cloud Computing, and move to “Server”, “Virtual Server” then “Instance”.

../../_images/image030.png

You need to select the NTP server by the action list of the Instances, such as “Oracle_SE2_ins1”, which will review the NTP server.

../../_images/image031.png

Logical Network

You have selected the Logical Network of Common Function Gateways, common_function_gw_access_<ID> as above.

IP Address

The DHCP is utilized as the network of Common Function Gateways, so an IP Address will be automatically assigned. If you would like to specify it, you need to configure the IP Address settings.

After configuring the settings, click “[ Connect Interface ].”.

../../_images/image032.png

You verify that the Network Interface of the Common Function Gateways has been added into the Instance. If the DHCP has been assigned the IP Address, you also need to verify its IP Address (e.g. 169.254.0.7).

  • Configuring the Network Settings

First, you need to sign in to the root user account with an SSH credential. You need to verify the Interface.

# ip addr show
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN
       link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
       inet 127.0.0.1/8 scope host lo
       inet6 ::1/128 scope host
          valid_lft forever preferred_lft forever

2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
       link/ether fa:16:3e:1a:63:8c brd ff:ff:ff:ff:ff:ff
       inet 192.168.100.1/24 brd 192.168.100.255 scope global eth0
       inet6 fe80::f816:3eff:fe1a:638c/64 scope link
          valid_lft forever preferred_lft forever

3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
link/ether fa:16:3e:45:5d:34 brd ff:ff:ff:ff:ff:ff

This is an Interface for Common Function Gateways, which have already added the “eth1”. (If you have already configured the multiple Interfaces, you are noted that above this will differ based on your own environment.) You need to define the additional Interface “eth1”

# nmcli c add type ethernet ifname eth1 con-name eth1

You need to assign the IP Address. ( You will configure the IP Address which has been appeared at the Instance screen.) as below

# nmcli c m eth1 ipv4.address 169.254.0.7/17

You need to configure the boot method as below:

# nmcli c m eth1 ipv4.method manual

You are required to change the Auto-Start/ Auto-Connect “ON / Yes”.

# nmcli c m eth1 connection.autoconnect yes

Start the “eth1”.

# nmcli c up eth1

Verify it.

# nmcli c show eth1 | grep ipv4
     ipv4.method:      manual
     ipv4.dns:
     ipv4.dns-search:
     ipv4.addresses: 169.254.0.7/17
     ipv4.gateway: --
     ipv4.routes:
     ipv4.route-metric: -1
     ipv4.ignore-auto-routes: no
     ipv4.ignore-auto-dns: no
     ipv4.dhcp-client-id: --
     ipv4.dhcp-send-hostname: yes
     ipv4.dhcp-hostname: --
     ipv4.never-default: no
     ipv4.may-fail: yes

# nmcli c show eth1 | grep autoconnect
     connection.autoconnect: yes
     connection.autoconnect-priority: 0

You need to fully verify that the settings have been configured as described above.

  • Verifying the NTP Server

    You need to verify that you can ping to the NTP Server.

    # ping -c 3 169.254.127.1
    PING 169.254.127.1 (169.254.127.1) 56(84) bytes of data.
    64 bytes from 169.254.127.1: icmp_seq=1 ttl=252 time=1.21 ms
    64 bytes from 169.254.127.1: icmp_seq=2 ttl=252 time=0.367 ms
    64 bytes from 169.254.127.1: icmp_seq=3 ttl=252 time=0.295 ms
    
    --- 169.254.127.1 ping statistics ---
    3 packets transmitted, 3 received, 0% packet loss, time 2001ms
    rtt min/avg/max/mdev = 0.295/0.627/1.219/0.419 ms
    

Make sure you can get ping response.

  • Modifying the setting files

    # vi /etc/chrony.conf
    

Comment out the existing server lines, then add to write the following lines.

server 169.254.127.1 iburst

You need to write down the additional comment and store it.

  • Restart the service

    # systemctl restart chronyd
    
  • Verification

    # chronyc sources
    210 Number of sources = 1
    MS Name/IP address Stratum Poll Reach LastRx Last sample
    ================================================================
    ^\* 169.254.127.1 2 6 17 7 -28us[ +17us] +/- 44ms
    

If you have got back from the NTP information on the Common Function Gateways as specified above.

1.2.2.10. Configuring the Group

Here, create the Oracle user group. (NOTE: You need to modify the GID, based on your environment.)

# groupadd -g 2000 oinstall
# groupadd -g 2001 dba
# groupadd -g 2002 backupdba
# groupadd -g 2003 oper
# groupadd -g 2004 dgdba
# groupadd -g 2005 kmdba

1.2.2.11. Creating the Oracle User Account

Here, you will configure the Oracle User Account. (Please change the UID, based on your environments.)

# useradd --uid 2000 --gid oinstall --groups dba,oper,backupdba,dgdba,kmdba oracle

Configuring the Oracle user password settings

# passwd oracle

Change the Oracle password.

NewPassword: “<NewPassword>” Click [Enter]
Retype new password: <New Password> Click “Enter”
passwd: all authentication tokens updated successfully.

1.2.2.12. Configuring the Resource Limit

You can configure the Resource limit of the Oracle User.

# vi /etc/security/limits.d/99-oracle-limits.conf
oracle soft nproc 16384
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536
oracle soft stack 10240
oracle hard stack 32768

You stored the above strings, then save.

1.2.2.13. Configuring the Profile Settings

You may configure the profile settings

# vi /etc/profile.d/oracle.sh
if [ $USER = "oracle" ]; then
   if [ $SHELL = "/bin/ksh" ]; then
        ulimit -u 16384
        ulimit -Hn 65536
else
        ulimit -u 16384 -Hn 65536
   fi
fi

You need to describe the above, then save.

# su - oracle
$ ulimit -Sa
  core file size (blocks, -c) 0
  data seg size (kbytes, -d) unlimited
  scheduling priority (-e) 0
  file size (blocks, -f) unlimited
  pending signals (-i) 31219
  max locked memory (kbytes, -l) 64
  max memory size (kbytes, -m) unlimited
  open files (-n) 1024
  pipe size (512 bytes, -p) 8
  POSIX message queues (bytes, -q) 819200
  real-time priority (-r) 0
  stack size (kbytes, -s) 10240
  cpu time (seconds, -t) unlimited
  max user processes (-u) 16384
  virtual memory (kbytes, -v) unlimited
  file locks (-x) unlimited


$ ulimit -Ha
  core file size (blocks, -c) unlimited
  data seg size (kbytes, -d) unlimited
  scheduling priority (-e) 0
  file size (blocks, -f) unlimited
  pending signals (-i) 31219
  max locked memory (kbytes, -l) 64
  max memory size (kbytes, -m) unlimited
  open files (-n) 65536
  pipe size (512 bytes, -p) 8
  POSIX message queues (bytes, -q) 819200
  real-time priority (-r) 0
  stack size (kbytes, -s) 32768
  cpu time (seconds, -t) unlimited
  max user processes (-u) 16384
  virtual memory (kbytes, -v) unlimited
  file locks (-x) unlimited

1.2.2.14. Configuring the Time Zone Settings

The default time zone is settings as UTC. You may change the following strings, such as “Asia” and “Tokyo”.

# timedatectl set-timezone Asia/Tokyo

Verify it.

# timedatectl
  Local time: Thu 2016-03-24 16:33:23 JST
  Universal time: Thu 2016-03-24 07:33:23 UTC
  RTC time: Thu 2016-03-24 07:33:22
  Timezone: Asia/Tokyo (JST, +0900)
  NTP enabled: yes
  NTP synchronized: yes
  RTC in local TZ: no
  DST active: n/a

If the time zone settings have been configured as described above, you have successfully configured the settings.

1.2.2.15. Changing the owner of “Oracle Installer”

Under the [ /software ] directory, change the respective owners of the relevant Oracle Installers.

# chown -R oracle:oinstall /software/*

Verify it.

# ls -la /software
  Total 4370300
  drwxr-xr-x. 2 root root 4096 4/7 10:31 .
  dr-xr-xr-x. 19 root root 4096 4/8 12:14 ..
  -rw-r--r--. 1 oracle oinstall 918555219 4/7 10:26 client
  -rw-r--r--. 1 oracle oinstall 1673591558 4/7 10:26 database
  -rw-r--r--. 1 oracle oinstall 1015358809 4/7 10:26 examples
  -rw-r--r--. 1 oracle oinstall 867667463 4/7 10:31 grid

You need to verify that the content has been changed as described above.

That’s all OS settings.

1.2.3. Configuration a Database Volume

1.2.3.1. Creating a Volume

You need to create the Database Volume. You are also required to sign in “Cloud Computing” then move to the “Server”, “Virtual Server” then “Volume”.

../../_images/image033.png

Click “Create Volume”.

../../_images/image034.png

Volume Name

You need to describe any name of a Volume, “Oracle_SE2_ins1_DB_Vol”.

Descriptions

You need to describe the Volume.

Volume Source

You need to specify the “ No Source (Blank Volume)”.

Size(GB)

You can create the Database as well as select a suitable size from the data space, such as 100G.

Zone / Group

You need to specify the same Zone as the Instance, at 3. Creating an Instance.

If you have configured the settings, click “Create Volume”.

../../_images/image035.png

You need to verify the availability of the Volume as shown above, such as “Oracle_SE2_ins1_DB_Vol”.


1.2.3.2. Attaching the Database Volume

You need to attach the Database Volume to the Instance.

../../_images/image036.png

You can choose the Database Volume, Oracle_SE2_ins1_DB_Vol, from among the actin list of “Manage Connection”.

../../_images/image037.png

You need to select your created Instance, such as “Oracle_SE2_ins1” as shown above, at “3. Creating an Instance” in the list box of “Connect Instance”. After you have selected, click “Connect Volume”.

../../_images/image038.png

As shown above, you need to verify the reachability that the Database Volume (e.g. “Oracle_SE2_ins1_DB_Vol”) has already connected to the Instance.


1.2.3.3. Formatting the Database Volumes.

You need to format the Database Volume.
(e.g. In the case that the Database Volume is setting as “/dev/vdb”). You are noted that the name of the device is different from the Customers.
You need to verify the Volume.
 # fdisk –l

Disk /dev/vdb: 107.4 GB, 107374182400 bytes, 209715200 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size : 512 bytes / 512 bytes
You need to create a partition.
# fdisk /dev/vdb
Welcome to fdisk (util-linux 2.23.2).

Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.

Device does not contain a recognized partition table
Building a new DOS disklabel with disk identifier 0x444193df.

Command (m for help): p

Disk /dev/vdb: 107.4 GB, 107374182400 bytes, 209715200 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: dos
Disk identifier: 0x444193df

 Device Boot      Start         End      Blocks   Id  System

Command (m for help): n
Partition type:
   p   primary (0 primary, 0 extended, 4 free)
   e   extended
Select (default p): p
Partition number (1-4, default 1):
First sector (2048-209715199, default 2048):
Using default value 2048
Last sector, +sectors or +size{K,M,G} (2048-209715199, default 209715199):
Using default value 209715199
Partition 1 of type Linux and of size 100 GiB is set

Command (m for help): p

Disk /dev/vdb: 107.4 GB, 107374182400 bytes, 209715200 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: dos
Disk identifier: 0x444193df

   Device Boot      Start         End      Blocks   Id  System
/dev/vdb1            2048   209715199   104856576   83  Linux

Command (m for help): w
The partition table has been altered!

Calling ioctl() to re-read partition table.
Syncing disks.

You need to verify the partition.

# fdisk –l

Disk /dev/vdb: 107.4 GB, 107374182400 bytes, 209715200 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: dos
Disk identifier: 0x444193df

   Device Boot      Start         End      Blocks   Id  System
/dev/vdb1            2048   209715199   104856576   83  Linux
Make sure /dev/vdb1 created.

1.2.3.4. Configuring the File System

You need to create the file system to your created partition. Following is an example on how you create the xfs file system.( The default file system will become “xfs” from “RHEL7”. As the same, the default file system will becomes “xfs” from “OracleLinux7”).

# mkfs.xfs /dev/vdb1
meta-data=/dev/vdb1 isize=256 agcount=4, agsize=6553536 blks
            = sectsz=512 attr=2, projid32bit=1
            = crc=0 finobt=0
   data = bsize=4096 blocks=26214144, imaxpct=25
            = sunit=0 swidth=0 blks
   naming =version 2 bsize=4096 ascii-ci=0 ftype=0
   log =internal log bsize=4096 blocks=12799, version=2
       = sectsz=512 sunit=0 blks, lazy-count=1
   realtime =none extsz=4096 blocks=0, rtextents=0

1.2.3.5. Mounting

Create Mount Point

# mkdir /u01

Mount

# mount /dev/vdb1 /u01

Verify it.

# df -h
dev/mapper/ol-root    24G   13G   12G   54% /
devtmpfs              3.9G     0  3.9G    0% /dev
tmpfs                 3.9G     0  3.9G    0% /dev/shm
tmpfs                 3.9G  8.7M  3.9G    1% /run
tmpfs                 3.9G     0  3.9G    0% /sys/fs/cgroup
/dev/vda1             497M  143M  355M   29% /boot
/dev/vdb1             100G   33M  100G    1% /u01

If you would like to automatically mount at boot timing, you need to edit the “fstab”.

# vi /etc/fstab
/dev/vdb1 /u01 xfs defaults 0 0

Add to write the above.

NOTE: You need to consider specifying not the name of the device (/dev/vdb1) but the UUID, if you would like to add the multiple volumes,
NOTE: You need to create the snapshot without any description on the additional volume except for the OS Volume in the fstab (file system table), if you consider the snapshot as the Virtual Machine (including the OS Volume) backups.

1.2.3.6. Configuring the Directory

Create the directory for the Oracle Installer Decompression. NOTE: You need to update the name of the directory, based on your policy (method).

# mkdir -p /u01/stage/12.1.0.2

1.2.3.7. Modifying the owner

Modify the owner of “/u01” and the Group.

# chown -R oracle:oinstall /u01