How to remove UEK (unbreakable enterprise kernel)

Check all the kernel’s installed

Check current kernel in use.

remove uek kernel using yum command

now my kernel is downgraded to 2.6.18-398.el5.

please feel free to write me at sunil@sunilthetechfreak.com

ORA-28000 account locked error while creating database using dbca on Grid Infrastructure with ASM on Standalone Server

My environment details
OS : OEL 6.5 64bit
Database version : 11.2.0.4
grid infrastructure with asm on Standalone Server

I had two issues while creating database using dbca

1) I was not able to see the diskgroup at step 6 after selecting Automatic storage management, i selected use oracle-managed files
and at database area after clicking the browse button no diskgroup was shown in that area it was blank

Cause of problem :
oracle user was not part of asmdba group

Solution :
I added oracle user to asmdba group as i missed to add oracle user to asmdba group

usermod -G asmdba oracle

after that i could see the diskgroup after selecting browse button

2) ORA-28000 account locked error after it completes 43% while creating database

Cause of problem :
oracle user was not part of dba group

as you can see from the output

[oracle@oralab1 cfgtoollogs]$ id oracle

uid=54321(oracle) gid=54321(oinstall) groups=54321(oinstall),54324(asmdba)

[oracle@oralab1 cfgtoollogs]$ id grid

uid=54322(grid) gid=54321(oinstall) groups=54321(oinstall),54322(dba),54323(asmadmin),54324(asmdba),54325(asmoper)

Solution :
usermod -a -G dba oracle

after adding oracle user to dba group database creation was successful

How to fix shared folder issue in vmware workstation 10 for Oracle Linux 6.5 guest

[root@asm1 bin]# yum -y install kernel-uek.x86_64
[root@asm1 bin]# yum -y install gcc
[root@asm1 bin]# yum -y install kernel-uek-devel.x86_64

[root@asm1 bin]# ln -s /usr/src/kernels/3.8.13-16.2.1.el6uek.x86_64/include/generated/uapi/linux/version.h /usr/src/kernels/3.8.13-16.2.1.el6uek.x86_64/include/linux/version.h

uninstall vmware-tools

[root@asm1 bin]# cd /tmp/vmware-tools-distrib/bin
[root@asm1 bin]# ./vmware-uninstall-tools.pl

reinstall vmware-tools
[root@asm1 bin]# cd /tmp/vmware-tools-distrib
[root@asm1 bin]# ./vmware-install.pl -default

now you can change your directory to /mnt/hgfs and check your shared folder
[root@asm1 /]# cd /mnt/hgfs/

 

Configure PXE Server to automate Oracle Linux 6 unattended installation via network

I am using http method (My images are hosted on the web server)

I configured my virtual machine as below

Memory 2gb
Processors 1
Hard disk (SCSI) 30gb
Network Adapter Bridged(Automatic) (For Internet access and yum installation)
Network Adapter 2 Custom (VMnet4) ( Having IP 192.168.222.1 netmask 255.255.255.0 only for pxe server)

After installing oracle linux server 6.0 configure ip address for network adapter 2

setup public yum server using my guide as per below link.

http://sunilthetechfreak.com/2012/07/18/how-to-setup-public-yum-for-all-updates-on-oracle-linux-6/

The required packages for PXE Server (xinetd,syslinux,dhcpd,tftp-server,httpd)

# install the packages

yum install -y syslinux xinetd tftp-server dhcp httpd

# Enable tftp server & start tftp service

vi /etc/xinetd.d/tftp
Disable=no (only change this line from the tftp file)

service xinetd restart or /etc/init.d/xinetd restart
chkconfig xinetd on (To auto start the service when the system boot)

# Configure DHCP server & start the dhcp service
vi /etc/dhcp/dhcpd.conf

#Global options (also important for pxe booting)

lease-file-name “/var/lib/dhcpd/dhcpd.leases”;
allow booting;
allow bootp;
authoritative;

#subnet of our local network

