Thursday 24 January 2019

CREATE LOCAL YUM REPO RHL6


Steps cum Commands are as follows:

Step 1: Boot into Red Hat Linux and Login as root

Step 2:  Go to Devices and Optical Drive and Click on .iso file of RHEL6 and mount it..

Step 3: Configuring IP Address

Click on the Network Icon Above and click on System-ETHO
Right Click on Desktop: Click on Open in Terminal

or

Command: #system-config-network
Provide the IP Address Configuration as per your network requirements.

Deployment of FTP Server

Step 4: Open the Packages Folder in RHEL DVD.

Step 5: Locate the Package: vsftpd and double click and click on Install

Step 6: Go to Terminal and Type the Command to Start FTP Server
#service vsftpd restart

Step 7: Making FTP Server always run when Starting RHEL 6
#chkconfig vsftpd on

Step 8: Installing CreateRepo Package

a. First Install the following three Packages:

1. deltarpm
2. Python deltarpm
3.crearepo

Now Install the Package Create Repo

Step 9: Copying the Packages from RHEL DVD to /var/ftp/pub
#cp -ivr /media/RHEL_6.4\X86_64\DISC\1/* /var/ftp/pub

Step 10: Creating the Repository File
#vim /etc/yum.repos.d/first.repo
(First.repo is name of file- You can assign any name)

Type the following code after pressing i to activate Insert Mode in VIM Editor

[FirstRepo]
name= Mughees Linux Repository
baseurl=ftp://ipaddress/pub
enabled=1
gpgcheck=0

Press "esc" and press : and type wq. It will save the contents and exit the VIM Editor

Step 10: Creating the Repository
#createrepo /var/ftp/pub

Now the Yum Repository is being activated locally on Red Hat Server

Install any package

Monday 26 February 2018

Oracle RAC Installation 11g solaris

                Oracle RAC Installation 


User Accounts:

The following O/S groups will be created:
Description
OS Group Name
OS Users Assigned to this Group
Oracle Privilege
Oracle Group Name
Oracle Inventory and Software Owner
oinstall
grid, oracle


Oracle Automatic Storage Management Group
asmadmin
grid
SYSASM
OSASM
ASM Database Administrator Group
asmdba
grid, oracle
SYSDBA for ASM
OSDBA for ASM
ASM Operator Group
asmoper
grid
SYSOPER for ASM
OSOPER for ASM
Database Administrator
dba
oracle
SYSDBA
OSDBA
Database Operator
oper
oracle
SYSOPER
OSOPER

1.      Create OS groups using the command below Enter commands as the root user:
a. #/usr/sbin/groupadd oinstall
b. #/usr/sbin/groupadd dba
c. #/usr/sbin/groupadd asmadmin
d. #/usr/sbin/groupadd asmdba
e. #/usr/sbin/groupadd asmoper

2.      Create the users that will own the Oracle software using the commands:
a. #/usr/sbin/useradd -g oinstall -G asmadmin,asmdba,asmoper -d /home/grid -m grid
b. #/usr/sbin/useradd -g oinstall -G dba,asmdba -d /home/oracle -m oracle

3.      Set the password for the oracle account using the following command. Replace password with your own password.

passwd oracle
Changing password for user oracle.
New UNIX password:password
retype new UNIX password:password
passwd: all authentication tokens updated successfully.

passwd grid
Changing password for user oracle.
New UNIX password:password
retype new UNIX password:password
passwd: all authentication tokens updated successfully.


Repeat Step 1 through Step 3 on each node in your cluster.

Configuring Kernel Parameters

# vi /etc/system
set noexec_user_stack=1
set semsys:seminfo_semmni=100
set semsys:seminfo_semmns=1024
set semsys:seminfo_semmsl=256
set semsys:seminfo_semvmx=32767
set shmsys:shminfo_shmmax=4294967296
set shmsys:shminfo_shmmni =100

NOTE: OUI checks the current settings for various kernel parameters to ensure they meet the minimum requirements for deploying Oracle RAC

