Friday, 20 November 2020

How to change Hostname in Oracle Cloud Infrastructure (OCI) private Instance on Oracle Linux Server 7




The Following steps in order to change hostname in OCI private Instance on Linux 7:-


Step 1:  At First, we need to update the /etc/hostname:

Ø  hostnamectl set-hostname <host new name>




Step 2:  Update the OCI configuration file :- change PRESERVER_HOSTINFO=2

             Ø    vi  /etc/oci-hostname.conf



Step 3: Update  the FQDN from OCI console GUI


Go to Compute->Instance-> Attached VNICs



      As given below edit the attached VNICs and change the hostname to update FQDN.
   

Note:-  VNIC  <name> and <hostname>  should be same otherwise you will not be able to login.

   Step 4: Update the /etc/hosts file

[root@private-instance ~]# vi /etc/hosts

127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4

::1         localhost localhost.localdomain localhost6 localhost6.localdomain6

10.110.9.1 private-instance.sub00100830273.privatevcn.oraclevcn.com private-instance

 

 

Step 5: Reboot the Instance and verify the hostname.



Tuesday, 17 November 2020

Oracle Audit Vault Installation and Implementation Step by Step(12.2.0.5.0)

 

Introduction

Oracle Audit Vault is a security product that gathers auditing information from remote databases and store them in a single centralized warehouse database. Suppose you have different machine in a

different database, that’s time really tough to monitor what happens in different database at a time. By using an audit vault system you can monitor every database in a single dashboard and you can apply policies which alerts you and provide you desires report.



  

Ø  Audit vault itself has different types of reports like Activity reports, Alert reports, user privileges report, and stored procedure audit reports.

Ø  Oracle Audit vault raise alerts any types of suspicious transactions.

Ø  Capture before/after values from transaction logs.

Ø  Automated clean-up of Oracle database audit data on source systems, no need to manage the audit database.



      Installation:

Download Audit Vault Software

A. Download Media

1. Download media from https://edelivery.oracle.com/.

· Open a web browser.

· Type https://edelivery.oracle.com/ in the address bar.

· Press "<Enter>" key.

· Click on "Sign In / Register" button.


Prerequisites/Current Environment


1. Laptop/PC

Audit Vault Version – 12.2.0.5.0

· Latest and fast processors

· At least 8GB memory, but I am using 3GB memory

· Windows 64 bit

· At least 250GB Hardisk, rather than 250GB storage you can installed Audit vault server.

· Network Interface Card (NIC): 1


AV server (VMware® Workstation 12 Pro, installed Oracle Linux 6)

IP Address: 192.168.169.15

Subnet Mask: 255.255.255.0

Gateway: 192.168.169.1

Host Machine (VMware® Workstation 12 Pro, Linux 7.6)

IP Address: 192.168.169.11

Subnet Mask: 255.255.255.0

Gateway: 192.168.169.1


Install the Software

To install an Audit Vault Server or Database Firewall:

  1. Now once the .iso files are downloaded mount the first .iso and boot the host, you’ll be presented with below screen, click ENTER to start the installation.

The system is booted from the disk, and the initial splash screen appears, similar to the following:


Type install, and then press the Enter key.

The installation proceeds. After some time, the screen displays this message:


              Enter Installation Passphrase.
              Enter a strong passphrase.
      This passphrase will be used later to change other system passwords. It is recommended to                      note the password securely for future reference.

 Now next it will ask you to select the NIC and then setup the IP address for the same.



Hit select, and set the IP address as below:-

IP Address: - 192.168.169.15

Network Mask: - 255.255.255.0

Gateway: 192.168.169.1

 

The hit Finish install and boot the host (Note to unmount the iso files) and you’ll be presented with below screen once host is started again,



This marks the installation to be complete, which now lets us to proceed with POST installation task as shown below:-

Now once the installation is complete open the browser and type in the url as below to open the console page for AUDIT VAULT.


Login in Oracle Audit vault Server:

https://192.168.169.15/console/

 

Oracle Audit Vault has Two Schema

One is AVADMIN where you can do all types of administrator job.

Another is AVAUDITOR which helped you to monitor audit information.




Step1: Register a host

Host Name: avdf.oracle

IP address: 192.168.169.11

Service: ORA11G


Log as "AVADMIN" to AV and Register put the host name and the Ip address


Register the host

Note: - This steps is can use with Linux and windows both





Status of the added hosts






