潜龙勿用,见龙在田
全部博文(540)
分类:
2008-02-13 14:08:40
Start the Oracle Universal Installer
[oracle]
Login as oracle user or change to oracle user.
$ su – oracle
The Oracle installer must be run from X window. You will need to allow the local oracle user to write to your X display.
If you start the Oracle Universal Installer from a remote machine connecting to the Linux machine, you need to setup the DISPLAY environment variable. Otherwise, you will get these error messages.
[oracle Disk1]$ ./runInstaller
DISPLAY not set!
Please set DISPLAY and try again.
Use these commands to setup the DISPLAY environment variable and then use the xclock command to make sure the DISPLAY is setup correctly.
$ export DISPLAY=192.168.1.44:0.0
$ echo $DISPLAY
192.168.1.44:0.0
$ xclock
Once the DISPLAY variable is setup, run the runInstaller.
[oracle Disk1]$ ./runInstaller
Welcome Screen
[oracle]
If everything is setup correctly, you will be greeted with the Oracle Universal Installer: Welcome screen.
Click the Next button to start the installation.
Inventory Location
[oracle]
Since this is your first Oracle installation, you need to specify a base directory for installation files.
Click OK button to continue.
You may get this permission warning if the correct privileges is not setup for the /opt/oracle folder. The oracle user has to have write privilege to the /opt/oracle folder.(Command: chmod u+w /opt/oracle)
Once the permission is setup correctly, click the OK button to retry.
UNIX Group Name
[oracle]
When prompted for the UNIX Group Name (the UNIX group that has the permission for updating Oracle software), enter oinstall and click the Next button.
Run /tmp/orainstRoot.sh
[root]
You will be prompted to run /tmp/orainstRoot.sh as root.
Open a new terminal session, login as the root user, and run the orainstRoot.sh as instructed.
# cd /tmp
# ./orainstRoot.sh
Creating Oracle Inventory pointer file (/etc/oraInst.loc)
Changing groupname of /opt/oracle/oraInventory to oinstall.
Click the Continue button once this is done.
File Locations
[oracle]
You will be prompted for the source and the destination of the file locations. For our example, we use /opt/oracle/product/9.2 as the Oracle home name.
Use the default values and click the Next button to continue. The Oracle Universal Installer will load the available products.
Available Products
[oracle]
You can select the product you want to install on this screen. I selected Oracle9i Database 9.2.0.1.0.
Click the Next button to continue.
Installation Types
[oracle]
We will choose Custom when prompted for the installation type. Click the Next button to continue.
Available Product Components
[oracle]
You will be presented with a list of product components for installation. I chosed not to install Legato Networker Single Server 6.1.0.0.0.
Expand the Enterprise Edition Options 9.2.0.1 by clicking on the + box.
Uncheck the Legato Networker Single Server 6.1.0.0.0
And click the Next button to continue.
Component Locations
[oracle]
Next you will be prompted for the location for the Oracle Universal Installer and Java Runtime Environment.
These are the default locations for respective components:
Oracle Universal Installer 2.2.0.12.0 - /opt/oracle/oui
Java Runtime Environment 1.3.1.0.0 - /opt/oracle/jre/1.3.1
Java Runtime Environment 1.1.8.1.0 - /opt/oracle/jre/1.1.8
I accepted the default values and clicked the Next button to continue.
Privileged Operating System Groups
[oracle]
The dba group created earlier will be entered on this window.
Use dba for both and click the Next button to continue.
Oracle Management Server Repository
[oracle]
Existing repository
- A 9.2.0.1.0 repository has already been created and configured for the environment that you want to manage and you want this Management Server to share the existing 9.2.0.1.0 repository
New repository
- You want to upgrade an existing release 2.x or 9.x repository to a 9.2.0.1.0 repository or a 9.2.0.1.0 repository has not been created and configured for the environment that you want to manage.
Click the Next button to continue after a selection is made.
Create Database
[oracle]
You will be asked whether you want to create a database using the Oracle Database Configuration Assistant. Choose No because not all things are operational now and we have to patch the install.
Click the Next button to continue.
Summary Screen
[oracle]
A summary screen will be presented. Check the list for confirmation.
Once you are happy with the selection, click Install button to continue.
Install
[oracle]
The installation will begin and you will see something similar to this.
After copying and installing the files, Universal Installer will link the Oracle modules.
Fix ins_oemagent.mk error
[oracle]
When the linking reaches 71%,
you will received this error
Error invoking target install of makefile /opt/oracle/product/9.2/network/lib/ins_oemagent.mk
If you look at make.log at the $ORACLE_HOME/install directory, you should see:
$ tail make.log
: undefined reference to `__ctype_b'
/opt/oracle/product/9.2/network/lib/libnmi.a(snmitcln.o)(.text+0x927): In function `Nls_FormatCmd':
: undefined reference to `__ctype_b'
/opt/oracle/product/9.2/network/lib/libnmi.a(snmitcln.o)(.text+0xa4e): In function `Nls_FormatCmd':
: undefined reference to `__ctype_b'
/opt/oracle/product/9.2/network/lib/libnmi.a(snmitcln.o)(.text+0x159d): In function `Nls_ScanCmd':
: undefined reference to `__ctype_b'
/opt/oracle/product/9.2/network/lib/libnmi.a(snmitcln.o)(.text+0x1603): more undefined references to `__ctype_b' follow
collect2: ld returned 1 exit status
make: *** [dbsnmp] Error 1
To fix this, edit /opt/oracle/product/9.2/network/lib/env_oemagent.mk and changes
LDLIBS=$(EXPDLIBS) $(EXOSLIBS) $(SYSLIBS) $(EXSYSLIBS) $(MATHLIB) $(USRLIBS)
to:
LDLIBS=$(EXPDLIBS) $(EXOSLIBS) $(SYSLIBS) $(EXSYSLIBS) $(MATHLIB) $(USRLIBS) -lctypefixup
Save the file and then click the Retry button. The install will continue.
Fix ins_ctx.mk error
[oracle]
When the linking reaches 86%, you will receive this error:
Error in invoking target install of makefile /opt/oracle/product/9.2/ctx/lib/ins_ctx.mk
If you look at the $ORACLE_HOME/install/make.log, you will see this error message similar to the following:
gcc -o ctxhx -L/opt/oracle/product/9.2/ctx/lib/ -L/opt/oracle/product/9.2/lib/ -L/opt/oracle/product/9.2/lib/stubs/ /opt/oracle/pro duct/9.2/ctx/lib/ctxhx.o -L/opt/oracle/product/9.2/ctx/lib/ -lm -lsc_ca -lsc_fa -lsc_ex -lsc_da -lsc_ut -lsc_ch -lsc_fi -lctxhx -lc -Wl,-rpath,/opt/oracle/product/9.2/ctx/lib -lnls9 -lcore9 -lnls9 -lcore9 -lnls9 -lxml9 -lcore9 -lunls9 -lnls9 /usr/bin/ld: ctxhx: hidden symbol `stat' in /usr/lib/libc_nonshared.a(stat.oS) is referenced by DSO collect2: ld returned 1 exit status make: *** [ctxhx] Error 1
Go to $ORACLE_HOME/ctx/lib and make a copy of the ins_ctx.mk file (You have to be the root user):
$ cp $ORACLE_HOME/ctx/lib/ins_ctx.mk $ORACLE_HOME/ctx/lib/ins_ctx.mk_p2037255
Copy the ins_ctx.mk and bug2037255.o to $ORACLE_HOME/ctx/lib directory and retry the make command:
$ make -f ins_ctx.mk ictxhx
If the fix works, you will get this:
$ make -f ins_ctx.mk ictxhx
gcc -o ctxhx -L/opt/oracle/product/9.2/ctx/lib/ -L/opt/oracle/product/9.2/lib/ -L/opt/oracle/product/9.2/lib/stubs/ -ldl /opt/oracl e/product/9.2/ctx/lib/ctxhx.o bug2037255.o -L/opt/oracle/product/9.2/ctx/lib/ -lm -lsc_ca -lsc_fa -lsc_ex -lsc_da -lsc_ut -lsc_ch - lsc_fi -lctxhx -lc -Wl,-rpath,/opt/oracle/product/9.2/ctx/lib -lnls9 -lcore9 -lnls9 -lcore9 -lnls9 -lxml9 -lcore9 -lunls9 -lnls9
mv -f /opt/oracle/product/9.2/ctx/bin/ctxhx /opt/oracle/product/9.2/ctx/bin/ctxhxO
mv ctxhx /opt/oracle/product/9.2/ctx/bin/ctxhx
chmod 751 /opt/oracle/product/9.2/ctx/bin/ctxhx
$
If it doesn't work, you get these error messages:
gcc -o ctxhx -L/opt/oracle/product/9.2/ctx/lib/ - L/opt/oracle/product/9.2/lib/ -L/opt/oracle/product/9.2/lib/stubs/ /opt/oracle/product/9.2/ctx/lib/ctxhx.o -L/opt/oracle/product/9.2/ctx/lib/ -lm -lsc_ca -lsc_fa -lsc_ex -lsc_da -lsc_ut -lsc_ch -lsc_fi -lctxhx -lc -Wl,-rpath,/opt/oracle/product/9.2/ctx/lib -lnls9 -lcore9 -lnls9 -lcore9 - lnls9 -lxml9 -lcore9 -lunls9 -lnls9
/lib/libdl.so.2: undefined reference to `__ctype_b_loc@GLIBC_2.3'
/lib/libdl.so.2: undefined reference to `_dl_addr@GLIBC_PRIVATE'
/lib/libdl.so.2: undefined reference to `_dl_open@GLIBC_PRIVATE'
/lib/libdl.so.2: undefined reference to `_dl_close@GLIBC_PRIVATE'
/lib/libdl.so.2: undefined reference to `_dl_sym@GLIBC_PRIVATE'
/lib/libdl.so.2: undefined reference to `_dl_vsym@GLIBC_PRIVATE'
Then you need to edit the $ORACLE_HOME/ctx/lib/ins_ctx.mk file so that lines 13-14 change:
From:
ctxhx: $(CTXHXOBJ)
$(LINK) $(CTXHXOBJ) bug2037255.o $(INSO_LINK)
To:
ctxhx: $(CTXHXOBJ)
$(LINK) -ldl $(CTXHXOBJ) bug2037255.o $(INSO_LINK)
Then execute the following command:
$ make -f ins_ctx.mk ictxhx
If the fix works, you will get this:
$ make -f ins_ctx.mk ictxhx
gcc -o ctxhx -L/opt/oracle/product/9.2/ctx/lib/ -L/opt/oracle/product/9.2/lib/ -L/opt/oracle/product/9.2/lib/stubs/ -ldl /opt/oracl e/product/9.2/ctx/lib/ctxhx.o bug2037255.o -L/opt/oracle/product/9.2/ctx/lib/ -lm -lsc_ca -lsc_fa -lsc_ex -lsc_da -lsc_ut -lsc_ch - lsc_fi -lctxhx -lc -Wl,-rpath,/opt/oracle/product/9.2/ctx/lib -lnls9 -lcore9 -lnls9 -lcore9 -lnls9 -lxml9 -lcore9 -lunls9 -lnls9
mv -f /opt/oracle/product/9.2/ctx/bin/ctxhx /opt/oracle/product/9.2/ctx/bin/ctxhxO
mv ctxhx /opt/oracle/product/9.2/ctx/bin/ctxhx
chmod 751 /opt/oracle/product/9.2/ctx/bin/ctxhx
$
Click the Retry button
The installation will continue.
Run root.sh
[root]
The installation should continue without any other errors. Once the installation is 100% completed, you will be prompted to run the root.sh script.
Open a new session, log in as root, and run the command as instructed. Click the OK button after the root.sh is executed by the root user.
Example:
$ cd /opt/oracle/product/9.2/
$ ./root.sh
Running Oracle9 root.sh script...
The following environment variables are set as:
ORACLE_OWNER= oracle
ORACLE_HOME= /opt/oracle/product/9.2
Enter the full pathname of the local bin directory: [/usr/local/bin]:
Copying dbhome to /usr/local/bin ...
Copying oraenv to /usr/local/bin ...
Copying coraenv to /usr/local/bin ...
Creating /etc/oratab file...
Adding entry to /etc/oratab file...
Entries will be added to the /etc/oratab file as needed by Database Configuration Assistant when a database is created
Finished running generic part of root.sh script.
Now product-specific root actions will be performed.
Configuration Tools
[oracle]
After you run the root.sh as root, the Configuration Tools will start automatically. Due to the incompatible JRE, the Oracle Net Configuration Assistant and Enterprise Manager Configuration Assistant will fail to install. We will address this issue in the following sections.
You will be greeted with this message:
The reason that Oracle Net Configuration Assistant fails:
/opt/oracle/jre/1.1.8/bin/../bin/i686/native_threads/jre: relocation error: /opt/oracle/jre/1.1.8/bin/../lib/i686/native_threads/libjava.so: symbol __libc_wait, version GLIBC_2.0 not defined in file libc.so.6 with link time reference
The reason that Enterprise Manager Configuration Assistant fails:
/opt/oracle/product/9.2/bin/emca: line 82: /usr/java/jdk1.3.1_09:/bin/java: No such file or directory
/opt/oracle/product/9.2/bin/emca: line 82: exec: /usr/java/jdk1.3.1_09:/bin/java: cannot execute: No such file or directory
Click the Next button on the Configuration Tools screen to continue.
End of Installation
[oracle]
The install is now completed.
Click the Exit button to close the install.
Force Oracle Tools To Use Alternative JRE
[oracle, root]
Issue the following commands as oracle user.
mv $ORACLE_HOME/JRE $ORACLE_HOME/JRE_ORIG
ln -s /usr/java/jre1.3.1_09 $ORACLE_HOME/JRE
Example:
$ su - oracle
Password:
$ echo $ORACLE_HOME/JRE
/opt/oracle/product/9.2/JRE
$ mv $ORACLE_HOME/JRE $ORACLE_HOME/JRE_ORIG
$ ln -s /usr/java/jre1.3.1_09 $ORACLE_HOME/JRE
$
Then issue these commands as root user.
$ su - root
$ ln -s /usr/java/jre1.3.1_09/bin/java /usr/java/jre1.3.1_09/bin/jre
$ ln -s /usr/java/jre1.3.1_09/bin/i386/native_threads/java /usr/java/jre1.3.1_09/bin/i386/native_threads/jre
$ exit
Oracle Net Configuration Assistant
[oracle]
Once these settings are complete, we can launch the Oracle Net Configuration Assistant by issuing the netca command.
$ export DISPLAY=192.168.1.44:0.0
netca
You will see the following screen
Choose the Listener configuration and click the Next button to continue.
Since this is your first LISTENER, you will have to select the Add option and click the Next button.
Accept the default name, LISTENER, and click the Next button to continue.
We will use TCP as our protocol. Click the Next button to continue.
Port 1521 will be used by the listener. Click the Next button to continue.
We'll be creating only one listener for now. Select No option and click the Next button to continue.
The listener configuration should complete without errors. Click the Next button to continue.
Select the Naming Methods configuration and click the Next button to continue.
Select local from the Available Naming methods and add it to the Selected Naming Method. Then click the Next button to continue.
The Naming Method configuration should complete without errors. Click the Next button to continue. Once you are returned to Oracle Net Configuration Assistant: Welcome screen, you can click the Finish button to exit. Your screen should have similar output:
$ export DISPLAY=192.168.1.44:0.0
$ netca
Oracle Net Services Configuration:
Configuring Listener:LISTENER
Listener configuration complete.
Oracle Net Listener Startup:
Running Listener Control:
/opt/oracle/product/9.2/bin/lsnrctl start LISTENER
Listener Control complete.
Listener started successfully.
Profile configuration complete.
Oracle Net Services configuration successful. The exit code is 0
$
Congratulation! You now have a fully functional Oracle installation.