subnet 192.168.222.0 netmask 255.255.255.0

{

# Parameters for local subnet
option subnet-mask 255.255.255.0;
option domain-name “localdomain”
option domain-name-servers 192.168.222.1; #(This is optional, but i am pointing it to this same server)
default-lease-time 21600;
max-lease-time 43200;

# Client ip range (the range defined here will be given to the client which request the ip for auto installation)

range dynamic-bootp 192.168.222.20 192.168.222.50;

#very important for pxe booting

filename “pxelinux.0”;
next-server 192.168.222.1; (I am point to this same pxe server)

}

#save & close

service dhcpd restart or /etc/init.d/dhcpd restart
chkconfig dhcpd on

# create required directory to copy oracle linux 6 media

[root@oel6-server1 sunil]# mkdir -p /var/pxe/ol6
[root@oel6-server1 sunil]# mkdir -p /var/lib/tftpboot/ol6

#mount the oracle linux 6 dvd or iso file which ever is available

[root@oel6-server1 sunil]# cd /media
[root@oel6-server1 media]# ls
OL6.0 x86_64 Disc 1 20110203

[root@oel6-server1 media]# cd OL*

# Check the contents to see if it is properly mounted.

[root@oel6-server1 OL6.0 x86_64 Disc 1 20110203]# ls -l
total 706
drwxr-xr-x. 3 sunil sunil 2048 Feb 4 2011 EFI
-rw-r–r–. 1 sunil sunil 7041 Feb 4 2011 EULA
-rw-r–r–. 1 sunil sunil 7041 Feb 4 2011 eula.en_US
-rw-r–r–. 1 sunil sunil 3334 Feb 4 2011 eula.py
-rw-r–r–. 1 sunil sunil 18390 Feb 4 2011 GPL
drwxr-xr-x. 3 sunil sunil 2048 Feb 4 2011 HighAvailability
drwxr-xr-x. 3 sunil sunil 2048 Feb 4 2011 images
drwxr-xr-x. 2 sunil sunil 2048 Feb 4 2011 isolinux
drwxr-xr-x. 3 sunil sunil 2048 Feb 4 2011 LoadBalancer
-rw-r–r–. 1 sunil sunil 98 Feb 4 2011 media.repo
drwxr-xr-x. 2 sunil sunil 614400 Feb 4 2011 Packages
-rw-r–r–. 1 sunil sunil 2613 Feb 4 2011 README-en
-rw-r–r–. 1 sunil sunil 7046 Feb 4 2011 README-en.html
-rw-r–r–. 1 sunil sunil 16807 Feb 4 2011 RELEASE-NOTES-en
-rw-r–r–. 1 sunil sunil 19168 Feb 4 2011 RELEASE-NOTES-en.html
lrwxrwxrwx. 1 sunil sunil 15 Feb 4 2011 repodata -> Server/repodata
drwxr-xr-x. 3 sunil sunil 2048 Feb 4 2011 ResilientStorage
-rw-r–r–. 1 sunil sunil 1011 Feb 4 2011 RPM-GPG-KEY
-rw-r–r–. 1 sunil sunil 1011 Feb 4 2011 RPM-GPG-KEY-oracle
drwxr-xr-x. 3 sunil sunil 2048 Feb 4 2011 ScalableFileSystem
drwxr-xr-x. 4 sunil sunil 2048 Feb 4 2011 Server
-rw-r–r–. 1 sunil sunil 108 Feb 4 2011 supportinfo
-r–r–r–. 1 sunil sunil 5357 Feb 4 2011 TRANS.TBL

# copy all the contents to the /var/pxe/ol6 directory.

[root@oel6-server1 OL6.0 x86_64 Disc 1 20110203]# cp –ivr * /var/pxe/ol6

# now copy the kernel & image file from images folder to tftpboot/ol6 directory

[root@oel6-server1 pxeboot]# pwd
/var/pxe/ol6/images/pxeboot

