Linux4.0平台下Oracle10g安装

参考文档:
《Oracle ? Database Installation Guide 10g Release 2 (10.2) for Linux x86》
小布老师视频讲座
http://51CTO提醒您,请勿滥发广告!/v/bbk1041
http://51CTO提醒您,请勿滥发广告!/v/bbk1042
http://51CTO提醒您,请勿滥发广告!/v/bbk1040
软件列表:
      VMware Server1.0.6
      Radhat Linux 4.0
      Oracle 10g for Linux
      SecureFX2.2.3
      SecureCRT6.1.3
Checking the Hardware Requirements
--查询物理内存
[root@oralinux ~]# grep memTotal /proc/meminfo
--查询SWAP分区
[root@oralinux ~]# grep SwapTotal /proc/meminfo
SwapTotal:      819304 kB
--查询剩余的Mem和Swap空间
[root@oralinux ~]# free
             total       used       free     shared    buffers     cached
Mem:        386080     375676      10404          0      15844     254852
-/+ buffers/cache:     104980     281100
Swap:       819304        144     819160
--查询系统可剩磁盘空间
[root@oralinux ~]# df -k
Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/sda3              9408512   3229396   5701184  37% /
/dev/sda1               101086      8569     87298   9% /boot
none                    193040         0    193040   0% /dev/shm
[root@oralinux ~]#
Checking the Software Requirements
Red Hat Enterprise Linux 3.0 and 4.0必须要安装 的package
make-3.79.1
gcc-3.2.3-34
glibc-2.3.2-95.20
compat-db-4.0.14-5
compat-gcc-7.3-2.96.128
compat-gcc-c++-7.3-2.96.128
compat-libstdc++-7.3-2.96.128
compat-libstdc++-devel-7.3-2.96.128
openmotif21-2.1.30-8
setarch-1.3-1
libaio-0.3.102-1.i386.rpm
libaio-devel-0.3.102-1.i386.rpm
rpm -qa| grep ***
[root@oralinux ~]# rpm -qa|grep make
automake-1.9.2-3
make-3.80-5
automake14-1.4p6-12
automake17-1.7.9-5
automake15-1.5-13
automake16-1.6.3-5
[root@oralinux ~]# rpm -qa|grep gcc-
gcc-g77-3.4.3-9.EL4
compat-gcc-32-3.2.3-47.3
libgcc-3.4.3-9.EL4
gcc-c++-3.4.3-9.EL4
gcc-java-3.4.3-9.EL4
compat-libgcc-296-2.96-132.7.2
compat-gcc-32-c++-3.2.3-47.3
gcc-3.4.3-9.EL4
[root@oralinux ~]# rpm -qa|grep glibc
glibc-2.3.4-2
glibc-headers-2.3.4-2
glibc-common-2.3.4-2
glibc-kernheaders-2.4-9.1.87
glibc-devel-2.3.4-2
[root@oralinux ~]# rpm -qa|grep compat
compat-db-4.1.25-9
compat-gcc-32-3.2.3-47.3
compat-libgcc-296-2.96-132.7.2
compat-gcc-32-c++-3.2.3-47.3
compat-libstdc++-33-3.2.3-47.3
java-1.4.2-gcj-compat-1.4.2.0-26jpp
compat-libstdc++-296-2.96-132.7.2
[root@oralinux ~]# rpm -qa|grep openmotif
openmotif-devel-2.2.3-6.RHEL4.2
openmotif-2.2.3-6.RHEL4.2
[root@oralinux ~]# rpm -qa|grep setarch
setarch-1.6-1
[root@oralinux ~]#
如果未找到相应的rpm包,则到相应的iso文件中自行找到并上传到服务器上,执行以下命令
rpm -ivh *.rpm
[root@oralinux ~]# ls -l *.rpm
-rw-r--r--  1 root root 3172244 Jan  6  2005 compat-gcc-32-3.2.3-47.3.i386.rpm
-rw-r--r--  1 root root 3863472 Jan  6  2005 compat-gcc-32-c++-3.2.3-47.3.i386.rpm
-rw-r--r--  1 root root  180344 Jan  6  2005 compat-libstdc++-296-2.96-132.7.2.i386.rpm
-rw-r--r--  1 root root  231823 Jan  6  2005 compat-libstdc++-33-3.2.3-47.3.i386.rpm
-rw-r--r--  1 root root 4531353 Jan  6  2005 gcc-3.4.3-9.EL4.i386.rpm
-rw-r--r--  1 root root  343472 Jan  6  2005 make-3.80-5.i386.rpm
[root@oralinux ~]# rpm -ivh *.rpm
--[root@oralinux ~]# rpm -ivh libai*.rpm
warning: libaio-0.3.102-1.i386.rpm: V3 DSA signature: NOKEY, key ID db42a60e
Preparing...                ########################################### [100%]
   1:libaio                 ########################################### [ 50%]
   2:libaio-devel           ########################################### [100%]
   …………….
