Ubuntu12上安装Oracle11gR2

经过几天的不懈努力,终于在虚拟机virtualbox上装上了Ubuntu12。将这几天从网上摘录的文章及自己写的一些文件整理到一起,比较乱,以后再整理吧。

Oracle安装笔记
出现错误后不要慌,最主要的是看log文件的提示,其中比较简单的文件是install目录下的make.log
错误一: client_shared
For example: /usr/bin/ld: cannot find /usr/lib/libpthread_nonshared.a
 Assuming you have the right packages installed this normally means such files are in a slightly different location. Try to find it: find /usr/lib -name libpthread_nonshared.a
 In case of a 64 bits system it could be in /usr/lib/x86_64-linux-gnu/, create a symlink this way: ln -s /usr/lib/x86_64-linux-gnu/libpthread_nonshared.a /usr/lib/libpthread_nonshared.a
 Or in case of a 32 bits system: ln -s /usr/lib/i386-linux-gnu/libpthread_nonshared.a /usr/lib/libpthread_nonshared.a
 Then hit retry in the installer and repeat this for the other compilation errors. Common symlinks I had to create (replace x86_64 with i386 if using 32 bits system): ln -s /usr/lib/x86_64-linux-gnu/libpthread_nonshared.a /usr/lib/
ln -s /usr/lib/x86_64-linux-gnu/libc_nonshared.a /usr/lib/
ln -s /lib/x86_64-linux-gnu/libgcc_s.so.1 /lib/
ln -s /usr/lib/x86_64-linux-gnu/libstdc++.so.6 /usr/lib/

错误二:
 installation error in invoking target 'agent nmhs'
发布: 2010-6-25 下午1:08
database , oracle , installation , 11g , error      
 
Dear All,
I am new to this forum and I would like to inquire about the reasons behind a specific installation error of Oracle 11gR2 on Fedora 13 and the way to fix it. The error led to a weired behavior for the EM. I am going to explain everything precisely to flap the correspondence time so please please please bare with me.

I have followed precisely all the pre-requisites for preparing the installation environment (Fedora 13 Linux OS) by following the instructions in the manual that comes on the source installation Disk-1of Oracle 11g R2, like assigning the environment variables, setting kernel parameters, installation of all the required and necessary packages, creating the necessary directories and changing the owner ship, in addition to creation the user 'oracle' and the necessary groups. This installation ends up with a successful working database that can be accessed using sqlplus locally and remotely from another machine. My EM also worked but for a limited period of time for only about 10 to 15 min then after that I cannot access it due to a problem in the agent background process or daemon that is resulted from the error happened during the installation, and need to restart my machine. Here is what happened.

My installation is a stand alone database (database control / console database). Everything went smoothly during the installation except the following error that I couldn't get rid of or fix it, and I just continued the installation by clicking on the continue button of the OUI alert window. The error message on the alert window is:

Error in invoking target 'agent nmhs' of makefile '/u01/app/oracle/product/11.2.0/dbhome_1/sysman/lib/ins_emagent.mk'. See '/u01/app/oraInventory/logs/installActions2010-06-24_03-22-15PM.log' for details.

and here is the contenets (error part) of the installActions2010-06-24_03-22-15PM.log file