Step 2: Download agent

Install agent on (Oracle Linux, Red hat Linux, Solaris, AIX, Windows )






Then download the agent from the Agent tab download "agent release"

Prerequisite Verify the installed packages

[root@avdf bin]# rpm -qa | egrep -i "(jdk|jre)"

java-1.8.0-openjdk-headless-1.8.0.181-7.b13.el7.x86_64

java-1.8.0-openjdk-1.8.0.181-7.b13.el7.x86_64

java-1.8.0-openjdk-1.8.0.181-7.b13.el7.i686

Verify the PATH is set properly

[root@avdf bin]# java -version

java version "1.8.0_211"

Java(TM) SE Runtime Environment (build 1.8.0_211-b12)

Java HotSpot(TM) 64-Bit Server VM (build 25.211-b12, mixed mode)

 

Create Directory

[root@avdf agent_home]# mkdir /agent_home/AV/


Copy Agent.jar to (/agent_home/AV) using winscp or relevant tool

Set permission to other user (oracle:dba)

 

[root@avdf product]# chown -R oracle:dba /agent_home/AV/

 

Step 3: Deploy agent.jar in hosts

 

[root@avdf product]#cd / agent_home/AV/

[root@avdf av]# java -jar agent.jar -d /agent_home/AV/


Step 4: Now activate the agent

[root@avdf product]# cd /agent_home/AV/bin

[root@avdf bin]# ./agentctl activate


Step 5: Now activate it from console. You find agent version


Step 6: Now start the agent with generated KEY

[root@avdf bin]# ./agentctl start –k

Enter Activation Key:

Agent started successfully.

Note: - Above activation will ask the Activation key please copy and paste it from the "Agent Activation Key" form AV.


Now Agent status is "running"





d


Start stop agent

[root@avdf bin]# ./agentctl start

Agent started successfully.

[root@avdf bin]# ./agentctl stop

Stopping Agent...

 

Note:-ones you restart the server you must start the agent.


Step 7: Create Audit user in database avagent

 

sql>create user avagent identified by avagent;

SQL>@/home/oracle/app/oracle/product/agent_home/av/plugins/com.oracle.av.plugin.oracle/                  config/oracle_user_setup.sql avagent SETUP

 Session altered.

Granting privileges to AVAGENT ... Done.

Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production

With the Partitioning, OLAP, Data Mining and Real Application Testing options


Step 8: Secured target setup



Step 9: Add Audit trail



Step 10: Start audit trail


Step 11: audit enable xyz.employee;

SQL> audit all on xyz.employee;

Audit succeeded.


Step 12: Retrieve audit settings using avauditor user



    Download report and monitor the activity..!!








Enabling Oracle Audit Vault in RAC

 

At First, we will enable DB auditing in RAC database:


Set the audit trail to DB,EXTEDED :

SQL>ALTER SYSTEM SET AUDIT_TRAIL=DB,EXTENDED SCOPE=SPFILE;


Restart the database to check that parameter is taken in to effect and then query again

SQL> show parameter audit_trail

NAME


TYPE

VALUE

 

audit_trail


string

DB_EXTENDED


Now, ADD BOTH host to Audit Vault:

Log as "AVADMIN" to AV and navigate to the tab “HOST”- Register put the host name and the Ip address

Step1: Register Both RAC Node 1 & 2.

E.g:

Host Name:

RAC1

Host IP:

192.168.10.121

 

Host Name:

RAC2

Host IP:

192.168.10.122

 

Now we can see the “Agent Activation Key” is automatically generated on the host entry. This key is required in order to activate the agent on the Database Server once we deploy the agent on the database server.



Now to deploy the agent on the database server, first download the agent, to do so go to page on the Audit Vault Console HOST -> Agent, now click download for Agent release. This will download the agent.jar which needs to be copied to the database server.


Step2:

[root@avdf ]# java –version

[root@avdf]#mkdir –p /u01/app/oracle/avdf_home

[root@avdf]# java -jar agent.jar -d /u01/app/oracle/avdf_home


Step3:

[root@avdf]# cd /u01/app/oracle/avdf_home/bin

[root@avdf bin]#./agentctl start –k

Enter Activation Key: 

 

Note: - Above activation will ask the Activation key please copy and paste it from the "Agent Activation Key" from AVDF host location.

Step 4: Create the database user (this user will be used during configuring the secured target in AVDF)

SQL> create user av_agent identified by av_agent;