[root@oralinux ~]#

[root@oralinux /]# groupadd oinstall
[root@oralinux /]# groupadd dba
[root@oralinux /]# mkdir -p /u01/oracle
[root@oralinux /]# useradd -g oinstall -G dba -d /u01/oracle oracle
[root@oralinux /]# passwd oracle
Changing password for user oracle.
New UNIX password:
BAD PASSWORD: it is based on a dictionary word
Retype new UNIX password:
passwd: all authentication tokens updated successfully.
[root@oralinux /]# cd /
[root@oralinux /]# ls -l
total 174
drwxr-xr-x   2 root root  4096 Dec 25 01:40 bin
drwxr-xr-x   4 root root  1024 Dec 24 13:45 boot
drwxr-xr-x   7 root root  5400 Dec 25 00:23 dev
drwxr-xr-x  81 root root 12288 Dec 25 01:50 etc
drwxr-xr-x   2 root root  4096 Aug 13  2004 home
drwxr-xr-x   2 root root  4096 Aug 13  2004 initrd
drwxr-xr-x  11 root root  4096 Dec 25 01:37 lib
drwx------   2 root root 16384 Dec 24 21:56 lost+found
drwxr-xr-x   4 root root  4096 Dec 25 00:23 media
drwxr-xr-x   2 root root  4096 Dec  8  2004 misc
drwxr-xr-x   2 root root  4096 Aug 13  2004 mnt
drwxr-xr-x   2 root root  4096 Aug 13  2004 opt
dr-xr-xr-x  91 root root     0 Dec 25  2008 proc
drwxr-x---  13 root root  4096 Dec 25 01:28 root
drwxr-xr-x   2 root root 12288 Dec 25 01:41 sbin
drwxr-xr-x   2 root root  4096 Dec 24 13:42 selinux
drwxr-xr-x   2 root root  4096 Aug 13  2004 srv
drwxr-xr-x   9 root root     0 Dec 25  2008 sys
drwxr-xr-x   3 root root  4096 Dec 24 14:03 tftpboot
drwxrwxrwt   9 root root  4096 Dec 25 01:45 tmp
drwxr-xr-x   3 root root  4096 Dec 25 01:48 u01
drwxr-xr-x  14 root root  4096 Dec 24 13:45 usr
drwxr-xr-x  22 root root  4096 Dec 24 14:03 var
[root@oralinux /]# chown -R oracle:oinstall u01
[root@oralinux /]# ls -l
total 174
drwxr-xr-x   2 root   root      4096 Dec 25 01:40 bin
drwxr-xr-x   4 root   root      1024 Dec 24 13:45 boot
drwxr-xr-x   7 root   root      5400 Dec 25 00:23 dev
drwxr-xr-x  81 root   root     12288 Dec 25 01:50 etc
drwxr-xr-x   2 root   root      4096 Aug 13  2004 home
drwxr-xr-x   2 root   root      4096 Aug 13  2004 initrd
drwxr-xr-x  11 root   root      4096 Dec 25 01:37 lib
drwx------   2 root   root     16384 Dec 24 21:56 lost+found
drwxr-xr-x   4 root   root      4096 Dec 25 00:23 media
drwxr-xr-x   2 root   root      4096 Dec  8  2004 misc
drwxr-xr-x   2 root   root      4096 Aug 13  2004 mnt
drwxr-xr-x   2 root   root      4096 Aug 13  2004 opt
dr-xr-xr-x  91 root   root         0 Dec 25  2008 proc
drwxr-x---  13 root   root      4096 Dec 25 01:28 root
drwxr-xr-x   2 root   root     12288 Dec 25 01:41 sbin
drwxr-xr-x   2 root   root      4096 Dec 24 13:42 selinux
drwxr-xr-x   2 root   root      4096 Aug 13  2004 srv
drwxr-xr-x   9 root   root         0 Dec 25  2008 sys
drwxr-xr-x   3 root   root      4096 Dec 24 14:03 tftpboot
drwxrwxrwt   9 root   root      4096 Dec 25 01:45 tmp
drwxr-xr-x   3 oracle oinstall  4096 Dec 25 01:48 u01
drwxr-xr-x  14 root   root      4096 Dec 24 13:45 usr
drwxr-xr-x  22 root   root      4096 Dec 24 14:03 var
[root@oralinux /]# id nobody
uid=99(nobody) gid=99(nobody) groups=99(nobody)
[root@oralinux /]#
vi /etc/sysctl.conf
kernel.shmall = 2097152
kernel.shmmax = 2147483648
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
fs.file-max = 65536
net.ipv4.ip_local_port_range = 1024 65000
rmem_default = 262144
rmem_max = 262144
wmem_default = 262144
wmem_max = 262144
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
vi /etc/profile
if [ $USER = "oracle" ]; then
if [ $SHELL = "/bin/ksh" ]; then
ulimit -p 16384
ulimit -n 65536
else
ulimit -u 16384 -n 65536
fi
fi