Create the Oracle Inventory Directory

To create the Oracle Inventory directory, enter the following commands as the root user:
# mkdir -p /oracle-11g/app/oraInventory
# chown -R grid:oinstall /oracle-11g/app/oraInventory
# chmod -R 775 /oracle-11g/app/oraInventory

Creating the Oracle Grid Infrastructure Home Directory

To create the Grid Infrastructure home directory, enter the following commands as the root user:
# mkdir -p /oracle-11g/app/11.2.0/grid
# chown -R grid:oinstall /oracle-11g/app/11.2.0/grid
# chmod -R 775 /oracle-11g/app/11.2.0/grid

Creating the Oracle Base Directory

To create the Oracle Base directory, enter the following commands as the root user:
# mkdir -p /oracle-11g/app/oracle

# mkdir /oracle-11g/app/oracle/cfgtoollogs --needed to ensure that dbca is able to run after the rdbms installation.
# chown -R oracle:oinstall /oracle-11g/app/oracle
# chmod -R 775 /oracle-11g/app/oracle

Creating the Oracle RDBMS Home Directory

To create the Oracle RDBMS Home directory, enter the following commands as the root user:
# mkdir -p /oracle-11g/app/oracle/product/11.2.0/db_1
# chown -R oracle:oinstall /oracle-11g/app/oracle/product/11.2.0/db_1
# chmod -R 775 /oracle-11g/app/oracle/product/11.2.0/db_1

Create Login Script for the oracle User Account

Log in to both Oracle RAC nodes as the oracle user account and create the following login script ( .bash_profile):

Note: When setting the Oracle environment variables for each Oracle RAC node, make certain to assign each RAC node a unique Oracle SID. For this example:
 ORACLE_SID=**db1.
 ORACLE_SID=**db2.
vi .profile

paste the below script in the startup script:
ORACLE_BASE=/oracle-11g/app/oracle; export ORACLE_BASE
ORACLE_HOME=$ORACLE_BASE/product/11.2.0/db_1; export ORACLE_HOME
ORACLE_SID=**db1; export ORACLE_SID
EDITOR=vi;export EDITOR
LD_LIBRARY_PATH=$ORACLE_HOME/lib:$LD_LIBRARY_PATH; export LD_LIBRARY_PATH
PATH=$ORACLE_HOME/bin:$PATH:/usr/local/bin; export PATH
SHLIB_PATH=$ORACLE_HOME/lib:$SHLIB_PATH; export SHLIB_PATH
LIBPATH=$ORACLE_HOME/lib:$LIBPATH; export LIBPATH
PS1=$LOGNAME@`hostname`' $'

Create Login Script for the grid User Account

Log in to both Oracle RAC nodes as the grid user account and create the following login script ( .bash_profile):

Note: When setting the Oracle environment variables for each Oracle RAC node, make certain to assign each RAC node a unique Oracle SID. For this example:
ORACLE_SID=+ASM1
ORACLE_SID=+ASM2

vi .profile

paste the below script in the startup script.
ORACLE_HOME=/oracle-11g/app/11.2.0/grid;
ORACLE_SID=+ASM1;
ORACLE_TERM=vt100;
export ORACLE_HOME ORACLE_SID ORACLE_TERM
TNS_ADMIN=$ORACLE_HOME/network/admin;
PATH=$ORACLE_HOME/bin:$PATH:.; export PATH
PATH=$ORACLE_HOME/bin:$PATH:.:/usr/bin:/usr/openwin/bin:/usr/local/bin:/usr/ccs/bin:/usr/ucb:/usr/sbin:/etc:/usr/sfw/bin; export PATH
PS1=$LOGNAME@`hostname`' $'
EDITOR=vi;export EDITOR

Stage the Oracle Software

It is recommended that you stage the required software onto a local drive on Node 1 of your cluster.

Install Oracle Grid Infrastructure:

Perform the following tasks as the grid user to install Oracle grid infrastructure:
id
uid=1100(grid) gid=1000(oinstall) groups=1000(oinstall),1200(asmadmin),1201(asmdba),1202(asmoper)

DISPLAY=<your local workstation>:0.0
Export DISPLAY

Go to the grid software directory and run the Grid installer.
 
./RinInstaller

Screen Name
Response
Select Installation Option
Select " Install and Configure Grid Infrastructure for a Cluster"
Select Installation Type
Select " Advanced Installation"
Select Product Languages
Make the appropriate selection(s) for your environment.
Grid Plug and Play Information
Un-check the option to "Configure GNS".
Cluster Name
SCAN Name
SCAN Port
VCDB-cluster
Hq-vc-db-scan
1521
After clicking [Next], the OUI will attempt to validate the SCAN information:
Cluster Node Information
Use this screen to add the node HQ-BOSS-SYSTEM to the cluster and to configure SSH connectivity.
Click the "Add" button to add " HQ-BOSS-SYSTEM " and its virtual IP address " hq-boss-system-vip " according to the table below:
Public Node Name
Virtual Host Name
hq-boss-sys-2
hq-boss-sys-2-vip
HQ-BOSS-SYSTEM
hq-boss-system-vip
Next, click the [SSH Connectivity] button. Enter the "OS Password" for the grid user and click the [Setup] button. This will start the "SSH Connectivity" configuration process:
 
After the SSH configuration process successfully completes, acknowledge the dialog box.
Finish off this screen by clicking the [Test] button to verify passwordless SSH connectivity.
Specify Network Interface Usage
Identify the network interface to be used for the "Public" and "Private" network. Make any changes necessary to match the values in the table below:
Interface Name
Subnet
Interface Type
Ce1
20.0.0.0
Private
Ce2
172.20.51.0
Public
Storage Option Information
Select “Automatic Storage Management (ASM)".
Create ASM Disk Group
Create an ASM Disk Group that will be used to store the Oracle Clusterware files according to the values in the table below:
Disk Group Name
Redundancy
Disk Path
CRS
External
Select the disk group
Specify ASM Password
Use same passwords for these accounts.
Privileged Operating System Groups
Make any changes necessary to match the values in the table below:
OSDBA for ASM
OSOPER for ASM
OSASM
asmdba
asmoper
asmadmin
Specify Installation Location
Set the "Oracle Base" ( $ORACLE_BASE) and "Software Location" ( $ORACLE_HOME) for the Oracle grid infrastructure installation:     Oracle Base: /oracle-11g/app/oracle    Software Location: /oracle-11g/app/11.2.0/grid
Create Inventory
Since this is the first install on the host, you will need to create the Oracle Inventory. Use the default values provided by the OUI:     Inventory Directory: /oracle-11g/app/oraInventory     oraInventory Group Name: oinstall
Prerequisite Checks
The installer will run through a series of checks to determine if both Oracle RAC nodes meet the minimum requirements for installing and configuring the Oracle Clusterware and Automatic Storage Management software.
Starting with Oracle Clusterware 11g release 2 (11.2), if any checks fail, the installer (OUI) will create shell script programs, called fixup scripts, to resolve many incomplete system configuration requirements. If OUI detects an incomplete task that is marked "fixable", then you can easily fix the issue by generating the fixup script by clicking the [Fix & Check Again] button.
The fixup script is generated during installation. You will be prompted to run the script as root in a separate terminal session. When you run the script, it raises kernel values to required minimums, if necessary, and completes other operating system configuration tasks.
If all prerequisite checks pass (as was the case for my install), the OUI continues to the Summary screen.
Summary
Click [Finish] to start the installation.
Setup
The installer performs the Oracle grid infrastructure setup process on both Oracle RAC nodes.
Execute Configuration scripts
After the installation completes, you will be prompted to run the / oracle-11g /app/oraInventory/orainstRoot.sh and / oracle-11g /app/11.2.0/grid/root.sh scripts. Open a new console window on both Oracle RAC nodes in the cluster, (starting with the node you are performing the install from), as the root user account.
Run the orainstRoot.sh script on both nodes in the RAC cluster:
[root@ **-****-sys-2~]# 
                                       / oracle-11g /app/oraInventory/orainstRoot.sh
