歡迎您光臨本站 註冊首頁

Install Oracle(Two) - Oracle11g on Ubuntu Linux 8

←手機掃碼閱讀     火星人 @ 2014-03-09 , reply:0
I take this chapter from internet and install Oracle 11g in Ubuntu Linux 8.
One little issue is that Ubuntu is unsupported by Oracle. So, through this text, we will trick the Oracle installer into thinking it』s actually running on a Red Hat box.

Step Zero

This tutorial was based on a document which can be found here . I have adapted it for Oracle 11g.
Get a copy of Ubuntu 8 and install on a machine. I』m using the 32-bit version here (as well as for Oracle). Next, make sure your system is up-to-date. A simple apt-get update followed by a apt-get upgrade will do the trick, although you may prefer using the GUI Synaptic Package Manager — it』s entirely up to you what method you choose. However, I much prefer to use the command line.
As you go through updates, sometimes a reboot will be needed (usually to boot from a newer, recently-updated kernel). Sometimes it』ll just ask you to restart your web browser or some other program as a new version is installed.
It』s important to have a few gigabytes of free disk space and a total of 1 GB of memory before starting this. This 1 GB of memory can be RAM alone or the combination of RAM and swap space. Of course, since everything runs faster when in RAM, the more of it, the better.
Very important: get Java running before trying to move on. My guess is that almost any JRE (java runtime) or JDK (java development kit) will work. I』m not sure which is the minimum version required: I used Sun JDK 1.5.

Step One

Install some system requirements. There are a few packages that I had to install on this box (it was a recently installed system which didn』t have all these packages). After several attempts of installing Oracle, the equivalent command-line for installing all the necessary packages at once was something like this:

# sudo useradd -g oinstall -G dba -p password -d /home/oracle -s /bin/bash -m oracle # sudo usermod -g nobody nobody
The usermod command is needed since because when running, the installer looks for a user called nobody which is part of a group named nobody (in Ubuntu, the user nobody it』s assigned to nogroup by default).

Step Four

Make some symlinks. Apparently, the installer uses absolute paths, so it must find the binaries in the right places.
# sudo ln -s /usr/bin/awk /bin/awk   #sudo  ln -s /usr/bin/rpm /bin/rpm   # sudo ln -s /usr/bin/basename /bin/basename   

Step Five

We need to mimic the /etc/rc.d directory structure of a Red Hat box. We do this with more symlinks:
#sudo mkdir /etc/rc.d   #sudo  ln -s /etc/rc0.d /etc/rc.d/rc0.d   #sudo ln -s /etc/rc1.d /etc/rc.d/rc1.d   #sudo  ln -s /etc/rc2.d /etc/rc.d/rc2.d   #sudo  ln -s /etc/rc3.d /etc/rc.d/rc3.d   #sudo  ln -s /etc/rc4.d /etc/rc.d/rc4.d   #sudo  ln -s /etc/rc5.d /etc/rc.d/rc5.d   #sudo  ln -s /etc/rc6.d /etc/rc.d/rc6.d   #sudo  ln -s /etc/init.d /etc/rc.d/init.d   

Step Six

I』ve created a file called /etc/redhat-release and put only one line on it. The same can be achieved by issuing the following as root:
echo "Red Hat Linux release 4" > /etc/redhat-release   
Note:
1.It doesn't work. Please do it in another way.
(1) sudo vi /etc/redhat-release
(2) Input Red Hat Linux release 4"

Step Seven

We tweak the system default limits on a few items. The shared-memory are specially important, since Oracle relies on shared memory for process communications. There is a file called