Step 5: Granting privileges to AV_AGENT

[oracle@avdf]$ cd /u01/app/oracle/avdf_home/av/plugins/com.oracle.av.plugin.oracle/config

Sql> @oracle_user_setup.sql

Enter value for 1: av_agent

Enter value for 2: setup

Sql> @oracle_user_setup.sql

Enter value for 1: av_agent

Enter value for 2: SPA

Sql> @oracle_user_setup.sql

Enter value for 1: av_agent

Enter value for 2: ENTITLEMENT

Sql> @oracle_user_setup.sql

Enter value for 1: av_agent

Enter value for 2: REDO_COLL


Step 6: Secured target setup. Add Both RAC Node 1 & 2.


Note: The USER we will passed here is the same user “AV_AGENT” which we setup in our Secured Target database. Add the details as mentioned above to add your database in AVDF fill the necessary information and hit save.


Step 7: Add Audit trail (TYPE- Table-sys.AUD$ & Directory- adump location)


Note: Fill the above details as per your target Database information and hit save.


After this state, logs are start getting generated in target DB servers.




    

Oracle EBS R12.1 Installation and Implementation on Aws Ec2 Instance

 

Oracle E-Business Suite R12 Installation on Linux

 

Majors to be taken care for avoiding Errors during Installation:


ERRORS: R12 Rapid Install Failing With "RC-20200: Fatal: Could not find Unzip. At this time only Native UnZip 5.X is supported." (Doc ID 1455077.1)

 

Solution:  mv /usr/bin/unzip /usr/bin/unzip-ver6

 

RW-50015: Error: - HTTP Listener is not responding. The service might not have started on the port yet. Please check the service and use the retry button. (Doc ID 879522.1)

 

Solution: Create the below link for library file:

 

# ln -s   /usr/lib/libgdbm.so.2.0.0  /usr/lib/libdb.so.2

 

System Requirement:

The installation size of Oracle E-Business Suite R12.1.1 is:

Ø  90 GB for a fresh install with a production database.

Ø  Application tier file system – 35 GB (For HP-UX Itanium 50 Gb)
Database tier file system – 55 GB

Ø  Disk space 200 GB free hard disk space and 4 GB RAM.

 

Ø  Download the Oracle E-Business Suite R12:

From http://edelivery.oracle.com site the latest version

 

·         Oracle E-Business Suite R12.1 setup files almost have 45.3 GB size.

 

 

Ø  In Aws Cloud EC2 Instance :

ü   Operating System - Red Hat Enterprise Linux 6.10(Santiago).

ü   RAM         15 GB

ü  Swap Space – 31 GB

ü  Mount Point - /u01 ->100 GB for Database and Apps.

    - /Staging -> 99 GB for creating Staging Area.


 




Kernel Requirements:









Oracle Linux

6*

Red Hat

Enterprise

Linux 6*

Install the required RPM’s:

RPM for Oracle EBS can be installed using yum.

cd /etc/yum.repos.d
wget http://public-yum.oracle.com/public-yum-ol6.repo

Using a text editor or vi command in terminal, edit the following entries in the file /etc/yum.repos.d/public-yum-ol6.repo

[ol6_latest]
name=Oracle Linux $releasever Latest ($basearch)
baseurl=http://public-yum.oracle.com/repo/OracleLinux/OL6/latest/$basearch/
gpgkey=http://public-yum.oracle.com/RPM-GPG-KEY-oracle-ol6
gpgcheck=1
enabled=1

[ol6_addons]
name=Oracle Linux $releasever Add ons ($basearch)
baseurl=http://public-yum.oracle.com/repo/OracleLinux/OL6/addons/$basearch/
gpgkey=http://public-yum.oracle.com/RPM-GPG-KEY-oracle-ol6
gpgcheck=1
enabled=1

[ol6_UEK_latest]
name=Latest Unbreakable Enterprise Kernel for Oracle Linux $releasever ($basearch)
baseurl=http://public-yum.oracle.com/repo/OracleLinux/OL6/UEK/latest/$basearch/
gpgkey=http://public-yum.oracle.com/RPM-GPG-KEY-oracle-ol6
gpgcheck=1
enabled=1

Update all packages and then install the pre-install rpm by running the following yum commands:

 

 

 yum update
 yum install oracle-ebs-server-R12-preinstall

 

 

 

Ensure the following RPMs are installed:

If not using the pre-install rpm, the following packages (or versions of packages) are not part of the OS distribution media and must be downloaded separately (from http://oss.oracle.com/projects/compatoracle/

files/Enterprise Linux/) for both Oracle Linux 6 and RHEL 6 and installed manually on the application tier:

 

openmotif21-2.1.30-11.EL6.i686 (32-bit)1

xorg-x11-libs-compat-6.8.2-1.EL.33.0.1.i386 (32-bit)

 

Additionally, the following rpm needs to be installed from the Oracle Linux 6 or RHEL 6 distribution media on the application tier:

 

libXrender-0.9.5-1.el6.i686

 

If not using the pre-install rpm, the following packages must be installed from the Oracle Linux 6 or RHEL 6 distribution media on both the application and database tiers:

 

binutils-2.20.51.0.2-5.11.el16.x86_64

compat-db43-4.3.29-15.el6.i686

gcc-4.4.4-13.el16.x86_64

gcc-c++-4.4.4-13.el16.x86_64

glibc-2.12-1.7.el6.i686 (32-bit)

glibc-2.12-1.7.el6.x86_64

glibc-common-2.12-1.7.el6.x86_64

glibc-devel-2.12-1.7.el6.i686 (32-bit)

glibc-devel-2.12-1.7.el6.x86_64

libgcc-4.4.4-13.el6.i686

libgcc-4.4.4-13.el6.x86_64

libstdc++-devel-4.4.4-13.el6.i686

libstdc++-devel-4.4.4-13.el6.x86_64

libstdc++-4.4.4-13.el6.i686

libstdc++-4.4.4-13.el6.x86_64

libXi-1.3-3.el6.i686

libXp-1.0.0-15.1.el6.i686

libXp-1.0.0-15.1.el6.x86_64

libaio-0.3.107-10.el6.i686

libaio-0.3.107-10.el6.x86_64

libgomp-4.4.4-13.el6.x86_64

make-3.81-19.el6.x86_64

gdbm-1.8.0-36.el6.i686

gdbm-1.8.0-36.el6.x86_64

sysstat-9.0.4-11.el6.x86_64

util-linux-ng-2.17.2-6.el6.x86_64

unzip-5.52-3.0.1.el5.x86_642

compat-libstdc++-296-2.96-144.el6.i686

compat-libstdc++-33-3.2.3-69.el6.i686

 

Additionally, the following RPMs are required for the database tier running 11gR2 (users must upgrade the bundled 11gR1 DB to 11gR2 either before or after installing 12.1) on the database tier:

 

compat-libcap1-1.10-1.x86_64

compat-libstdc++-33-3.2.3-69.el6.x86_64

elfutils-libelf-devel-0.148.1-el6.x86_64

libaio-devel-0.3.107-10.el6.x86_64

unixODBC-2.2.14-11.el6.i686

unixODBC-devel-2.2.14-11.el6.i686

unixODBC-2.2.14-11.el6.x86_64

unixODBC-devel-2.2.14-11.el6.x86_64

 

This unzip package (available from EL 6 distribution) is only required for purposes of running Rapid Install to unzip the required EBS files as part of the installation and should be reverted after the install of EBS.

 

mv /usr/bin/unzip  /usr/bin/unzip-ver6

 

After installing the RPM’s, restart machine then run following command to link all libraries “ldconfig -v” to create necessary links and cache to the most recent shared libraries.

ldconfig -v


 Configure hostname as per EBS guideline:


ü  Vi  /etc/hosts & /etc/sysconfig/network

ü  cat /etc/sysconfig/network
HOSTNAME=ebsnode12.ebs12wizer.com

 

ü  cat /etc/hosts
127.0.0.1           localhost.localdomain   localhost
172.31.22.57    ebsnode12.ebs12wizer.com      ebsnode12      








Change SELINUX as follows and Restart Machine to take changes to effect:

        

ü  cat /etc/selinux/config
SELINUX=Disabled


Stop the iptables service:

         

ü  service iptables stop

ü  chkconfig iptables off

ü  service ip6tables stop

ü  chkconfig ip6tables off

  

Configure Kernel parameters:

ü  cat /etc/sysctl.conf

