A collection of guides, practices, and recipes…

This is a step by step guide for creating a new Oracle 11gr2 server using Oracle Enterprise Linux 6.4 in an attended install. This guide includes joining the server to an established windows active directory domain.

Step 1.

Download the install software from the oracle cloud delivery system.


Step 2.

Start up the server with the DVD in place. I always run the provided media test since I don’t like surprises.

Step 3.

Work your way through the screens using the appropriate language and keyboard choices, accepting the default values. This guide assumes basic storage, and addressing all the possible storage scenarios is outside of the scope of this guide.

Step 4.

  • Enter a fully qualified host name.  If you do not have an established domain to join, use [machine].localdomain
  • Click Configure Network
  • Select the network connection you will be using for this server, and chose “Edit”
  • If you are not using DHCP, click on the IPv4 Settings tab and change the Method Drop down to ‘Manual’, then click ‘Add’ to provide the relevant information. Once complete, click apply, then close.

Step 5.

Select the appropriate Time zone

Step 6.

Select ‘Use All Space’, and then check ‘Review and modify partitioning layout’

  • Follow these guidelines for setting your swap size:
RAM Swap Space
Between 1 GB and 2 GB 1.5 times the size of the RAM
Between 2 GB and 16 GB Equal to the size of the RAM
More than 16 GB 16 GB
  • Write Changes to disk

Step 7.

Confirm your selections for partitions. If in doubt, go with ext4 file system.  Keep in mind that if you are planning to use ASM, you need to leave those devices as raw volumes.

Step 8.

Chose Basic Server, and select the Customize Now option

Step 9.

For a gnome desktop, select the following options:

  • Desktops
    • Desktop
    • Desktop Platform
    • Fonts
    • General Purpose Desktop
    • Graphical Administration Tools
    • X Windows System

Click Next

Step 10.

After the machine reboots, chose to connect later for updates and ULN registration.

Step 11.

Create non-admin user.

Step 12.

Log in with Non-admin user.

Step 13.

Disable SELinux and firewall

  • su to root
  • vi /etc/selinux/config
  • Set SELINUX = disabled
  • service ipchains stop
  • service iptables stop
  • chkconfig ipchains off
  • chkconfig iptables off
  • reboot server

Step 14.

Install VNC Server

yum install tigervnc*

Edit vncservers file:
# vi /etc/sysconfig/vncservers

Uncomment the two lines below and edit it with your own username:

VNCSERVERS=”2:myusername”VNCSERVERARGS[2]=”-geometry 800×600 -nolisten tcp -nohttpd -localhost”

Set the password for vncserver user:

# vncpasswd
Password: myvncpassword
Verify: myvncpassword

Start the VNCServer:

# service vncserver start

Step 15.

Set up authentication to join windows domain using winbind. The GUI tool will catch most of this, but sometimes you’ll need to double check the config files if you fail to join the domain.

net ads join –U username

in /etc/krb5.conf:

default_realm = EXAMPLE.COM
dns_lookup_realm = true
dns_lookup_kdc = true
ticket_lifetime = 24h
renew_lifetime = 7d
forwardable = yes

default_domain = example.com

.example.com = EXAMPLE.COM
example.com = EXAMPLE.COM

in /etc/samba/smb.conf:

workgroup = example
security = ads
idmap uid = 10000-500000
idmap gid = 10000-500000
template shell = /bin/bash
winbind use default domain = true
winbind offline logon = false
winbind nested groups = yes
encrypt passwords = yes

Test your ad connection. As root:

chkconfig winbind on     --starts winbind on reboot
service winbind start      
wbinfo -g      --polls the DC for domain groups

Step 16.

Set up NTFS drivers:

  • determine kernel:
    uname -m
  • go get the proper repositores and install

Oracle Enterprise Linux 4.x x86:

# wget http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.2-2.el4.rf.i386.rpm
# rpm -Uvh rpmforge-release-0.5.2-2.el4.rf.i386.rpm

Oracle Enterprise Linux 4.x x86_64:

# wget http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.2-2.el4.rf.x86_64.rpm
# rpm -Uvh rpmforge-release-0.5.2-2.el4.rf.x86_64.rpm

Oracle Enterprise Linux / Oracle Linux 5.x x86:

# wget http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.2-2.el5.rf.i386.rpm
# rpm -Uvh rpmforge-release-0.5.2-2.el5.rf.i386.rpm

Oracle Enterprise Linux / Oracle Linux 5.x x86_64:

# wget http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.2-2.el5.rf.x86_64.rpm
# rpm -Uvh rpmforge-release-0.5.2-2.el5.rf.x86_64.rpm

Oracle Linux 6.x x86:

# wget http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.2-2.el6.rf.i686.rpm
# rpm -Uvh rpmforge-release-0.5.2-2.el6.rf.i686.rpm

Oracle Linux 6.x x86_64:

# wget http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.2-2.el6.rf.x86_64.rpm
# rpm -Uvh rpmforge-release-0.5.2-2.el6.rf.x86_64.rpm

Install the NTFS driver:

Oracle Enterprise Linux 4.x:

# yum install dkms dkms-fuse fuse fuse-ntfs-3g 

Oracle Enterprise Linux / Oracle Linux 5.0 – 5.2:

# yum install dkms dkms-fuse fuse fuse-ntfs-3g 

Oracle Enterprise Linux / Oracle Linux 5.3:

NTFS support under Oracle Enterprise Linux 5.3 is broken and you should consider to upgrade to the 5.4 or later. (https://bugzilla.redhat.com/show_bug.cgi?id=481495)

Oracle Enterprise Linux / Oracle Linux 5.4 – 5.x:

As of Oracle Enterprise Linux 5.4 the the kernel fuse module (dkms, dkms-fuse) is included in the kernel and should not be installed.

# yum install fuse fuse-ntfs-3g 

Oracle Enterprise Linux / Oracle Linux 6.x:

# yum install fuse fuse-ntfs-3g

From this point on, you will be able to attach to network shares, mount usb drives with the ntfs file system, and use your AD user groups for administration. Our next steps are to create the local users and groups needed for DBA work.

Step 1.

# cd /etc/yum.repos.d
# wget http://public-yum.oracle.com/public-yum-ol6.repo
# yum install oracle-rdbms-server-11gR2-preinstall
# yum update

Step 2.

create dba user groups:

groupadd -g 501 oinstall
groupadd -g 502 dba
groupadd -g 503 oper
groupadd -g 504 asmadmin
groupadd -g 506 asmdba
groupadd -g 505 asmoper

Step 3.

Change password for user oracle

Step 4.

reboot the server

Step 5.

Login with user oracle.  Set up /home/oracle/.bash_profile with oracle specific settings:

# Oracle Settings
TMP=/tmp; export TMP

ORACLE_HOSTNAME=pit-qa11gr2-2.confluence.com; export ORACLE_HOSTNAME
#ORACLE_UNQNAME=DB11G; export ORACLE_UNQNAME –set if you always have the same starting db
ORACLE_BASE=/u01/app/oracle; export ORACLE_BASE
ORACLE_HOME=$ORACLE_BASE/product/11.2.0/db_1; export ORACLE_HOME
#ORACLE_SID=DB11G; export ORACLE_SID –Set if you have the same starting db every time

PATH=/usr/sbin:$PATH; export PATH


Step 6.

Log out, and log back in with oracle to ensure your .bash_profile is working

Your server is now ready for database instillation.