[root@oel6-server1 pxeboot]# ls -l
total 33044
-rw-r–r–. 1 root root 30039242 Jul 9 21:06 initrd.img
-r–r–r–. 1 root root 441 Jul 9 21:06 TRANS.TBL
-rwxr-xr-x. 1 root root 3791744 Jul 9 21:06 vmlinuz

# copy the vmlinuz and initrd.img files to the tftpboot directory.

[root@oel6-server1 pxeboot]# cp vmlinuz /var/lib/tftpboot/ol6
[root@oel6-server1 pxeboot]# cp initrd.img /var/lib/tftpboot/ol6

[root@oel6-server1 pxeboot]# cd /usr/share/syslinux

# copy the menu file.

[root@oel6-server1 syslinux]# cp /usr/share/syslinux/menu.c32 /var/lib/tftpboot

#create folder

[root@oel6-server1 sunil]# mkdir -p /var/lib/tftpboot/pxelinux.cfg

# create default menu file

[root@oel6-server1 sunil]# vi /var/lib/tftpboot/pxelinux.cfg/default
timeout 100
default menu.c32

menu title =======Network Boot Menu=======
label 1
menu label ^ 1) Oracle Linux 6
kernel ol6/vmlinuz
append initrd=ol6/initrd.img ks=http://192.168.0.70/ks/ks.cfg ksdevice=eth0

# save and close

# now configure the webserver (Apache server to get the installation files)

[root@oel6-server1 sunil]# vi /etc/httpd/conf.d/pxeboot.conf

Alias /ol6 /var/pxe/ol6

Options Indexes FollowSymLinks
Order Deny,Allow
Deny from all
Allow from 127.0.0.1 192.168.222.0/24 192.168.1.0/24

#save & close restart the webserver

service httpd restart or /etc/init.d/httpd restart
chkconfig httpd on

#now create kickstart file as per the required configuration

yum install -y system-config-kickstart

system-config-kickstart # you can configure the system as per your requirement

[root@oel6-server1 sunil]# mkdir /var/www/html/ks

# As i already have anaconda-ks.cfg from my earlier installation i will use the same

[root@oel6-server1 sunil]# cp /root/anaconda-ks.cfg /var/www/html/ks/ks.cfg

# Change the permission as below

chmod 644 /var/www/html/ks/ks.cfg

# check if you are able to browse both the installation media & kickstart file from the webserver

Oracle Linux 6 Http image
http://192.168.222.1/ol6

ks file
http://192.168.222.1/ks/ks.cfg

# Stop the Linux firewall

[root@oel6-server1 sunil]# service iptables stop
iptables: Flushing firewall rules: [ OK ]
iptables: Setting chains to policy ACCEPT: filter [ OK ]
iptables: Unloading modules: [ OK ]
[root@oel6-server1 sunil]# chkconfig iptables off

# restart all the service httpd,dhcp, xinetd

#configure a new virtual machine using the same network adapter setting Custom (VMnet4) and test your installation. if you have any queries do write to me so i would be able to help.

Error while starting dhcp Server (dhcpd service) in Oracle Linux 6

can’t open /var/lib/dhcpd/dhcpd.leases

[root@oel6-server1 dhcpd]# service dhcpd restart
Starting dhcpd: [FAILED]