net.ipv4.ip_forward = 0
net.ipv4.conf.default.rp_filter = 1
net.ipv4.conf.default.accept_source_route = 0
kernel.sysrq = 0
kernel.core_uses_pid = 1
net.ipv4.tcp_syncookies = 1
fs.aio-max-nr = 1048576
net.ipv4.tcp_tw_recycle = 0
kernel.shmall = 2097152
kernel.shmmax = 4294967295
kernel.shmmni = 4096
kernel.sem = 256 32000 100 142
fs.file-max = 131072
net.ipv4.ip_local_port_range = 10000 65000
kernel.msgmni = 2878
kernel.msgmax = 8192
kernel.msgmnb = 65535
net.core.rmem_default = 262144
net.core.wmem_default = 262144
net.core.rmem_max = 4194304
net.core.wmem_max = 262144

 

Run the following command to change the current kernel parameters:

 

ü  sysctl –p



Add the following lines to the “/etc/security/limits.conf” file:


cat /etc/security/limits.conf
* hard nofile 65535
* soft nofile 4096
* hard nproc 16386
* soft nproc 2047


         Create Oracle Inventory Directory:


        

mkdir -p /u01/app/oracle/oraInventory
cat /etc/oraInst.loc
inventory_loc=/u01/app/oracle/oraInventory
inst_group=oinstall

       Create Appropriate Users and Groups:


groupadd oinstall
groupadd dba
usermod -g oinstall -G dba oracle
passwd oracle
usermod -g oinstall -G dba applmgr
passwd applmgr

    


   


Create Directory Structure and Change Ownership & Permissions:


cd /u01
ls –ltrh

mkdir –p /u01/app
chown -R oracle:oinstall /u01/app
chmod -R 777 /u01/app
ls -ltrh




v Creating Staging Area:


Unzip all the 40 downloaded files to create the stage.

         

Ø  Unzip –d  /location_of_directory filename.zip

 

  As root user execute the following command:        


 Installation of EBS R12.1.1:

 

Ø  cd /location/startCD/Disk1/rapidwiz

Ø  ./rapidwiz



                         

Click Next button. 




Select Install Oracle Applications Release 12.1.1 and click Next button.

Select Install Oracle Applications Release 12.1.1 and click Next button. 

                            

                                              
                                            
Click Next button.
                                                          

                                     
Select Create a new configuration then click Next button.

                                         
                                        
                                            
Click Next button.

                                        
Write in the Base directory field /oradata then click Next button




Select Suite Licensing then click Next button.


Click Next button.


Write in the Base directory field /apps and in the Instance directory field /apps/inst then click Next button




Click Next button.


Review System checks

 

Click Next button.


Click Next button.



Click Yes button





Click Next button.


Click on Connect to Oracle Applications Release 12.1.1 then click Finish button.





Log to oracle applications using sysadmin user name and sysadmin password.


E-Business Suite services status check, start & stop procedure

1. Start Services 

a)    Db services (With Oracle User).

i)     Listener.

cd/u01/app/oracle/db/tech_st/11.1.0/appsutil/scripts/PROD_ebsnode12/

           ./addlnctl.sh start

 

 ii)    Database.

            cd /u01/app/oracle/db/tech_st/11.1.0/appsutil/scripts/PROD_ebsnode12/

            ./addbctl.sh start instance_name

 

 

 

b)    Application services (With Root User).

 

i)     Apps Service.

    cd /u01/app/oracle/inst/apps/PROD_ebsnode12/admin/scripts

           ./adstrtal.sh apps/apps

 

 

2. Stop Services

 

a)    Db services (With Oracle User).

i)     Listener.

cd /u01/app/oracle/db/tech_st/11.1.0/appsutil/scripts/PROD_ebsnode12/

           ./addlnctl.sh stop

 

ii)   Database.

           cd /u01/app/oracle/db/tech_st/11.1.0/appsutil/scripts/PROD_ebsnode12/

           ./addbctl.sh stop instance_name

 

 

 

 

b)    Application services (With Root User).

i)     Apps Service.

           cd /u01/app/oracle/inst/apps/PROD_ebsnode12/admin/scripts

           ./adstpall.sh apps/apps

 

 

3. Status Check

 

        i)  Database Status.

            cd /u01/app/oracle/db/tech_st/11.1.0/appsutil/scripts/PROD_ebsnode12/

            ./addbctl.sh status

 



 



 ii) Application Status:

     cd /u01/app/oracle/inst/apps/PROD_ebsnode12/admin/scripts

     ./adoacorectl.sh status

 



==========END OF EBS R12.1.1 INSTALLATION==========










 


 


Reference:-  
(Doc ID 761566.1)