[root@ **-****-system ~]# 
                                       / oracle-11g /app/oraInventory/orainstRoot.sh
                                     
Within the same new console window on both Oracle RAC nodes in the cluster, (starting with the node you are performing the install from), stay logged in as the root user account. Run the root.sh script on both nodes in the RAC cluster one at a time starting with the node you are performing the install from:
[root@ **-****-sys-2 ~]# 
                                             / oracle-11g /app/11.2.0/grid/root.sh
[root@ **-****-system ~]# 
                                             / oracle-11g /app/11.2.0/grid/root.sh
                                     
The root.sh script can take several minutes to run. When running root.sh on the last node, you will receive output similar to the following which signifies a successful install:
...
The inventory pointer is located at /etc/oraInst.loc
The inventory is located at / oracle-11g /app/oraInventory
'UpdateNodeList' was successful.
Go back to OUI and acknowledge the "Execute Configuration scripts" dialog window.
Finish
At the end of the installation, click the [Close] button to exit the OUI.

Verify Oracle Clusterware Installation:

After the installation of Oracle grid infrastructure, you should run through several tests to verify the install was successful. Run the following commands on both nodes in the RAC cluster as the grid user.
crsctl check crs
CRS-4638: Oracle High Availability Services is online
CRS-4537: Cluster Ready Services is online
CRS-4529: Cluster Synchronization Services is online
CRS-4533: Event Manager is online
 

Check Clusterware Resources.

crs_stat -t –v
 

Check Cluster Nodes

olsnodes –n
 

Confirming Oracle ASM Function for Oracle Clusterware Files

srvctl status asm –a
 

Check Oracle Cluster Registry (OCR)

Ocrcheck

Install Oracle Database 11g Release 2 Software:

Go the oracle RDBMS software location and run the below command:
./runInstaller
Screen Name
Response
Configure Security Updates
For the purpose of this article, un-check the security updates checkbox and click the [Next] button to continue. Acknowledge the warning dialog indicating you have not provided an email address by clicking the [Yes] button.
Installation Option
Select " Install database software only".
Grid Options
Select the " Real Application Clusters database installation" radio button (default) and verify that both Oracle RAC nodes are checked in the "Node Name" window.
Next, click the [SSH Connectivity] button. Enter the "OS Password" for the oracle user and click the [Setup] button. This will start the "SSH Connectivity" configuration process:
After the SSH configuration process successfully completes, acknowledge the dialog box.
Finish off this screen by clicking the [Test] button to verify passwordless SSH connectivity.
Product Languages
Make the appropriate selection(s) for your environment.
Database Edition
Select " Enterprise Edition".
Installation Location
Specify the Oracle base and Software location (Oracle_home) as follows:    Oracle Base/oracle-11g/app/oracle    Software Location/oracle-11g/app/oracle/product/11.2.0/db_1
Operating System Groups
Select the OS groups to be used for the SYSDBA and SYSOPER privileges:     Database Administrator (OSDBA) Group: dba     Database Operator (OSOPER) Group: oinstall
The installer will run through a series of checks to determine if both Oracle RAC nodes meet the minimum requirements for installing and configuring the Oracle Database software.
Starting with 11g release 2 (11.2), if any checks fail, the installer (OUI) will create shell script programs, called fixup scripts, to resolve many incomplete system configuration requirements. If OUI detects an incomplete task that is marked "fixable", then you can easily fix the issue by generating the fixup script by clicking the [Fix & Check Again] button.
The fixup script is generated during installation. You will be prompted to run the script as root in a separate terminal session. When you run the script, it raises kernel values to required minimums, if necessary, and completes other operating system configuration tasks.
If all prerequisite checks pass (as was the case for my install), the OUI continues to the Summary screen.
Summary
Click [Finish] to start the installation.
Install Product
The installer performs the Oracle Database software installation process on both Oracle RAC nodes.
Execute Configuration scripts
After the installation completes, you will be prompted to run the 
/oracle11g/app/oracle/product/11.2.0/db_1/root.sh script on both Oracle RAC nodes. Open a new console window on both Oracle RAC nodes in the cluster, (starting with the node you are performing the install from), as the root user account.
Run the root.sh script on all nodes in the RAC cluster:
[root@ **-****-sys-2 ~]# 
  /oracle-11g/app/oracle/product/11.2.0/db_1/root.sh