[root@oel6-server1 dhcpd]# tail -20 /var/log/messages
Jul 9 16:50:06 oel6-server1 dhcpd: Configuration file errors encountered — exiting
Jul 9 16:50:06 oel6-server1 dhcpd:
Jul 9 16:50:06 oel6-server1 dhcpd: This version of ISC DHCP is based on the release available
Jul 9 16:50:06 oel6-server1 dhcpd: on ftp.isc.org. Features have been added and other changes
Jul 9 16:50:06 oel6-server1 dhcpd: have been made to the base software release in order to make
Jul 9 16:50:06 oel6-server1 dhcpd: it work better with this distribution.
Jul 9 16:50:06 oel6-server1 dhcpd:
Jul 9 16:50:06 oel6-server1 dhcpd: Please report for this software via the Oracle Bugzilla site:
Jul 9 16:50:06 oel6-server1 dhcpd: http://bugzilla.oracle.com
Jul 9 16:50:06 oel6-server1 dhcpd:
Jul 9 16:50:06 oel6-server1 dhcpd: exiting.
Jul 9 16:50:57 oel6-server1 dhcpd: Internet Systems Consortium DHCP Server 4.1.1-P1
Jul 9 16:50:57 oel6-server1 dhcpd: Copyright 2004-2010 Internet Systems Consortium.
Jul 9 16:50:57 oel6-server1 dhcpd: All rights reserved.
Jul 9 16:50:57 oel6-server1 dhcpd: For info, please visit https://www.isc.org/software/dhcp/
Jul 9 16:50:57 oel6-server1 dhcpd: Not searching LDAP since ldap-server, ldap-port and ldap-base-dn were not specified in the config file
Jul 9 16:50:57 oel6-server1 dhcpd: Can’t open lease database /var/lib/dhcpd/dhcp.leases: No such file or directory —

SOLUTION
When I checked the file as below the owner of dhcpd.lease file was dhcpd

[root@oel6-server1 dhcpd]# ls -ltr
total 0
-rw-r–r–. 1 dhcpd dhcpd 0 Dec 20 2012 dhcpd.leases
-rw-r–r–. 1 dhcpd dhcpd 0 Dec 20 2012 dhcpd6.leases

So I changed the permission to root and restarted the service

[root@oel6-server1 dhcpd]# chown root dhcpd.leases
[root@oel6-server1 dhcpd]# ls -ltr
total 0
-rw-r–r–. 1 root dhcpd 0 Dec 20 2012 dhcpd.leases
-rw-r–r–. 1 dhcpd dhcpd 0 Dec 20 2012 dhcpd6.leases
[root@oel6-server1 dhcpd]# service dhcpd restart
Starting dhcpd: [ OK ]

Transaction Check Error while installing DHCP on Oracle Linux 6.0

[root@oel6-server1 /]# yum install -y dhcp
Loaded plugins: refresh-packagekit, rhnplugin
This system is not registered with ULN.
ULN support will be disabled.
Setting up Install Process
No package resolvedep available.
Resolving Dependencies
–> Running transaction check
—> Package dhcp.x86_64 12:4.1.1-34.P1.0.1.el6 will be installed
–> Processing Dependency: dhcp-common = 12:4.1.1-34.P1.0.1.el6 for package: 12:dhcp-4.1.1-34.P1.0.1.el6.x86_64
–> Processing Dependency: portreserve for package: 12:dhcp-4.1.1-34.P1.0.1.el6.x86_64
–> Running transaction check
—> Package dhcp-common.x86_64 12:4.1.1-34.P1.0.1.el6 will be installed
—> Package portreserve.x86_64 0:0.0.4-9.el6 will be installed
–> Finished Dependency Resolution

Dependencies Resolved

Package Arch Version Repository Size

Installing:
dhcp x86_64 12:4.1.1-34.P1.0.1.el6 ol6_latest 815 k
Installing for dependencies:
dhcp-common x86_64 12:4.1.1-34.P1.0.1.el6 ol6_latest 140 k
portreserve x86_64 0.0.4-9.el6 ol6_latest 22 k

Transaction Summary

Install 3 Package(s)

Total size: 978 k
Installed size: 2.1 M
Downloading Packages:
Running rpm_check_debug
Running Transaction Test

Transaction Check Error:
file /usr/share/man/man5/dhcp-eval.5.gz from install of dhcp-common-12:4.1.1-34.P1.0.1.el6.x86_64 conflicts with file from package dhclient-12:4.1.1-12.P1.el6.x86_64
file /usr/share/man/man5/dhcp-options.5.gz from install of dhcp-common-12:4.1.1-34.P1.0.1.el6.x86_64 conflicts with file from package dhclient-12:4.1.1-12.P1.el6.x86_64

