SuSE10下Oracle10g(根据XX系统)

 
1、删除系统自带的Oracle用户,添加新的Oracle用户
注释:
系统为何会有Oracle用户及组、因为安装系统时安装了orarun-1.9-21.24.i586.rpm包、所以现在要删除、自己创建、
如不删除、也没关系、就用系统创建好的、根据个人所定!
如图:
image
image
 
注意、选Details 、各种yes.
image
注意选项、所属组勾选users、dialout、dba(必选)、root等、这里我只选了dba.
image
finish.
image
2.改变属主
cd /opt
chown oracle:oinstall oracle
注释:
将档案 file1.txt 的拥有者设为 users 群体的使用者 jessie :
chown jessie:users file1.txt
3.检查下列包是否已安装
binutils-2.16.91.0.5
compat-libstdc++-5.0.7
glibc-2.4-31.2
glibc-devel-2.4-31.2
gcc-4.1.0
ksh-93r-12.9
libaio-0.3.104
libaio-devel-0.3.104
libelf-0.8.5
libgcc-4.1.0
libstdc++-4.1.0
libstdc++-devel-4.1.0
make-3.80
sysstat-6.0.2
unixODBC-2.2.11
unixODBC-devel-2.2.11
 
4.修改系统版本 改成9、因为SuSE10貌似不支持Oracle10g。
 
suse-linux:/ # vi /etc/SuSE-release
SUSE Linux Enterprise Server 9 (i586)
VERSION = 10
PATCHLEVEL = 2
 
5.修改内核参数
先用 root 用户修改 /etc/sysctl.conf 文件权限为 777
chmod 777 /etc/sysctl.conf
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
net.core.rmem_default=262144
net.core.wmem_default=262144
net.core.rmem_max=262144
net.core.wmem_max=262144
 
注释:
除去kernel.shmmax,其他参数的值基本不用变动。
Shmmax为共享内存,大小应为物理内存的一半;2147483648为2G(建议2G)
 
再用root用户执行下列命令使配置生效
suse-linux:/ # /sbin/sysctl -p
net.ipv4.icmp_echo_ignore_broadcasts = 1
net.ipv4.conf.all.rp_filter = 1
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
net.core.rmem_default = 262144
net.core.wmem_default = 262144
net.core.rmem_max = 262144
net.core.wmem_max = 262144

suse-linux:/ # /sbin/chkconfig boot.sysctl on
 
6.安装Oracle10g
两种情况:
(1)用SuSE自己的图形界面、需要logout退出root用户、不能直接su �C Oracle 、然后用Oracle登陆、不然会有冲突
export DISPLAY=:0.0

/media/oracle_database_10g/database/runInstaller �CignoreSysprereqs
注释:
如果是安装10.2版本是无法验证操作SUSE10操作系统的,所以需要添加“-ignoreSysprereqs”参数
(2)把图形导出到其它机器、在这里会用到Xmanager工具
打开Xmanager �C Passive
su - oracle
export DISPLAY=ip:0.0                ----导出图形界面机器的ip
 
oracle@suse-linux:/# /media/oracle_database_10g/database/runInstaller �CignoreSysprereqs
Starting Oracle Universal Installer...
Checking installer requirements...
Checking operating system version: must be redhat-3, SuSE-9, redhat-4, UnitedLinux-1.0, asianux-1 or asianux-2
                                      Passed
All installer requirements met.
Checking Temp space: must be greater than 80 MB.   Actual 54426 MB    Passed
Checking swap space: must be greater than 150 MB.   Actual 15970 MB    Passed
Checking monitor: must be configured to display at least 256 colors.    Actual 16777216    Passed
Preparing to launch Oracle Universal Installer from /tmp/OraInstall2010-03-14_09-47-20PM. Please wait ...oracle@suse-linux:/> Oracle Universal Installer, Version 10.2.0.1.0 Production
Copyright (C) 1999, 2005, Oracle. All rights reserved.
 
具体步骤基本上是按默认安装的、根据自己的情况而定 :
image
image 
image
image
image
点yes继续、不影响
image
这里可以直接创建数据库、也可以完成后再用dbca去创建。
image
image
image
image
image
image
 
indtall  开始安装:
image
安装完成、这里有2条命令
需要在root用户下去执行:
image
 
(1)
suse-linux:/ # /opt/oracle/oraInventory/orainstRoot.sh
Changing permissions of /opt/oracle/oraInventory to 770.
Changing groupname of /opt/oracle/oraInventory to oinstall.
The execution of the script is complete
(2)
suse-linux:/ # /opt/oracle/product/10.2/db_1/root.sh
Running Oracle10 root.sh script...
The following environment variables are set as:
    ORACLE_OWNER= oracle
    ORACLE_HOME=  /opt/oracle/product/10.2/db_1
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.
 
7.修改Oracle的环境变量
suse-linux:/ # su - oracle
oracle@suse-linux:~# cd /home/oracle/
oracle@suse-linux:~# vi .profile
添加:
export ORACLE_BASE= /opt/oracle/
export ORACLE_HOME= /opt/oracle/product/10.2/db_1
export ORACLE_SID= test
export ORACLE_TERM=xterm
export ORA_NLS33=$ORACLE_HOME/ocommon/nls/admin/data
LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib
export LD_LIBRARY_PATH
CLASSPATH=$CLASSPATH:$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib
CLASSPATH=$CLASSPATH:$ORACLE_HOME/network/jlib
export CLASSPATH
unset USERNAME
 
红色字体根据实际情况修改!
 
oracle@suse-linux:~# cd /home/oracle/
oracle@suse-linux:~# source .profile
oracle@suse-linux:~# sqlplus / as sysdba
SQL*Plus: Release 10.2.0.1.0 - Production on Sun Mar 14 22:23:08 2010
Copyright (c) 1982, 2005, Oracle.  All rights reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
SQL>
 
 
完了。。。

你可能感兴趣的:(oracle,职场,SuSE,oracle10g,休闲)