INFO: /usr/bin/ld: /u01/app/oracle/product/carried(nmectlt.o): undefined reference to symbol 'B_DestroyKeyObject'
/usr/bin/ld: note: 'B_DestroyKeyObject' is defined in DSO /u01/app/oracle/product/11.2.0/dbhome_1/lib/libnnz11.so so try adding it to the linker command line
/u01/app/oracle/product/11.2.0/dbhome_1/lib/libnnz11.so: could not read symbols: Invalid operation
INFO: collect2: ld returned 1 exit status
INFO: make[1]: --- [/u01/app/oracle/product/carried] Error 1
INFO: make[1]: Leaving directory `/u01/app/oracle/product/carried'
INFO: make: --- [emdctl] Error 2
INFO: End output from spawned process.
INFO: ----------------------------------
INFO: Exception thrown from action: make
Exception Name: MakefileException
Exception String: Error in invoking target 'agent nmhs' of makefile '/u01/app/oracle/product/11.2.0/dbhome_1/sysman/lib/ins_emagent.mk'. See '/u01/app/oraInventory/logs/installActions2010-06-24_03-22-15PM.log' for details.
Exception Severity: 1
INFO: Calling Action unixActions10.2.0.3.0 ; make
registerOnly = false
installMakePath = /usr/bin/make
installMakeFileName = /u01/app/oracle/product/11.2.0/dbhome_1/rdbms/lib/ins_rdbms.mk
installTarget = all_no_orcl
undoMakeFileName =
installArguments = ORACLE_HOME=/u01/app/oracle/product/11.2.0/dbhome_1
logFile = /u01/app/oracle/product/11.2.0/dbhome_1/install/make.log
undoTarget =
progMsg = Linking RDBMS Executables


After all the above, I am going to explain here how this error affected the EM. Here is the output of starting the dbconsole:


$ emctl start dbconsole
Oracle Enterprise Manager 11g Database Control Release 11.2.0.1.0
Copyright (c) 1996, 2009 Oracle Corporation. All rights reserved.
http://bassam-desktop:1158/em/console/aboutApplication
Starting Oracle Enterprise Manager 11g Database Control .... started.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Logs are generated in directory /u01/app/oracle/product/carried-desktop_orcl/sysman/log


and here is the output of the status of the dbconsole


$ emctl status dbconsole
Oracle Enterprise Manager 11g Database Control Release 11.2.0.1.0
Copyright (c) 1996, 2009 Oracle Corporation. All rights reserved.
http://bassam-desktop:1158/em/console/aboutApplication
EM Daemon is not running.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Logs are generated in directory /u01/app/oracle/product/carried-desktop_orcl/sysman/log


notice the EM Daemon (agent background process) is not running

Becuase of this error, the actual status of the database is not shown up in the EM. For example, if I try to startup my database through the EM, it starts successfully, but its status will not be shown, same thing happens for the listener. Clicking the View Details link in the EM after starting up the database shows up the following:

SQL*Plus: Release 11.2.0.1.0 Production on Sat Jun 26 03:43:36 2010
Copyright (c) 1982, 2009, Oracle. All rights reserved.
SQL> Connected to an idle instance.
SQL> SQL> ORACLE instance started.

Total System Global Area 1489829888 bytes
Fixed Size 1336624 bytes
Variable Size 922749648 bytes
Database Buffers 553648128 bytes
Redo Buffers 12095488 bytes
Database mounted.
Database opened.

SQL> Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
Oracle Enterprise Manager 11g Database Control Release 11.2.0.1.0
Copyright (c) 1996, 2009 Oracle Corporation. All rights reserved.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Agent is Not Running


again notice the last line of the message Agent is not running.

After all the above, I beleive that the installation error is the cause of all that. I would appreciate it if you could help me solving this problem. Thanks.

 


Bassam A. Al-Khaffaf
 
 

Hi.
So you want to build for fedora 13 without getting the error...

When you start to install with ./runInstaller, run in another terminal window (as root)
ls $ORACLE_HOME/sysman/lib/ins_emagent.mk

At first this will produce an error, as the installer wont have created this file yet.
Once the file exists, do:
vi $ORACLE_HOME/sysman/lib/ins_emagent.mk
Search for the line
$(MK_EMAGENT_NMECTL)
Change it to:
$(MK_EMAGENT_NMECTL) -lnnz11

If you do it within 30-40 seconds of the file appearing, you should not get any errors and the build will go fine. If you get an error, finish your edit then click on retry.

Hope that helps.
Gordon.


/////////////////////////////////////////////////////////////////////
关于Error in invoking target 'client_sharedlib'解决办法2007年06月12日 3:08在UBUNTU AMD64下安装ORACLE到64%时出现的问题。
在网上找了N多资料都没弄好,好像很多人在安装的时候都出现了这个问题。
后来我发现这个问题是建立目录时的错误引起的权限问题。
后来参看官方资料后发现用一下命令建立目录可解决该问题

mkdir -p /opt/app/oraclechown -R oracle:oinstall /opt/appchmod -R 775 /opt/app相应的打开/home/oracle/.profile,在.profile最后加入:umask 022PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/binLD_LIBRARY_PATH=/usr/lib:/usr/X11R6/lib         ORACLE_BASE=/u01/app/oracleORACLE_HOME=$ORACLE_BASE/product/10.1.0/db_1ORACLE_SID=orclPATH=$ORACLE_HOME/bin:$PATHexport PATH LD_LIBRARY_PATHexport ORACLE_BASE ORACLE_HOME ORACLE_SID这样改了以后再安装就不会出现Error in invoking target的问题了。


/////////////////////////////////////////////////////////////////////

在ubuntu 11 32bit环境下安装oracle 11g
博客分类: oracle
 
oracleubuntuinstall .


上周在自己的ubuntu环境里安装好了oracle 11g, 特此把安装过程纪录下来,留作备忘录。


事前准备:
 1.系统更新sudo


Console代码 
1.sudo apt-get update   
2.sudo apt-get upgrade  
 
 2.安装系统所需要的packagesudo


Console代码 
1.sudo su - 
2.apt-get install build-essential 
3.apt-get install libaio1 
4.apt-get install libaio-dev 
5.apt-get install unixODBC 
6.apt-get install unixODBC-dev 
7.apt-get install pdksh 
8.apt-get install expat 
9.apt-get install sysstat 
10.apt-get install libelf-dev 
11.apt-get install elfutils 
12.apt-get install lsb-cxx 
13.apt-get install ksh  
14.apt-get install libmotif3  
15.apt-get install alien  
16.apt-get install libtool  
17.apt-get install lsb-rpm 
 
 3.为避免linking ctx/lib/ins_ctx.mk的编译错误,下载libstdc++5_3.3.6-25ubuntu1_i386.deb,并进行安装。
 4. 为避免编译中link错误,执行下面命令


Console代码 
1.sudo ln -s /usr/bin/awk /bin/awk  
2.sudo ln -s /usr/bin/rpm /bin/rpm  
3.sudo ln -s /usr/bin/basename /bin/basename 
4. 
5.sudo ln -s /usr/lib/i386-linux-gnu/libc_nonshared.a /usr/lib 
6.sudo ln -s /usr/lib/i386-linux-gnu/libpthread_nonshared.a /usr/lib 
7.sudo ln -s /usr/lib/i386-linux-gnu/libstdc++.so.5 /usr/lib 
8.sudo ln -s /usr/lib/i386-linux-gnu/libstdc++.so.6 /usr/lib 
9.sudo ln -s /lib/i386-linux-gnu/libgcc_s.so.1 /lib 
   
 5. 修改系统参数


Console代码 
1.sudo su - 
2.#backup 
3.cp /etc/sysctl.conf /etc/sysctl.original 
4. 
5.vi /etc/sysctl.conf, 添加以下内容 
6.    # Oracle 11gR2 entries 
7.    fs.aio-max-nr=1048576 
8.    fs.file-max=6815744 
9.    kernel.shmall=2097152 
10.    kernel.shmmni=4096 
11.    kernel.sem=250 32000 100 128 
12.    net.ipv4.ip_local_port_range=9000 65500 
13.    net.core.rmem_default=262144 
14.    net.core.rmem_max=4194304 
15.    net.core.wmem_default=262144 
16.    net.core.wmem_max=1048586 
17.    kernel.shmmax=2147483648 
18. 
19.Note: kernel.shmmax = max possible value, e.g. size of physical memory in bytes 
20. 
21.#启动新的系统参数 Load new kernel parameters 
22.sysctl -p 
 
 
 6.创建用户和组


Console代码 
1.sudo groupadd oinstall 
2.sudo groupadd dba 
3.sudo groupadd nobody 
4.sudo usermod -g nobody nobody 
5.sudo useradd -g oinstall -G dba -d /home/oracle -s /bin/bash oracle 
6.sudo password oracle 
7.mkdir /home/oracle 
8.chown -R oracle:dba /home/oracle 
 
 7.修改/etc/security/limits.conf,添加以下内容


Console代码 
1.oracle soft nproc 2047 
2.oracle hard nproc 16384 
3.oracle soft nofile 1024 
4.oracle hard nofile 65536 
 

8.创建oracle安装目录


Console代码 
1.mkdir -p /u01/app/oracle 
2.chown -R oracle:oinstall /u01/app/oracle 
3.chmod -R 775 /u01/app/oracle 
4.mkdir -p /u01/app/oraInventory 
5.chown -R oracle:oinstall /u01/app/oraInventory 
6.chmod -R 775 /u01/app/oraInventory 
 
 
开始正式安装:
 
 
 1.以上边创建的oracle 用户login
 2.执行以下命令开始安装


Console代码 
1.export LANG=C 
2.#在安装目录下 
3../runInstaller 
 
 3.安装过程中,可能会遇到以下的编译错误


Console代码 
1.Error in invoking target 'agent nmhs' of makefile 
2.'/u01/app/oracle/product/11.2.0/db_1/sysman/lib/ins_emagent.mk.' 
3.See 
4.'/u01/app/oraInventory/logs/installActions2012-03-11_06-59-43PM.log' 
5.for details. 
6. 
7.或者还有 
8.Error in invoking target 'all_no_orcl' of makefile 
9.'/u01/app/oracle/product/11.2.0/db_1/rdbms/lib/ins_rdbms.mk.' 
10.See 
11.'/u01/app/oraInventory/logs/installActions2012-03-11_06-59-43PM.log' 
12.for details. 
 
 4.为解决上述编译错误,修改如下文件,然后再执行编译


Console代码 
1.sysman/lib/ins_emagent.mk: 
2. 
3.变更前: 
4.LDFLAGS=-Wl -o $@... 
5. 
6.变更后: 
7.LDFLAGS=-Wl,--copy-dt-needed-entries -o $@... 
8.  
9.bin/genorasdksh: 
10. 
11.变更前: 
12.$LD SLD_RUNTIME -Wl $D_OPT $LD_OUT ... 
13. 
14.变更后: 
15.$LD SLD_RUNTIME -Wl,--no-as-needed $D_OPT $LD_OUT ... 
16. 
17.srvm/lib/ins_srvm.mk: 
18. 
19.变更前: 
20.GETCRSHOME_LINKLINE=$(LINK) $(LDPATHFLAG)$(RDBMSLIB) $(CDEBUG) $(OPT) $(GETCRSHOME_OBJ1) -Wl 
21. 
22.变更后: 
23.GETCRSHOME_LINKLINE=$(LINK) $(LDPATHFLAG)$(RDBMSLIB) $(CDEBUG) $(OPT) $(GETCRSHOME_OBJ1) -Wl,--no-as-needed 
24. 
25. 
26.network/lib/env_network.mk: 
27. 
28.变更前: 
29.TNSLSNR_LINKLINE=$(LINK) $(TNSLSNR_OFILES) -Wl $(LINKTTLIBS) ... 
30. 
31.变更后: 
32.TNSLSNR_LINKLINE=$(LINK) $(TNSLSNR_OFILES) -Wl,--no-as-needed $(LINKTTLIBS) ... 
33. 
34.rdbms/lib/env_rdms.mk: 
35. 
36.变更前: 
37.ORACLE_LINKER=$(ADE_DEL_FILE_CMD) $(PURECMDS) gcc -Wl $(OLAPPRELINKOPTS) $(LDFLAGS) $(COMPSOBJS) 
38. 
39.变更后: 
40.ORACLE_LINKER=$(ADE_DEL_FILE_CMD) $(PURECMDS) gcc -Wl, --no-as-needed $(OLAPPRELINKOPTS) $(LDFLAGS) $(COMPSOBJS) 
 
 
5.按照安装程序的提示,以root权限login,然后执行命令 /u01/app/oracle/product/11.2.0/db_1/root.sh
 6.创建启动程序 vi /etc/init.d/oracledb, 加入以下内容


Shell代码 
1.#!/bin/bash 
2.  
3.export ORACLE_BASE=/u01/app/oracle 
4.export ORACLE_HOME=/u01/app/oracle/product/11.2.0/dbhome_1 
5.export ORACLE_OWNR=oracle 
6.export PATH=$PATH:$ORACLE_HOME/bin 
7.  
8.if [ ! -f $ORACLE_HOME/bin/dbstart -o ! -d $ORACLE_HOME ] 
9.then 
10.echo "Oracle startup: cannot start" 
11.exit 1 
12.fi 
13.  
14.case "$1" in 
15.start) 
16.# Oracle listener and instance startup 
17.echo -n "Starting Oracle: " 
18.su $ORACLE_OWNR -c "$ORACLE_HOME/bin/lsnrctl start" 
19.su $ORACLE_OWNR -c "$ORACLE_HOME/bin/dbstart $ORACLE_HOME" 
20.touch /var/lock/oracle 
21.echo "OK" 
22.;; 
23.stop) 
24.# Oracle listener and instance shutdown 
25.echo -n "Shutdown Oracle: " 
26.su $ORACLE_OWNR -c "$ORACLE_HOME/bin/lsnrctl stop" 
27.su $ORACLE_OWNR -c "$ORACLE_HOME/bin/dbshut $ORACLE_HOME" 
28.rm -f /var/lock/oracle 
29.echo "OK" 
30.;; 
31.reload|restart) 
32.$0 stop 
33.$0 start 
34.;; 
35.*) 
36.echo "Usage: `basename $0` start|stop|restart|reload" 
37.exit 1 
38.esac 
39.  
40.exit 0 

enterprise manager configuration succeeded with the follwoing warning
error starting database control please execute the following command
(1) set the environment variable ORACLE_UNQNAME to database unique name.
2 /u01/app/oracle/product/11.2.0/dbhom_9/bin/emctl
 

 

 

你可能感兴趣的:(oracle,ubuntu,database,makefile,installer,linker)