/etc/sysctl.conf and it should have these lines on it:
To check your current semaphores configuration, you can run cat /proc/sys/kernel/sem or ipcs -ls . On my machine, after the modifications on sysctl.conf , these commands output:
# cat /proc/sys/kernel/sem   250     32000   100     128   # ipcs -ls   ------ Semaphore Limits --------   max number of arrays = 128   max semaphores per array = 250   max semaphores system wide = 32000   max ops per semop call = 100   semaphore max value = 32767   
(I really don』t know if these are enough or too much, but I』ll keep you posted.)
For a better understanding of these kernel-tweaking settings, I』d recommend these resources:
  • schogini.us/wordpress/index.php/2005/11/01/setting-semaphores/
  • performancewiki.com/linux-tuning.html
  • pythian.com/blogs/245/the-mysterious-world-of-shmmax-and-shmall

Step Eight

Add these lines to /etc/security/limits.conf , letting the oracle user use more resources than the defaults allowed. You may notice that all these values are a power of 2 minus one. When soft limits are exceeded, you』ll get a warning; the hard limits can』t be exceeded in any situation: you』ll get an error. I』m not completely sure, but I think these limits apply to each session/login (and since Oracle doesn』t exactly log in to the machine, my best guess is these limits apply per instance running).
oracle soft nproc 2047   oracle hard nproc 16383   oracle soft nofile 1023   oracle hard nofile 65535   

Step Nine

Make sure the limits.conf is being interpreted as the oracle user logs in by adding these lines to /etc/pam.d/login . You will want to make sure that is actually happening, since the defaults are way lower and you may get all sorts of problems.

There are a few errors that can be safely ignored: the ulimit and the RPM-related errors, since the limits don』t restrict the installer and since we actually don』t have a RPM database on the machine — we are running on Ubuntu, remember?
After a few moments, you will be prompted to choose where to install the Oracle server. You』ll notice that I asked the installer to not create a starter database — I did that later. Choose the Oracle Base and correct the group if needed. I personally recommend sticking with the defaults if you are a newbie like me.
As you press the Next button, you will be prompted where to install the Inventory — leave it that way unless you know what you are doing (if this were the case, you wouldn』t be reading this text anyways). Also correct the OS group name if needed and hit Next .
Since I』ve chosen to install the server in the same directory as the oracle user』s HOME directory, the installer will issue a warning. I simply ignored it and continued with the installation.
After that warning, I tried to perform some prerequisite tests, and yes — some will fail. Just mark the failed boxes and hit Next (after trying a few times to fix those issues, I』ve decided to call the installer』s bluff and… it worked!)
Note:
Ignore some filures and warnings by making the check box checked and click next.
After all this warning stuff, it』ll ask you to check the list of products to be installed. I was amazed when I read that 122 different products would be installed on my box. Hit Next .

Before finishing, add the following lines to your /etc/profile . Be careful, since these values are valid system-wide. So make sure the paths are set according to your particular setup (if you have been doing everything according to this text, you should be fine).
export ORACLE_BASE=/opt/oracle   export ORACLE_HOME=/opt/oracle/product/11.1.0/db_1   export ORACLE_SID=orcl   export PATH=$PATH:/optp/oracle/product/11.1.0/du01/appb_1/bin   
Note:
Linux is case sensitive. So Oralce in linux is sensitve as well. Please use the orcl as the instance name as you specify orcl as the instance name during installation. Or esle it doesn't work. During installation, you set the user/password sys/admin as the lower case, you need to use the lower case when you login sqlplus.It is really case sensitive in Linux.
Last operation: add yourself to the dba group. You can use usermod or just edit the /etc/groups file and add your username at the end of the line that starts with dba (my username is 『robert』):
dba:x:1002:oracle,robert   
If you chose to not create a starter database during your install, you』ll have to do two extra steps. You should create a listener (with netca ) and after that, create the starter database (also with netca ). If you chose to have the installer create a database for you, then you should be fine, since when doing that, it asks for a password for the default accounts (SYS , SYSTEM , and DBSNMP , SYSMAN if you choose to install it with the enterprise manager option selected).
If everything has gone well, open a terminal window and, as the oracle


[火星人 ] Install Oracle(Two) - Oracle11g on Ubuntu Linux 8已經有670次圍觀

http://coctec.com/docs/linux/show-post-53187.html