[root@ **-****-system ~]# 
  /oracle-11g/app/oracle/product/11.2.0/db_1/root.sh
Go back to OUI and acknowledge the "Execute Configuration scripts" dialog window.
Finish
At the end of the installation, click the [Close] button to exit the OUI.

Create Additional ASM Disk Groups using ASMCA

Perform the following tasks as the grid user to create two additional ASM disk groups:
$ asmca
Screen Name
Response
Disk Groups
From the "Disk Groups" tab, click the " Create" button.
Create Disk Group
The "Create Disk Group" dialog should show ASMLib volumes.
If the ASMLib volumes do not show up in the "Select Member Disks" window as eligible then click on the "Change Disk Discovery Path".
When creating the "Data" ASM disk group, use "DATA1" for the "Disk Group Name". In the "Redundancy" section, choose "External (none)". Finally, check the ASMLib volume in the "Select Member Disks" section.
After verifying all values in this dialog are correct, click the "[OK]" button.
Disk Groups
After creating the first ASM disk group, you will be returned to the initial dialog. Click the "Create" button again to create the second ASM disk group.
Create Disk Group
Repeat the above “Create Disk Group” section to create “REDO” and “ARCH” Disk Groups
Disk Groups
Exit the ASM Configuration Assistant by clicking the [Exit] button.

Create the Clustered Database

To start the database creation process, run the following as the oracle user:
$ dbca
Screen Name
Response
Welcome Screen
Select Oracle Real Application Clusters database.
Operations
Select Create a Database.
Database Templates
Select Custom Database.
Database Identification
Cluster database configuration.     Configuration Type: Admin-Managed
Database naming.     Global Database Name: test.****.**     SID Prefix: test
Node Selection.  Click the [Select All] button to select all servers: **-****-sys-2 and **-****-system.
Management Options
Uncheck the Configure Enterprise Manager / Configure Database Control for local management.
Database Credentials
Select to Use the Same Administrative Password for All Accounts. Enter the password (twice) and make sure the password does not start with a digit number.
Database File Locations
Specify storage type and locations for database files.     Storage Type: Automatic Storage Management (ASM)     Storage Locations: Use Oracle-Managed Files       Database Area: +DATA1
Specify ASMSNMP Password
Specify the ASMSNMP password for the ASM instance.
Recovery Configuration
We choose to Uncheck the option for Specify Fast Recovery Area as it was not required in our case.
If you want to check the option for Specify Fast Recovery Area.
For the Fast Recovery Area, click the [Browse] button and select the disk group name “DISKGROUPNAME”.
When defining the Fast Recovery Area size, use the entire volume minus 10% for overhead — (33-10%=30 GB).
Database Content
Uncheck the sample schema as it is not required.
Initialization Parameters
Change any parameters as per the environment requirement. Use automated memory management and leave the rest at their default settings.
Database Storage
Change any parameters for your environment. I left them all at their default settings.
Creation Options
Keep the default option Create Database selected. I also always select to Generate Database Creation Scripts. Click Finish to start the database creation process. After acknowledging the database creation report and script generation dialog, the database creation will start.
Click OK on the "Summary" screen.
End of Database Creation
At the end of the database creation, exit from the DBCA.

Verify Clustered Database is Open:

su - grid -c "crsctl status resource -w \"TYPE co 'ora'\" -t"