- Now with Oracle 11g R2.
- Install steps were fixed according to R2.
- Reference added to Creating a new Oracle 11g R2 Database on CentOS 6.2
- Reference added to Configuring a network listener for Oracle on CentOS 6.2
The former post I wrote was a how to install an Oracle-ready CentOS 6.2 Linux Server box.Its time then to install the Oracle 11g Database server. This post is about the same thing, but using a CentOS 5, so I based this how to on it and improve some minor things, but the whole idea is pretty much the same.
Hardware Requirements
To check out your recommended hardware requirements, login to the CentOS 6.2 Linux Server box as the bozz user and verify the below list:How much memory:
$ grep -i memtotal /proc/meminfo
results: should be at least 1GB
How much swap:
$ grep -i swaptotal /proc/meminfo
results:
- should be 1.5 the size of memtotal if memtotal < 2GB
- should be equal to memtotal if memtotal is between 2GB and 8GB
- should be .75 the size of memtotal if memtotal > 8GB
What processor type:
$ grep "model name" /proc/cpuinfo
results: informational
How much available RAM and swap:
$ free
results: informational
How much shared memory available:
$ df -k /dev/shm
results: informational
purpose: The shared memory should be sized to be at least the greater of MEMORY_MAX_TARGET and MEMORY_TARGET for each Oracle instance on the computer.
How much disk space in /tmp:
$ df -k /tmp
results: should have at least 400MB available
How much disk space for Oracle binaries:
$ df -k
results: Depending on installation type you should have between 1.5GB and 3.5GB
Software Requirements
To check out your recommended software requirements, login to the CentOS 6.2 Linux Server box as the bozz user and verify the below list:What distribution and version of Linux is installed:
results: Linux version 2.6.32-220.2.1.el6.x86_64 (mockbuild@c6-x8664-build.centos.org)$ cat /proc/version
(gcc version 4.4.6 20110731 (Red Hat 4.4.6-3) (GCC) )
#1 SMP Fri Dec 23 02:21:33 CST 2011
What version of the kernel is installed:
results: 2.6.32-220.2.1.el6.x86_64$ uname -r
Ensure that the following packages are installed:
if some of this packages are missing then install them$ rpm -q compat-libstdc++-33.x86_64 binutils elfutils-libelf elfutils-libelf-devel $ rpm -q glibc glibc-common glibc-devel glibc-headers gcc gcc-c++ libaio-devel $ rpm -q libaio libgcc libstdc++ libstdc++ make sysstat unixODBC unixODBC-devel
$ sudo yum install compat-libstdc++-33.x86_64 binutils elfutils-libelf elfutils-libelf-devel $ sudo yum install glibc glibc-common glibc-devel glibc-headers gcc gcc-c++ libaio-devel $ sudo yum install libaio libgcc libstdc++ libstdc++ make sysstat unixODBC unixODBC-devel
also install unzip package:
$ sudo yum install unzip
Install Steps
- Login in as bozz user
- Create Oracle's user and groups
- Create groups oinstall & dba:
- Create the oracle user and set its password:
- Check if nobody user exists, this user is almost always created on a base CentOS installation:
- Configure some kernel parameters. The following kernel parameters must be validated and possibly changed. Use the commands given below to view a particular kernel setting and then change it if the setting is lower than the recommendation given here. The changed parameters are in bold in my case.
- Verify kernel parameters:
- Make the changes permanent by editing the archive /etc/sysctl.conf file. This is given as an example only and does not reflect the results obtained above by the sysctl commands. Only add lines that are needed and do not change any values to be lower than the base installation might have assigned. In my case I only change the following settings on /etc/sysctl.conf:
- Apply the changes now:
- Setting shell limits for the oracle user
- Edit the file /etc/security/limits.conf:
- Edit /etc/pam.d/login:
- Create a new profile archive at /etc/profile.d/custom.sh:
- Creating necessary directories to install the Oracle Software
- Check if you have enough space on disk and choose a directory to install:
- Create subdirectories and give permissions to the oracle user:
- Logout, login as oracle user (don't forget ssh -Y oracle@SERVER) and set the environment for the installation by adding the following to ~/.bash_profile: :
- Ensure oracle user is using an X Windows System. For example you can install and execute xterm:
- Start the database installer (you should be able to see a X11 Windows with the Oracle database installation wizard on your client Desktop environment):
$ cd /tmp/database $ ./runInstaller
NOTE: I assume you already had the database installer on the server. If not then copy the installer archives to the server via scp and uncompress them:
- Optionally specify email address to be informed about security issues
- Choose "Install database software only", click "Next"
- Choose "Single instance database installation", click "Next"
- Add another language besides of English if you wish, click "Next"
- Choose 'Enterprise Edition' and on "Select options" choose the components you wish to install, click "Next"
- Set the following settings and click "Next":
- verify Oracle Base: '/opt/app/oracle'
- verify Oracle Home: '/opt/app/oracle/product/11.2.0/db_1'
- Verify path of inventory directory: '/opt/app/oraInventory' and verify group name for install of 'oinstall', click "Next"
- Prerequisite Checks: the installer will verify the system environment and report on any issues it may find. If all goes well you will get the status of 'Succeeded' for every check. You have to check 'Ignore All' but ensure at least that the following checks pass:
- Physical memory (also Available)
- Free space
- User and groups existence
- Group membership
- Hard and soft limits
- Architecture
- Kernel version
- OS Kernel parameters
- Swap size
- Run level.
- Packages
- Users with same ID
- Summary: This screen give a summary of the installation you are about to perform. Click and expand the products being installed to give you an idea of the what product and version is going to be installed.
- validate 'Global Settings' for directories
- validate 'Space Requirements'
- Click NEXT
- Install: This screen gives a status of what is being installed. If all system settings have been properly set and all packages been installed properly then this should proceed without error.
- Note the time it takes for specific products. If you notice one hanging or taking a long amount of time (greater than 10 minutes) you could have a condition that requires a pre-installation patch. Don't stop the installer yet but instead start looking for a bug / patch for the Oracle 11g installation process and the actual product being installed.
- Execute configuration scripts, when the wizard ask it:
- open up a different terminal window
- login as the bozz user
- run:
- click OK
$ sudo /opt/app/oraInventory/orainstRoot.sh $ sudo /opt/app/oracle/product/11.2.0/db_1/root.sh
- Cleanup: If you downloaded the software from the net you can now remove .zip file and the complete directory structure you unzipped it to.
- Final setup: Add the following lines to oracle's $HOME/.bash_profile archive. This will allow you to execute various Oracle binaries to create databases, configure network settings, and generally manage the Oracle database environment:
$ sudo groupadd oinstall $ sudo groupadd dba
$ sudo useradd -m -g oinstall -G dba -s /bin/bash oracle $ sudo passwd oracle
if this user doesn't exists then use the following command to create it:$ id nobody uid=99(nobody) gid=99(nobody) groups=99(nobody)
$ sudo useradd nobody
# semaphores: semmsl, semmns, semopm, semmni $ sysctl -a | grep kernel.sem results should be >= than: kernel.sem = 250 32000 100 128 $ sysctl -a | grep kernel.shm results should be >= than: kernel.shmmax = 536870912 kernel.shmmni = 4096 kernel.shmall = 2097152 $ sysctl -a | grep file-max results should be >= than: fs.file-max = 6815744 $ sysctl -a | grep ip_local_port_range results should be >= than: net.ipv4.ip_local_port_range = 9000 65500 $ sysctl -a | grep rmem_default results should be >= than: net.core.rmem_default = 262144 $ sysctl -a | grep rmem_max results should be >= than: net.core.rmem_max = 4194304 $ sysctl -a | grep wmem_default results should be >= than: net.core.wmem_default = 262144 $ sysctl -a | grep wmem_max results should be >= than: net.core.wmem_max = 1048576 $ sysctl -a | grep aio-max-nr results should be >= than: fs.aio-max-nr = 1048576
kernel.sem = 250 32000 100 128 fs.file-max = 6815744 net.ipv4.ip_local_port_range = 9000 65500 net.core.rmem_default = 262144 net.core.rmem_max = 4194304 net.core.wmem_default = 262144 net.core.wmem_max = 1048576 fs.aio-max-nr = 1048576
$ sudo sysctl -p
and add the following:$ sudo nano /etc/security/limits.conf
oracle soft nproc 2047 oracle hard nproc 16384 oracle soft nofile 1024 oracle hard nofile 65536
and add the following depending on the architecture:$ sudo nano /etc/pam.d/login
NOTE: be aware of the real location of pam_limits.so. It depens on the architecture and distro. On CentOS 6.2 64 bits /lib64/security/pam_limits.sosession required /lib64/security/pam_limits.so session required pam_limits.so
and add the following content:$ sudo nano /etc/profile.d/custom.sh
then add execution permissions to profile script:#!/bin/bash if [ $USER = "oracle" ]; then if [ $SHELL = "/bin/ksh" ]; then ulimit -p 16384 ulimit -n 65536 else ulimit -u 16384 -n 65536 fi fi
$ sudo chmod +x /etc/profile.d/custom.sh
$ df -kh
$ sudo mkdir -p /opt/app/oracle/product/11.2.0 $ sudo chown -R oracle:oinstall /opt/app $ sudo chmod -R 775 /opt/app
add the following line:$ nano ~/.bash_profile
exit nano (Ctrl+X) and execute oracle's .bash_profile for testing purposes:umask 022 export TMPDIR=$TMP export ORACLE_BASE=/opt/app/oracle export ORACLE_HOME=$ORACLE_BASE/product/11.2.0/db_1 export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib export PATH=$ORACLE_HOME/bin:$PATH
logout from oracle user:$ source ~/.bash_profile
$ exit
logout and login remotely again as oracle user from a Linux client machine with Desktop environment:$ sudo yum install xterm
test if xterm works you should be able to see a X11 Windows on your client Desktop environment, if not then enable SSH X11 Forwarding (see last step)$ ssh -Y oracle@SERVER
$ xterm
on the client run:
on the server run:$ scp linux.x64_11gR2_database_1of2.zip oracle@SERVER:/tmp $ scp linux.x64_11gR2_database_2of2.zip oracle@SERVER:/tmp
$ pushd /tmp $ unzip linux.x64_11gR2_database_1of2.zip $ unzip linux.x64_11gR2_database_2of2.zip $ popd
NOTE: remember to first login as oracle user to edit the $HOME/.bash_profile archive. Finally ensure the execution permissions for this archive.umask 022 export TMPDIR=/tmp export ORACLE_BASE=/opt/app/oracle export ORACLE_HOME=$ORACLE_BASE/product/11.2.0/db_1 export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib export PATH=$ORACLE_HOME/bin:$PATH
Post Install
- Configure a network listener for Oracle Database on CentOS 6.2
- Creating a new Oracle 11g R2 Database on CentOS 6.2
- Create a init script to make Oracle database start automatically on system booting
Hey, thanks for this very informative step-by-step post. It was really handy. I ran through the install in CentOS 6.2 on a VirtualBox VM. I ran into a couple of minor issues that might help other folks:
ReplyDeleteI went and installed all of the packages listed in the Oracle Quick Install guide and in this post. I was able to install compat-libstdc++-33.x86_64. However, there is no package called just compat-libstdc++. This one failed. And during the Installer's prerequisite checks, it failed to fing some of the packages. Since I knew I had installed some version (perhaps not the specific version number that Oracle was looking for) I went ahead and ignored all of these, and proceeded withe the install. Everything worked ok. Also, adding the line:
export TMPDIR=$TMP
to oracle's .bash_profile caused the GUI login to fail every time. This was because there was no environment variable set for $TMP. Once I changed that to TMPDIR=/tmp, everything started working again.
Anyway, hopefully that helps others. And thanks again for your post!
Thanks!, I fixed it according to your suggestions.
DeleteSpot on! Took me ages to find this out for myself, I then thought I would check this post to see if someone else had seen this before. Adding specifics for google searchability
Delete/usr/libexec/gconf-sanity-check-2 exited with status 256
This is caused by TMPDIR being set incorrectly to $TMP (assuming $TMP has not been set.
This guide worked great for centos 6.3 64 bit, but also needed the i386 equivalent packages of some of the ones you listed(named i686 on rhel/centos 6+). The checks still don't pass due to the new naming, but at least I know they were there after installing them.
ReplyDeleteHere are the packages:
libaio.i686
libaio-devel.i686
compat-libstdc++.i686
libgcc.i686
unixODBC
unixODBC-devel
unixODBC.i686
unixODBC-devel.i686
ksh
mksh
On my Centos 6.3 install this this translated. As you say the names still won't match, but at least you know there are there
Deletesudo yum install libaio.i686
sudo yum install libaio-devel.i686
sudo yum install compat-libstdc++-33.i686
sudo yum install libgcc.i686
sudo yum install unixODBC.i686
sudo yum install unixODBC-devel.i686
sudo yum install unixODBC
sudo yum install unixODBC-devel.x86_64
sudo yum install ksh.x86_64
sudo yum install mksh.x86_64
sudo yum install mksh.x86_64
Thanks for your post. It helped me al lot. I get an Error on running the /etc/profile.d/custom.sh script. I changed it to make it work properly.
ReplyDeleteif [ $USER == "oracle" ]; then
if [ $SHELL == "/bin/ksh" ]; then
ulimit -p 16384
ulimit -n 65536
else
ulimit -u 16384 -n 65536
fi
fi
Hi guys. I am running into a problem while running runInstaller:
ReplyDeleteChecking Temp space: must be greater than 80 MB. Actual 8111 MB Passed
Checking swap space: must be greater than 150 MB. Actual 2015 MB Passed
Checking monitor: must be configured to display at least 256 colors. Actual 16777216 Passed
Preparing to launch Oracle Universal Installer from /tmp/OraInstall2012-11-03_06-41-36AM. Please wait ...[oracle@localhost database]$ Exception in thread "main" java.lang.UnsatisfiedLinkError: /tmp/OraInstall2012-11-03_06-41-36AM/jdk/jre/lib/i386/xawt/libmawt.so: libXext.so.6: cannot open shared object file: No such file or directory
I do see the file there:
/tmp/OraInstall2012-11-03_06-41-36AM/jdk/jre/lib/i386/xawt/libmawt.so
/tmp/OraInstall2012-11-03_06-41-36AM/jdk/jre/lib/i386/motif21/libmawt.so
/tmp/OraInstall2012-11-03_06-41-36AM/jdk/jre/lib/i386/headless/libmawt.so
I've installed the packages indicated above. On googling that error I see it might have to do with the LD_LIBRARY_PATH being set.
Any ideas of what I am doing wrong here?
Thanks
J.
Hello, could you please advise me how to make xclock working for oracle user?
ReplyDeleteI did everything you have mentioned in "enable SSH X11 forwarding", but i cant start xclock:/
xclock is working with root or my user
under oracle user i have this error :
No protocol specified
Error : Can`t open display: :0.0
I can not start ./runInstaller with user oracle because of xterm not working :/
Hey Michal ,
Deletedid u find solution to your problem?
as i m also getting this problem
thanks
of note, we could not execute .runInstaller (error was permission denied at line 157 on the /tmp/database/install/.oui file)
ReplyDeleteran 'chmod -R a+x /tmp/database/install' (whatever your install path is obviously) per this CKPT's comment on this forum post:
https://forums.oracle.com/forums/thread.jspa?threadID=1102139
and that seemed to work.
(also, thanks to Rob Vanstone for the google search 411 on that gconf-sanity-check error! totally found it via google...)
Hi all ,
ReplyDeleteNeed urgent help.
i m installing oracle 11g 32 bit s/w on mine centos system.
but while installing i m getting this error.
Xlib: connection to ":0.0" refused by server
Xlib: No protocol specified
while checking i found oracle user can not start xterm s/w but same is running fine by root user.
please let me know how xterm can be used by oracle user ...what and where configuration needs to be done....please help
thanks
akash
I need ur helps in my host PC windows 7 64 bit and 4 GB RAM in that I have installed vm ware workstations on Cent Os in that OS how can i install oracle11g linux x-64 while am trying to install get some error like operating system not found. whether Cent OS will be support Oracle linux 11g or not...
ReplyDelete--
Thanks & Regards
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Karthick Chinnaraj
Mobile : (TN) - 09629108283 / (KA) - 09035810969
Skype : karthickchinnaraj / Linkedin : www.linkedin.com / Facebook : www.facebook.com
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------
This comment has been removed by the author.
ReplyDeleteThe following line in the oracle user's ~/.bash_profile breaks GNOME/xterm sessions:
ReplyDeleteexport TMPDIR=$TMP
The TMPDIR variable should not be redefined. Apparently GNOME session's "sanity check" has a problem with that setting: "/usr/libexec/gconf-sanity-check-2 exited with status 256"
excellent description; install everything ok.
ReplyDeleteThanks & Regards
can i follow the same steps to install oracle 11g on ubuntu 12.04 lts 64bits???
ReplyDeleteany help please!!!!!!??
Yes, you can, but there may be some missing libraries on ubuntu, at least named differently. If you happen to find out how to, please publish it! I tried on past Ubuntu versions using the same steps above w/o success. Nevertheless you can try again!. Let me know your result.
DeleteThanks for the feedback!
Thanks for sharing the information
ReplyDeleteOcp Certification in Noida
Is there any further reading you would recommend on this?
ReplyDeleteLDS Infotech
Oracle Partners India
Thank for your sharing good blog comment.
ReplyDeleteหนังออนไลน์
thank you for the great information. You are awesome
ReplyDeleteUFABET
Gclub
ทางเข้า Gclub
ทางเข้า UFABET
เลเซอร์หน้าใส เป็นอีกหนึ่งของใหม่ทางความสวยสดงดงามที่ช่วยฟื้นฟูผิวหนังที่แห้งหยาบ บริเวณใบหน้าหมองคล้ำให้กลับมาผ่องใสมองกระปรี้กระเปร่า ผ่องแผ้วภายในช่วงเวลาอันเร็วทันใจ นับว่าเป็นทางลัดความสวยสดงดงามที่กำลังเป็นที่นิยมสูง ช่วยปรนนิบัติวัตถากผิวให้ขาวกระจ่างขาวสวยใส จากการลดลางเลือนริ้วรอยจุดด่างดำได้อย่างมีคุณภาพ
ReplyDeleteเลเซอร์หน้าใส
เลเซอร์ลดริ้วรอย
เลเซอร์รอยสิว
Great Article… I love to read your articles because your writing style is too good, its is very very helpful for all of us and I never get bored while reading your article because, they are becomes a more and more interesting from the starting lines until the end.
ReplyDeleterpa training in bangalore
best rpa training in bangalore
RPA training in bangalore
RPA courses in bangalore
This is an awesome post.Really very informative and creative contents. These concept is a good way to enhance the knowledge.
ReplyDeleteI like it and help me to development very well.Thank you for this brief explanation and very nice information.Well, got a good knowledge.
Java training in Chennai
Java training in Bangalore
Java online training
Java training in Pune
We are a group of volunteers and starting a new initiative in a community. Your blog provided us valuable information to work on.You have done a marvellous job!
ReplyDeleteonline Python training
python training in chennai
Hmm, it seems like your site ate my first comment (it was extremely long) so I guess I’ll just sum it up what I had written and say, I’m thoroughly enjoying your blog. I as well as an aspiring blog writer, but I’m still new to the whole thing. Do you have any recommendations for newbie blog writers? I’d appreciate it.
ReplyDeleteAWS Training in Bangalore with Placements | AWS Training in Bangalore Cost
AWS Training in Pune With Placement | AWS Devops Training in Pune
AWS Online Training | AWS Online Training Cost
AWS Training in Bangalore cost| Aws training in Bangalore Besant Technologies
I read this post two times, I like it so much, please try to keep posting & Let me introduce other material that may be good for our community.
ReplyDeleteAWS Training in Bangalore
Excellent post. Thanks for sharing
ReplyDeleteสนใจ สมัคร บาคาร่า โบนัส 50% ฟรี
ReplyDeleteเคดิตฟรี สมัคร สล็อต รับ 300 เคดิตฟรี
ReplyDeleteThis post is really nice and informative. The explanation given is really comprehensive and useful.
ReplyDeleteamazon web services tutorial
aws training in bangalore marathahalli
ReplyDeleteThis is most informative and also this post most user friendly and super navigation to all posts. Thank you so much for giving this information to me. AWS training in Chennai.
Java training in chennai | Java training in annanagar | Java training in omr | Java training in porur | Java training in tambaram | Java training in velachery
ReplyDeleteVery Helpful Articles. แทงมวยสากล It might help you. แทงมวยสากล Thanks For Sharing
แทงมวยสากล Thank you very much.
It was wonderfull reading your article. Great writing styleIamLinkfeeder IamLinkfeeder IamLinkfeeder IamLinkfeeder IamLinkfeeder IamLinkfeeder IamLinkfeeder IamLinkfeeder IamLinkfeeder
ReplyDeleteWe are used to the fact that we know only religious and public holidays and celebrate only them.Iamlinkfeeder Iamlinkfeeder Iamlinkfeeder Iamlinkfeeder Iamlinkfeeder Iamlinkfeeder Iamlinkfeeder Iamlinkfeeder Iamlinkfeeder
ReplyDelete
ReplyDeleteDataDukan pride ourselves in delivering a full spectrum of IT solutions and services, helping you make the shift to the next-level of digital experiences.
Best IT Solutions Companies in Mumbai specialize in transformative strategic consulting and offer domain centric solutions in
the areas of data management, business intelligence, visualization, predictive & prescriptive analytics and artificial intelligence.It offers services to the companies from
varied sectors including financial services, cable and telecommunications, retail, fashion, media & entertainment and more.The company believes in offering top-quality services
in a completely transparent and ethical way.
ataşehir bosch klima servisi
ReplyDeletependik samsung klima servisi
pendik mitsubishi klima servisi
tuzla vestel klima servisi
tuzla bosch klima servisi
tuzla arçelik klima servisi
çekmeköy samsung klima servisi
ataşehir samsung klima servisi
çekmeköy mitsubishi klima servisi