Read more...
Since I had to face some complications, I decided to blog a little "DONOTFORGET", so I'll manage to get it done more quickly the next time.
Important: Make sure, your machine has enough memory for installation!!! I chose to assign 1.5G.
Maybe of interest: If you sendmail service takes ages at startup, you should give your machine a full-qualified-name (including a domain). In /etc/hosts you can define aliases like 192.168.200.140 centos54 centos54.localdomain localhost localhost.localdomain
Let’s start…First off (after setting up an empty CentOS VM; we’ll skip this, since it isn’t too difficult) we probably want to install VMware Tools, so let's start with
Preparing for VMWARE TOOLS
I chose to install VMware Tools because I never installed it on Linux (plus I wanted to see if drag’n’dropping files also works for Linux). From installing VMware tools on Windows, we know that we simply have to select "Install VMware Tools" from menu, but in Linux, this isn't enough.
First off, we have to prepare the installation by installing required software packages (gcc and C-headerfiles) by yum install kernel-devel gcc.
I - later on - had problems with the headerfiles version. They were of a xen-version, so I had to yum install kernel and yum remove xen kernel-xen. This helped me a lot so many, many thanks go out to Zack Williams. (Note: I also tried to only yum install kernel, but this didn't work anyway...)
To make the installation a bit easier, we softlink our header files by ln –s /usr/src/kernels/[version] /usr/src/linux. You can find out your header version by executing uname -r.
We’re done with preparing the VMware Tools-Installation.
Reboot your machine and – when up again - choose "Install VMware Tools" from Menu. Either choose the graphical way and click around for joy or mount /dev/cdrom /mnt/.
Then tar -C /tmp -zxvf /mnt/VMwareTools-[version].tar.gz and umount /mnt. You’ll find a vmwave-install.pl in your /tmp/vmware-tools-distrib.
Run it by ./vmware-install.pl and follow the installation by answering with default values.
Reboot again and you’re through (a little configuration utility will show before reboot).
Preparing for ORACLE 11G
IMPORTANT: Oracle has a quick installation guide here. You can and really should follow the guide, but you really should read carefully. Here, you'll only find what I did.
Again, we have to prepare the installation and add some packages by following statement (you might already have installed some of those, but these are the required packages according to the Quick Install Guide):
yum install binutils compat-libstdc++ elfutils-libelf elfutils-libelf-devel glibc glibc-common glibc-devel glibc-headers gcc gcc-c++ libaio libaio-devel libgcc libstdc++ libstdc++-devel make numactl-devel sysstat unixODBC-2.2.11 unixODBC-devel-2.2.11
You can also install them one by one - I noticed network problems with my VM when firing the whole command. To be safe, I chose to reboot after installing those packages.
Afterwards, we can create the necessary users and groups (assume, none of the groups or users exist):
- /usr/sbin/groupadd oinstall
- /usr/sbin/groupadd dba
- /usr/sbin/useradd -g oinstall -G dba oracle
- passwd oracle
Edit your /etc/sysctl.conf and edit/add following values (IMPORTANT: There are mistakes with the net.ipv4.ip_local_port_range and the net.core.rmem_default in Oracle’s Quick Install Guide!!!)
- fs.file-max = 6815744
- kernel.shmall = 2097152
- kernel.shmmax = 2147483648
- kernel.shmmni = 4096
- kernel.sem = 250 32000 100 128
- net.ipv4.ip_local_port_range = 1024 65000 #IMPORTANT: these are the correct values!!!
- net.core.rmem_default = 4194304 #IMPORTANT: this is the correct value!!!
- net.core.rmem_max = 4194304
- net.core.wmem_default = 262144
- net.core.wmem_max = 1048576
Edit your /etc/security/limits.conf and add
- oracle soft nproc 2047
- oracle hard nproc 16384
- oracle soft nofile 1024
- oracle hard nofile 65536
- session required pam_limits.so
- if [ $USER = "oracle" ]; then
- if [ $SHELL = "/bin/ksh" ]; then
- ulimit -p 16384
- ulimit -n 65536
- else
- ulimit -u 16384 -n 65536
- fi
- fi
- mkdir -p /data/oracle
- chown -R oracle:oinstall /data/oracle
- chmod -R 775 /data/oracle
- dd if=/dev/zero of=/swapfile1 bs=1024 count=524288
- mkswap /swapfile1
- swapon /swapfile1
To verify what you did, type free -m. I found this helpful, so thanks go out to Vivek Gite.
To be safe, and due to me installing not using PuTTY and X11-Forwarding (explanation later on), let's xhost +localhost before su - oracle and the execution of the user's startup-scripts by . ./.bash_profile.
If you use PuTTY and X11-Forwarding you probably have to set up your $DISPLAY. In any case, you have to set some environment variables for your installation-process. I recommend to either use screen to resume your session or install via the machine and startx, since an aborted installation due to a SSH-crash in PuTTY will lead to re-installing Oracle from the very beginning (I know what I'm talking about...).
- TMP=/tmp
- TMPDIR=/tmp
- ORACLE_BASE=/data/oracle/app/oracle
- ORACLE_SID=dctm
- export TMP TMPDIR ORACLE_BASE ORACLE_SID
With all these steps, Oracle Universal Installer only nagged about the network-configuration (I need to have eth0 via DHCP).
So, "just" complete the Setup-Procedure and you’re done.
Afterwards
After the installation completed, I added some more environment variables to ~./bash_profile:
- ORACLE_BASE=/data/oracle
- ORACLE_HOME=$ORACLE_BASE/app/oracle/product/11.1.0/db_1/
- ORACLE_SID=dctm
- export ORACLE_BASE ORACLE_HOME ORACLE_SID
If you want your Database to startup automatically, you'll have to walk some extra steps. First off, you should edit your bootloader and add enforcing=0 as a kernel paramter.
Then edit your /etc/oratab and change it to 'Y'
- orcl:/data/oracle/app/oracle/product/11.1.0/db_1:Y
- #!/bin/sh
- touch /home/oracle/dbora_ran_$1
- # chkconfig: 345 99 10
- # description: Oracle auto start-stop script.
- #
- # Set ORACLE_HOME to be equivalent to the $ORACLE_HOME
- # from which you wish to execute dbstart and dbshut;
- #
- # Set ORA_OWNER to the user id of the owner of the
- # Oracle database in ORACLE_HOME.
- #source /usr/local/bin/locvars
- ORA_OWNER=oracle
- ORACLE_HOME=/data/oracle/app/oracle/product/11.1.0/db_1
- if [ ! -f $ORACLE_HOME/bin/dbstart ]
- then
- echo "Oracle startup: cannot start"
- exit
- fi
- case "$1" in
- 'start')
- # Start the Oracle databases:
- # The following command assumes that the oracle login
- # will not prompt the user for any values
- su - $ORA_OWNER -c "$ORACLE_HOME/bin/dbstart $ORACLE_HOME"
- echo su - $ORA_OWNER -c '$ORACLE_HOME/bin/dbstart $ORACLE_HOME'
- ;;
- 'stop')
- # Stop the Oracle databases:
- # The following command assumes that the oracle login
- # will not prompt the user for any values
- su - $ORA_OWNER -c "$ORACLE_HOME/bin/dbshut $ORACLE_HOME"
- echo su - $ORA_OWNER -c '$ORACLE_HOME/bin/dbshut $ORACLE_HOME'
- ;;
- esac