[root@oralinux /]# su - oracle
[oracle@oralinux ~]$ ls
[oracle@oralinux ~]$ pwd
/u01/oracle
[oracle@oralinux ~]$ ls -la
total 36
drwxr-xr-x  3 oracle oinstall 4096 Dec 25 01:48 .
drwxr-xr-x  3 oracle oinstall 4096 Dec 25 01:48 ..
-rw-r--r--  1 oracle oinstall  304 Dec 25 01:48 .bash_logout
-rw-r--r--  1 oracle oinstall  191 Dec 25 01:48 .bash_profile
-rw-r--r--  1 oracle oinstall  124 Dec 25 01:48 .bashrc
-rw-r--r--  1 oracle oinstall  383 Dec 25 01:48 .emacs
-rw-r--r--  1 oracle oinstall  120 Dec 25 01:48 .gtkrc
drwxr-xr-x  3 oracle oinstall 4096 Dec 25 01:48 .kde
-rw-r--r--  1 oracle oinstall  658 Dec 25 01:48 .zshrc
[oracle@oralinux ~]$ vi .bash_profile
ORACLE_BASE=/u01
ORACLE_HOME=$ORACLE_BASE/oracle
ORACLE_SID=test
PATH=$ORACLE_HOME/bin:$PATH
export ORACLE_BASE ORACLE_HOME ORACLE_SID PATH

