Showing posts with label Cloud. Show all posts
Showing posts with label Cloud. Show all posts

April 19, 2022

How to permanent change hostname in OCI for OEL 7 and later version

 

Step 1.

Update the /etc/hostname file following command.

 

[root@uat-database-dr rman_bkp]# hostnamectl set-hostname ccuine1126.xxx.co.in

 

 

 

 Step 2.

 Edit the oci configuration file for hostnames and set the value to 2.
    vi /etc/oci-hostname.conf
    PRESERVE_HOSTINFO=2
    save the changes.

 

Note:- By setting Value 2, it preserve user configured hostname across instance reboots; no custom changes to /etc/hosts and /etc/resolv.conf from the metadata service,

but dhclient will still overwrite /etc/resolv.conf

  

Step 3.

Update /etc/hosts file with following

192.168.10.126 ccuine1126.xxx.co.in        ccuine1126

And save & exit.

 

Step 4.

Update FQDN in OCI Console

Login to OCI console and navigate to compute instance


Select the compute instance where the FQDN will be updated and click on Attached VNICs and click on the Edit vnic 



This open a window like below where we need to set the updated hostname.

Note: Only provide the sub domain name . Do not enter entire FQDN as it doesn’t accept it.


And click on save changes. 

Once done, bounce the instance from and it will show updated FQDN from OCI console as well.

 Check the hostname with hostname or hostnamectl command.

 

[root@ccuine1126]# hostname

ccuine1126.xxx.co.in

 

[root@ccuine1126]# hostnamectl

   Static hostname: ccuine1126.xxx.co.in

         Icon name: computer-vm

           Chassis: vm

        Machine ID: aef0b6747ebeb75af2d053485bed

           Boot ID: 3a4b979bdf3b4a3591328acc3e362

    Virtualization: kvm

  Operating System: Oracle Linux Server 7.9

       CPE OS Name: cpe:/o:oracle:linux:7:9:server

            Kernel: Linux 5.4.17-2136.304.4.1.el7uek.x86_64

      Architecture: x86-64







November 5, 2020

How to attach block volume in OCI instance

We often require to add additional block volume in OCI instance for different requirements. In this post I will show how to do this.


Step 1. First Login to OCI console

Step 2. Navigate to Block Storage à Block Volumes à Create Block Volume






Step 3. Fill in the required information such as 
  • Compartment name – Choose the compartment where your oci instance belongs to
  • Name – Provide a name for the volume
  • Volume size and performance- Here we have two options such as Default and Custom. By choosing default option oci would create a volume of size 1 tb .If we go for custom ,we can provide our desire size for the volume. Minimum size of a custom volume is 50GB. You can also choose the performance type for the volume as well.
  • Backup Policy- If you wish to choose a backup policy for the volume, we can select one here as per your requirement.
  • Encryption- For encryption it I choose the option "Encrypt using oracle managed keys".




Step 4. Once volume creation is done, navigate to compute instances tab and select the instance where you would like to add the volume




Under resources, click on “attached block volumes” option




Step 5. In the attach block volume window, choose volume attachment type as “iSCSI”. Also choose the block volume from block volume drop down menu. Provide a device path (optional).Provide desired Access type for the block volume.




Once attachment is done, the following message appears.




Step 6. Now on the same page , click on 3 dots on right bottom corner and click on iSCSI Commands and information. This would pop up a window with a few commands that would be used to attach the block volume with the compute instance.

Run the below commands in any ssh terminal of the compute instance to attach the block volume.

For detaching the block volume commands are also provided.




Run the below commands in any ssh terminal of the compute instance to attach the block volume.

For detaching the block volume commands are also provided.



Run the below commands from ssh terminal of the compute instance to attach the block volume.

For detaching the block volume commands are also provided in above screenshot.


So we can see from lsblk command that a 50GB volume is showing.

Step 7.  Now format the newly added volume and mount it . Commands are shown in the below screenshot. We have mounted the volume /dev/oracleoci/oraclevdb volume as /u01 mount point.



Step 8 .Add entry in /etc/fstab file 

/dev/oracleoci/oraclevdb /u01 ext4 defaults,noatime,_netdev 0 2


So this includes the activity of adding additional block volumes in OCI instance.

October 22, 2020

How to create Oracle Autonomous Database in OCI

What is autonomous database:-  An Oracle Autonomous Database is a cloud-based technology designed to automate many of the routine tasks required to manage Oracle databases which is mostly done by DBA's. It uses machine learning to automate database performance tuning, backups, securing database , patching etc.

Types of autonomous database based on workload :-


  •  Autonomous transaction processing
  •   Autonomous data warehouse
  •   Autonomous Json Database

To create Autonomous database, first login to Oracle cloud (www.oracle.com/cloud) 

June 27, 2020

Creating Compute Instance in OCI

How to Create Compute Instance in Oracle Cloud Infrastructure(OCI)


First , lets login to oracle cloud

www.oracle.com/cloud

Provide cloud account name and user id & password to authenticate.

Step:-1 

To create a new compute instance,  click Compute, then select Instances.



Step 2.

Click on "Create Instance"




Step 3.

In Create Compute Instance page, provide instance name , select the image as per your requirement.



Step 4.

Select Availability Domain and Shape as per your requirement





Step 5.

By clicking on "change shape" we can choose the preferred instance type & shape details which is basically a template with different type of resources (Ocpu, Memory, Network Bandwidth etc) assigned as per  customer's different requirement.




Step 6.

In the networking section , Select the desired compartment where the instance would be created.
Choose a VCN . A VCN must be created before creating an instance.Also choose compartment for subnet.



Step 7.

Next select "Assign a PUBLIC IP Address" if you want OCI to assign a Public IP . For boot volume the default size is 46gb but this can be customized ranging from 50GB to 32TB



Step 8.

Add ssh keys if you already have one. Select a public key or you can create one using puttygen.



Step 9.

Choose a fault domain and create the compute instance.




Step 10.

On instance details screen, we can see different details about the instance such as Public IP ,Private IP, Fault Domain etc.




Step 11.

To login the Instance open putty and choose the ppk to login. 






Step 12. 

Login to the instance using user "opc"




That concludes our compute instance creation in OCI.


If you like this post, then please share it with others.
Please subscribe on email for every updates on mail.

Disclaimer:- The use of any information or materials on this website is entirely at your own risk. It is provided for educational purposes only. It has been tested internally, however, we do not guarantee that it will work for you. Ensure that you run it in your test environment before using.

June 13, 2020

How to Create a Compartment in OCI


What is a Compartment:-

Compartment is a logical collection of related cloud resources. It is used to isolate resources.

Users who have privilege to use the compartment, can only access or manage it.

 

First , lets login to oracle cloud

Oracle Database 26ai Installation Using RPM on Oracle Linux 9 (OEL 9) – Step-by-Step Guide

  In this post I will describe the installation of Oracle Database 26ai 64-bit on Oracle Linux 9 (OL8) 64-bit. The installation requires a m...