Solution

[root@oel6-server1 /]# yum update dhclient
Loaded plugins: refresh-packagekit, rhnplugin
This system is not registered with ULN.
ULN support will be disabled.
Setting up Update Process
Resolving Dependencies
–> Running transaction check
—> Package dhclient.x86_64 12:4.1.1-12.P1.el6 will be updated
—> Package dhclient.x86_64 12:4.1.1-34.P1.0.1.el6 will be an update
–> Processing Dependency: dhcp-common = 12:4.1.1-34.P1.0.1.el6 for package: 12:dhclient-4.1.1-34.P1.0.1.el6.x86_64
–> Running transaction check
—> Package dhcp-common.x86_64 12:4.1.1-34.P1.0.1.el6 will be installed
–> Finished Dependency Resolution

Dependencies Resolved

================================================================================================================================
Package Arch Version Repository Size
================================================================================================================================
Updating:
dhclient x86_64 12:4.1.1-34.P1.0.1.el6 ol6_latest 316 k
Installing for dependencies:
dhcp-common x86_64 12:4.1.1-34.P1.0.1.el6 ol6_latest 140 k

Transaction Summary
================================================================================================================================
Install 1 Package(s)
Upgrade 1 Package(s)

Total size: 456 k
Total download size: 316 k
Is this ok [y/N]: y
Downloading Packages:
dhclient-4.1.1-34.P1.0.1.el6.x86_64.rpm | 316 kB 00:04
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Installing : 12:dhcp-common-4.1.1-34.P1.0.1.el6.x86_64 1/3
Updating : 12:dhclient-4.1.1-34.P1.0.1.el6.x86_64 2/3
Cleanup : 12:dhclient-4.1.1-12.P1.el6.x86_64 3/3
Verifying : 12:dhcp-common-4.1.1-34.P1.0.1.el6.x86_64 1/3
Verifying : 12:dhclient-4.1.1-34.P1.0.1.el6.x86_64 2/3
Verifying : 12:dhclient-4.1.1-12.P1.el6.x86_64 3/3

Dependency Installed:
dhcp-common.x86_64 12:4.1.1-34.P1.0.1.el6

Updated:
dhclient.x86_64 12:4.1.1-34.P1.0.1.el6

Complete!

[root@oel6-server1 /]# yum install -y dhcp
Loaded plugins: refresh-packagekit, rhnplugin
This system is not registered with ULN.
ULN support will be disabled.
Setting up Install Process
Resolving Dependencies
–> Running transaction check
—> Package dhcp.x86_64 12:4.1.1-34.P1.0.1.el6 will be installed
–> Processing Dependency: portreserve for package: 12:dhcp-4.1.1-34.P1.0.1.el6.x86_64
–> Running transaction check
—> Package portreserve.x86_64 0:0.0.4-9.el6 will be installed
–> Finished Dependency Resolution

Dependencies Resolved

================================================================================================================================
Package Arch Version Repository Size
================================================================================================================================
Installing:
dhcp x86_64 12:4.1.1-34.P1.0.1.el6 ol6_latest 815 k
Installing for dependencies:
portreserve x86_64 0.0.4-9.el6 ol6_latest 22 k

Transaction Summary
================================================================================================================================
Install 2 Package(s)

Total size: 837 k
Installed size: 1.9 M
Downloading Packages:
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Installing : portreserve-0.0.4-9.el6.x86_64 1/2
Installing : 12:dhcp-4.1.1-34.P1.0.1.el6.x86_64 2/2
Verifying : portreserve-0.0.4-9.el6.x86_64 1/2
Verifying : 12:dhcp-4.1.1-34.P1.0.1.el6.x86_64 2/2

Installed:
dhcp.x86_64 12:4.1.1-34.P1.0.1.el6

Dependency Installed:
portreserve.x86_64 0:0.0.4-9.el6

Complete!
[root@oel6-server1 /]#