[oracle@oralinux ~]$ su - oracle
Password:
[oracle@oralinux ~]$ env |grep ORA
ORACLE_SID=test
ORACLE_BASE=/u01
ORACLE_HOME=/u01/oracle
[oracle@oralinux ~]$
su - root
[root@oralinux ~]# ls -l
total 665868
-rw-r--r--  1 root root 668734007 Dec 20 02:52 10201_database_linux32.zip
-rw-r--r--  1 root root      1465 Dec 24 14:07 anaconda-ks.cfg
-rw-r--r--  1 root root   3172244 Jan  6  2005 compat-gcc-32-3.2.3-47.3.i386.rpm
-rw-r--r--  1 root root   3863472 Jan  6  2005 compat-gcc-32-c++-3.2.3-47.3.i386.rpm
-rw-r--r--  1 root root    180344 Jan  6  2005 compat-libstdc++-296-2.96-132.7.2.i386.rpm
-rw-r--r--  1 root root    231823 Jan  6  2005 compat-libstdc++-33-3.2.3-47.3.i386.rpm
drwxr-xr-x  6 root root      4096 Jul  3  2005 database
drwxr-xr-x  2 root root      4096 Dec 24 14:18 Desktop
-rw-r--r--  1 root root   4531353 Jan  6  2005 gcc-3.4.3-9.EL4.i386.rpm
-rw-r--r--  1 root root     48567 Dec 24 14:07 install.log
-rw-r--r--  1 root root      5125 Dec 24 14:07 install.log.syslog
-rw-r--r--  1 root root    343472 Jan  6  2005 make-3.80-5.i386.rpm
[root@oralinux ~]# unzip 10201_database_linux32.zip
……………
[root@oralinux ~]# mv database/ /u01
[root@oralinux ~]# cd /u01
[root@oralinux u01]# ls -l
total 8
drwxr-xr-x  6 root   root     4096 Jul  3  2005 database
drwxr-xr-x  3 oracle oinstall 4096 Dec 25 02:13 oracle
[root@oralinux u01]# chown -R oracle:oinstall database
[root@oralinux u01]# cd database
vi /etc/hosts
192.168.23.152  oralinux
xhost +
su - oracle
cd /
ls
cd u01/database
./runInstaller
第38步过程中需要在root下执行
[root@oralinux ~]# /u01/oraInventory/orainstRoot.sh
Changing permissions of /u01/oraInventory to 770.
Changing groupname of /u01/oraInventory to oinstall.
The execution of the script. is complete
[root@oralinux ~]# /u01/oracle/root.sh
Running Oracle10 root.sh script...
The following environment variables are set as:
    ORACLE_OWNER= oracle
    ORACLE_HOME=  /u01/oracle
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...
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.

运行netca创建数据库 监听
运行dbca创建数据库实例
运行lsnrctl start启动数据库监听
安装时容易出现的问题:
在运行"./RunInstaller"可能会出现以下异常:
[oracle@oralinux]$ Xlib: connection to ":0.0" refused by server
Xlib: No protocol specified
Exception in thread "main" java .lang.InternalError: Can't connect to X11 window server using ':0.0' as the value of the DISPLAY variable.
         at sun.awt.X11GraphicsEnvironment.initDisplay(Native Method)
         at sun.awt.X11GraphicsEnvironment.<clinit>(Unknown Source)
         at java.lang.Class.forName0(Native Method)
         at java.lang.Class.forName(Unknown Source)
         at java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(Unknown Source)
         at java.awt.Window.init(Unknown Source)
         at java.awt.Window.<init>(Unknown Source)
         at java.awt.Frame.<init>(Unknown Source)
         at oracle.ewt.popup.PopupFrame.<init>(Unknown Source)
         at oracle.ewt.lwAWT.BufferedFrame.<init>(Unknown Source)
         at oracle.sysman.oio.oioc.OiocOneClickInstaller.<init>(OiocOneClickInstaller.java:378)
         at oracle.sysman.oio.oioc.OiocOneClickInstaller.main(OiocOneClickInstaller.java:2091)
相关解释为:
这个是因为XHOST的问题.具体解决方法就是在root的用户下执行 xhost +,然后再su - oracle,接来下就可以安装了,
xhost + 是使所有用户都能访问Xserver.

在AS4上安装完oracle10g以后,用DBCA创建数据库时,报告下面错误:
oraclewxxr1: error while loading shared libraries: libaio.so.1: cannot open shared object file: No such file or directory
ERROR:
ORA-12547: TNS:lost contact
〖Cause(原因)      〗
        ORA-12547错误的产生,是由于缺少RPM包libaio-0.3.93-4.i386.rpm所引起的。
〖Action(方法)     〗
Step1:下载libaio-0.3.93-4.i386.rpm包。
Step2:安装包。Rpt -ivh libaio*.rpm
 

你可能感兴趣的:(oracle,linux,职场,平台,休闲)