oracle安装资料

检查相关的开发工具和一些包

yum install -q gcc make binutils openmotif setarch compat-db compat-gcc compat-gcc-c++ compat-libstdc++ compat-libstdc++-devel

yum install xorg-x11-deprecated-libs

5.4上安装Oracle 10g时提示如下错误:

Exception in thread “main” java.lang.UnsatisfiedLinkError: /tmp/OraInstall2009-11-25_02-34-42PM/jre/1.4.2/lib/i386/libawt.so:libXp.so.6: cannot open shared object file: No such file or directory

 

附带下载地址

原因是缺少了包,装上如下的包就可以了。

# rpm -ivh libXp-1.0.0-8.1.el5.i386.rpm

记录一下以免忘记了。


==========================================

 


groupadd oinstall
groupadd dba
mkdir -p /u01/oracle

添加一个oracle用户, 根目录是 /u01/oracle, 主的组是 oinstall 副的组是dba
useradd -g oinstall -G dba -d /u01/oracle oracle

cp /etc/skel/.bash_profile /u01/oracle

cp /etc/skel/.bashrc /u01/oracle

cp /etc/skel/.bash_logout /u01/oracle

为oracle用户设置密码 123456
passwd oracle

/]#ls -l
/]#chown -R oracle:oinstall u01
/]#ls -l

检查 nobody 是否存在 ,  id nobody
缺省存在的。如果不存在 # /usr/sbin/useradd -g nobody

========================================

vi /etc/hosts
本机IP    test10g

vi /etc/sysconfig/network
GATEWAY= 本机IP地址
HOSTNAME = test10g


===============
Depending on the oracle user's default shell, make the following changes to the default shell start-up file:

    For the Bourne, Bash, or Korn shell, add the following lines to the /etc/profile file (or the file on SUSE systems)/etc/profile.local:

    if [ $USER = "oracle" ]; then
            if [ $SHELL = "/bin/ksh" ]; then
                  ulimit -p 16384
                  ulimit -n 65536
            else
                  ulimit -u 16384 -n 65536
            fi
    fi

================


vi /etc/sysctl.conf
需要将原kernel.shmmax与kernel.shmall参数注释掉。并在文件末尾添加以下内容




fs.aio-max-nr = 1048576
fs.file-max = 6815744
kernel.shmall = 2097152
kernel.shmmax = 536870912
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
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 = 1048586

#再运行sysctl -p应用以上参数

-------------
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     pam_limits.so
=================================================

设置oracle 用户环境变量

su - oracle

pwd
ls -la

---------------
vi .bash_profile

ORACLE_BASE=/u01
ORACLE_HOME=$ORACLE_BASE/oracle
ORACLE_SID=wilson
PATH=$ORACLE_HOME/bin:$PATH:$HOME/bin

export ORACLE_BASE ORACLE_HOME ORACLE_SID PATH

===================================

mv database /u01/

cd /u01
ls -l

 chown -R oracle:oinstall database/

 

使用oracle账号 登陆图形界面 进行安装

运行终端 Terminal

cd /u01/database
export LANG=en_US   //设置临时环境变量,解决oracle图形界面显示乱码的问题
./runInstaller

Installation Optiong
    install database software only

Grid Options
    Single instance database installation

Product Languages
    English

Database Edition
    Enterprise Edition (3.95)

Installation Location
    Oracle Base: /u01
    Software Loacation: /u01/oracle

        提示: yes

Create Inventory
    mkdir /oraInventory

    chown -R oracle:oinstall oraInventory

Operating System Groups
    Next

Prerequis ite Checks
    Ignore All

Summary
    Finish

Install Product
    安装完毕, 提示执行 2个脚本

    /oraInventory/orainstRoot.sh
    /u01/oracle/root.sh
        直接按回车, 缺省值就可以

Finish
    The installation of Oracle Database was successful

====================================

上面只是安装了软件, 数据库没有创建, 还有配置 监听器 Listener

netca
    遇到问题看netca图片


    一直默认下一步 , 呵呵, 最后 Finish

ps -ef 可以查看Listener是否配置成功

-----------
dbca
    一直 Next,    Global Database Name 和 SID 都是输入 wilson

    选择 User the Same.....All Accounts

        密码: 123456


    选择 Sample Schemas

    Memory 内存分配,默认就可以了
    Character Sets 选择 Use Unicode(AL32UTF8)

    然后一直 Next , 到最后 Finish

弹出一个 Confirmation , 点击 OK 就可以了, 然后自动进行安装

安装到目录 /u01/oradata/wilson
       /u01/等等。。。 会发现多了很多文件。

--------------------
然后可以修改  vi /etc/inittab 让 centos5.5 linux 启动的时候 不进入 图形界面
        直接进入 字符界面

    id:5:initdefault:    修改成  id:3:initdefault:

    保存退出, 然后重启系统

--------------------------------
用 oracle 用户 远程登录, 然后

$ sqlplus /nolog

SQL> conn / as sysdba

Connected to an idle instance.
出现错误

SQL> startup

[oracle@localhost ~]$ sqlplus /nolog

SQL*Plus: Release 11.2.0.1.0 Production on Fri Jun 25 15:05:54 2010

Copyright (c) 1982, 2009, Oracle.  All rights reserved.

SQL> conn / as sysdba
Connected.
SQL> create table testUser( id integer,name char(10));

Table created.

SQL> insert into testUser values(0,'Jack');

1 row created.

SQL> commit;

Commit complete.

SQL> select * from testUser;

        ID NAME
---------- ----------
         0 Jack

关闭数据库
SQL>  shutdown immediate

SQL>  quit

 



posted on 2012-03-08 21:40  c3tc3tc3t  阅读(313)  评论(0)    收藏  举报