安装需要使用oracle用户
报错:
./runInstaller: line 97: /root/database/install/.oui: Permission denied
解决:
chmod -R 775 database
加上-R的命令把子目录下所有文件夹和文件赋予775
报错
Could not execute auto check for display colors using command /usr/bin/xdpyinfo. Check if the DISPLAY variable is set.
解决:
Steps to resolve this issue:
1) login into root user( su -l root)
2) execute this command : xhost +SI:localuser:oracle
3) login to the oracle user
4) execute ./runInstaller
或者
则使用root用户执行:
# xhost +
# export DISPLAY=:1.0
# su – oracle 切换回oracle用户再次执行# ./runInstaller
# oracel intall add parameters
#kernel.shmmax = 2147483648
kernel.shmmni=4096
#kernel.shmall = 2097152
kernel.sem=250 32000 100 128
fs.file-max=6815744
fs.aio-max-nr=1048576
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
修改后运行"/sbin/sysctl -p"命令使得内核改变立即生效;
设置oracle对文件的要求:
编辑文件:vi /etc/security/limits.conf 加入以下语句:
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536
编辑文件:vi /etc/pam.d/login 加入以下语句(可能应该加在最后一条规则之前):
session required /lib/security/pam_limits.so
各种包需要安装,按照orale的提示进行安装
libaio-0.3.105 (i386) 缺少
libaio-0.3.107-10.el6(x86_64) 已经安装
compat-libstdc++-33-3.2.3 (i386) 缺少
compat-libstdc++-33-3.2.3-69.el6(x86_64) 已经安装
libaio-devel-0.3.105 (i386) 缺少
libaio-devel-0.3.107-10.el6(x86_64) 已经安装
libgcc-3.4.6 (i386) 缺少
libgcc-4.4.4-13.el6(x86_64) 已经安装
libstdc++-3.4.6 (i386) 缺少
libstdc++-4.4.4-13.el6(x86_64) 已经安装
unixODBC-2.2.11 (i386) 缺少
unixODBC-2.2.14-11.el6(x86_64) 已经安装
unixODBC-devel-2.2.11 (i386) 缺少
unixODBC-devel-2.2.14-11.el6(x86_64) 已经安装
解决:
yum list libaio-devel 查看下名字
之后yum install libaio-devel-0.3.105.i386
其他的同理,如还是不能解决,网上有这么说的
Important
You may notice that the minimum requirements fail during the testing.
Package:libaio-0.3.105 - This is a prerequisite condition to test whether the package "libaio-0.3.105 is available on the system. List of errors:
- PRVF-7532: Package "libaio-0.3.105 (i386)" is missing on node "Localhost"
This is a little miss leading because I noticed that these are 32-bit packages, not the 64bit packages. You installed the 64bit packages because so go ahead and click 'ignore all'
可以忽略32为的这些包
export ORACLE_BASE=/oracle/app/oracle
export ORACLE_HOME=$ORACLE_BASE/product/11.2.0/dbhome_1
export ORACLE_SID=orcl
export ORACLE_OWNER=oracle
export ORACLE_TERM=vt100
export PATH=$PATH:$ORACLE_HOME/bin:$HOME/bin
export PATH=$ORACLE_HOME/bin:$PATH
LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib:/usr/local/lib
export LD_LIBRARY_PATH
CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib
CLASSPATH=$CLASSPATH:$ORACLE_HOME/network/jlib
export CLASSPATH
PATH=$PATH:/usr/sbin; export PATH
PATH=$PATH:/usr/bin; export PATH
ORA_NLS33=$ORACLE_HOME/nls/admin/data
报错:
ERROR: ORA-01031: insufficient privileges
目前以这样方式登录,之前使用sqlplus "/as sysdba"
$sqlplus
sys as sysdba
密码
SQL>startup
ORA-00845: MEMORY_TARGET not supported on this system
#mount -o remount,size=2G /dev/shm
SQL>startup
ORA-01102: cannot mount database in EXCLUSIVE mode
解决方法:
杀死进程
A database is started in EXCLUSIVE mode by default. Therefore, the ORA-01102 error is misleading and may have occurred due to one of the following reasons:
- there is still an "sgadef.dbf" file in the "ORACLE_HOME/dbs" directory
- the processes for Oracle (pmon, smon, lgwr and dbwr) still exist
- shared memory segments and semaphores still exist even though the
database has been shutdown
- there is a "ORACLE_HOME/dbs/lk" file
Search Words:
=============
ORA-1102, crash, immediate, abort, fail, fails, migration
Solution Description:
=====================
Verify that the database was shutdown cleanly by doing the following:
1. Verify that there is not a "sgadef.dbf" file in the directory "ORACLE_HOME/dbs".
% ls $ORACLE_HOME/dbs/sgadef.dbf If this file does exist, remove it.
% rm $ORACLE_HOME/dbs/sgadef.dbf
2. Verify that there are no background processes owned by "oracle"
% ps -ef | grep ora_ | grep $ORACLE_SID
If background processes exist, remove them by using the Unix
command "kill". For example:
% kill -9
3. Verify that no shared memory segments and semaphores that are owned by "oracle" still exist
% ipcs -b
If there are shared memory segments and semaphores owned by "oracle", remove the shared memory segments
% ipcrm -m
and remove the semaphores
% ipcrm -s
NOTE: The example shown above assumes that you only have one
database on this machine. If you have more than one
database, you will need to shutdown all other databases
before proceeding with Step 4.
4. Verify that the "$ORACLE_HOME/dbs/lk" file does not exist
5. Startup the instance
Solution Explanation:
=====================
The "lk" and "sgadef.dbf" files are used for locking shared memory. It seems that even though no memory is allocated, Oracle thinks memory is still locked. By removing the "sgadef" and "lk" files you remove any knowledge oracle has of shared memory that is in use. Now the database can start.
阅读(5664) | 评论(0) | 转发(0) |