RHEL 5.4 安装 Oracle 10g R2

30 篇文章 0 订阅

[edgen@rhel54 ~]$ su
口令:
[root@rhel54 edgen]# su
[root@rhel54 edgen]# cd /
[root@rhel54 /]# grep MemTotal /proc/meminfo
MemTotal:      1909500 kB
[root@rhel54 /]# grep SwapTotal /proc/meminfo
SwapTotal:     4192956 kB
[root@rhel54 /]# df -h
文件系统              容量  已用 可用 已用% 挂载点
/dev/sda3             351G  3.2G  330G   1% /
/dev/sda5              97G  188M   92G   1% /data
/dev/sda1              99M   14M   81M  14% /boot
tmpfs                 933M     0  933M   0% /dev/shm
[root@rhel54 /]# rpm -q gcc make binutils openmotif setarch compat-db
gcc-4.1.2-46.el5
make-3.81-3.el5
binutils-2.17.50.0.6-12.el5
package openmotif is not installed
setarch-2.0-1.1
package compat-db is not installed

[root@rhel54 /]# mkdir /mnt/cdrom
[root@rhel54 /]# mount /dev/cdrom /mnt/cdrom/
mount: block device /dev/cdrom is write-protected, mounting read-only
[root@rhel54 /]# cd /mnt/cdrom/
[root@rhel54 cdrom]# cd Server/

[root@rhel54 Server]# ll | grep openmotif
-r--r--r-- 341 root root  1377121 2007-01-18 openmotif22-2.2.3-18.i386.rpm
-r--r--r-- 311 root root  1607576 2008-12-03 openmotif-2.3.1-2.el5.i386.rpm
-r--r--r-- 311 root root  3099372 2008-12-03 openmotif-devel-2.3.1-2.el5.i386.rpm
[root@rhel54 Server]# rpm -ivh openmotif-2.3.1-2.el5.i386.rpm
warning: openmotif-2.3.1-2.el5.i386.rpm: Header V3 DSA signature: NOKEY, key ID 37017186
error: Failed dependencies:
 libXp.so.6 is needed by openmotif-2.3.1-2.el5.i386
[root@rhel54 Server]# ll | grep libXp
-r--r--r-- 341 root root    22996 2007-07-26 libXp-1.0.0-8.1.el5.i386.rpm
-r--r--r-- 327 root root    15262 2007-07-26 libXp-devel-1.0.0-8.1.el5.i386.rpm
-r--r--r-- 342 root root    46205 2007-01-19 libXpm-3.5.5-3.i386.rpm
-r--r--r-- 327 root root    31567 2007-01-19 libXpm-devel-3.5.5-3.i386.rpm
[root@rhel54 Server]# rpm -ivh libXp-1.0.0-8.1.el5.i386.rpm
warning: libXp-1.0.0-8.1.el5.i386.rpm: Header V3 DSA signature: NOKEY, key ID 37017186
Preparing...                ########################################### [100%]
   1:libXp                  ########################################### [100%]
[root@rhel54 Server]# rpm -ivh libXp-devel-1.0.0-8.1.el5.i386.rpm
warning: libXp-devel-1.0.0-8.1.el5.i386.rpm: Header V3 DSA signature: NOKEY, key ID 37017186
Preparing...                ########################################### [100%]
   1:libXp-devel            ########################################### [100%]
[root@rhel54 Server]# rpm -ivh openmotif-2.3.1-2.el5.i386.rpm
warning: openmotif-2.3.1-2.el5.i386.rpm: Header V3 DSA signature: NOKEY, key ID 37017186
Preparing...                ########################################### [100%]
   1:openmotif              ########################################### [100%]
[root@rhel54 Server]# rpm -ivh openmotif-devel-2.3.1-2.el5.i386.rpm
warning: openmotif-devel-2.3.1-2.el5.i386.rpm: Header V3 DSA signature: NOKEY, key ID 37017186
Preparing...                ########################################### [100%]
   1:openmotif-devel        ########################################### [100%]

[root@rhel54 Server]# rpm -q gcc make binutils openmotif setarch compat-db
gcc-4.1.2-46.el5
make-3.81-3.el5
binutils-2.17.50.0.6-12.el5
openmotif-2.3.1-2.el5
setarch-2.0-1.1
package compat-db is not installed

[root@rhel54 Server]# pwd
/mnt/cdrom/Server
[root@rhel54 Server]# ll | grep compat-db
-r--r--r-- 341 root root  1756815 2007-01-19 compat-db-4.2.52-5.1.i386.rpm
[root@rhel54 Server]# rpm -ivh compat-db-4.2.52-5.1.i386.rpm
warning: compat-db-4.2.52-5.1.i386.rpm: Header V3 DSA signature: NOKEY, key ID 37017186
Preparing...                ########################################### [100%]
   1:compat-db              ########################################### [100%]

[root@rhel54 Server]# rpm -q gcc make binutils openmotif setarch compat-db
gcc-4.1.2-46.el5
make-3.81-3.el5
binutils-2.17.50.0.6-12.el5
openmotif-2.3.1-2.el5
setarch-2.0-1.1
compat-db-4.2.52-5.1

 

 


[root@rhel54 Server]# groupadd oinstall
bash: groupadd: command not found
[root@rhel54 Server]# exit
exit
[root@rhel54 edgen]# su - root

[root@rhel54 ~]# groupadd oinstall
[root@rhel54 ~]# groupadd dba
[root@rhel54 ~]# useradd -m -g oinstall -G dba oracle
[root@rhel54 ~]# id oracle
uid=501(oracle) gid=501(oinstall) groups=501(oinstall),502(dba) context=user_u:system_r:unconfined_t
[root@rhel54 ~]# passwd oracle
New UNIX password:
Retype new UNIX password:
passwd: all authentication tokens updated successfully.


[root@rhel54 ~]# mkdir -p /app/oracle
[root@rhel54 ~]# mkdir /data/oracle
[root@rhel54 ~]# chown -R oracle:oinstall /app/oracle/ /data/oracle/
[root@rhel54 ~]# chmod -R 755 /app/oracle/ /data/oracle/

 

[root@rhel54 ~]# vi ~oracle/.bash_profile
[root@rhel54 ~]# cat ~oracle/.bash_profile
# .bash_profile
...
...
TMP=/tmp;
export TMP
TMPDIR=$TMP;
export TMPDIR
ORACLE_BASE=/app/oracle;
export ORACLE_BASE
ORACLE_HOME=$ORACLE_BASE/product/10.2.0/db_1;
export ORACLE_HOME
ORACLE_SID=orcl;
export ORACLE_SID
ORACLE_TERM=xterm;
export ORACLE_TERM
PATH=/usr/sbin:$ORACLE_HOME/bin:$PATH;
export PATH
LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib;
export LD_LIBRARY_PATH
CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib;
export CLASSPATH

 

unset USERNAME

 

 

 

[root@rhel54 ~]# vi /etc/sysctl.conf
[root@rhel54 ~]# sysctl -p
...
...
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 = 1048576
net.core.rmem_max = 1048576
net.core.wmem_default = 262144
net.core.wmem_max = 262144

 

[root@rhel54 ~]# vi /etc/security/limits.conf
[root@rhel54 ~]# cat /etc/security/limits.conf | grep oracle
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536

 

[root@rhel54 ~]# vi /etc/pam.d/login
[root@rhel54 ~]# cat /etc/pam.d/login | grep pam_limits.so
session required /lib/security/pam_limits.so

 

[root@rhel54 ~]# vi /etc/profile
[root@rhel54 ~]# cat /etc/profile
# /etc/profile
...
...
if [ $USER = "oracle" ]; then
 if [ $SHELL = "/bin/ksh" ]; then
  ulimit -p 16384
  ulimit -n 65536
 else
  ulimit -u 16384 -n 65536
 fi
 umask 022
fi

 

[root@rhel54 ~]# vi /etc/csh.login
[root@rhel54 ~]# cat /etc/csh.login
# /etc/csh.login
...
...
if ( $USER == "oracle" ) then
 limit maxproc 16384
 limit descriptors 65536
 umask 022
endif

 

 

 

[root@rhel54 ~]# vi /etc/redhat-release
[root@rhel54 ~]# cat /etc/redhat-release
#Red Hat Enterprise Linux Server release 5.4 (Tikanga)
redhat4


[root@rhel54 ~]# cd /opt/tools
[root@rhel54 tools]# ll | grep database
-rw-rw-r-- 1 edgen edgen 668734007 12-31 17:43 10201_database_linux32.zip
[root@rhel54 tools]# unzip  10201_database_linux32.zip
[root@rhel54 tools]# ll | grep database
-rw-rw-r-- 1 edgen edgen 668734007 12-31 17:43 10201_database_linux32.zip
drwxr-xr-x 6 root  root       4096 2005-07-03 database
[root@rhel54 tools]# chmod -R 775 /opt/tools/database
[root@rhel54 tools]# reboot

 

 


[edgen@rhel54 ~]$ su - oracle
口令:
[oracle@rhel54 ~]$ unset LANG
[oracle@rhel54 ~]$ locale
LANG=
LC_CTYPE="POSIX"
LC_NUMERIC="POSIX"
LC_TIME="POSIX"
LC_COLLATE="POSIX"
LC_MONETARY="POSIX"
LC_MESSAGES="POSIX"
LC_PAPER="POSIX"
LC_NAME="POSIX"
LC_ADDRESS="POSIX"
LC_TELEPHONE="POSIX"
LC_MEASUREMENT="POSIX"
LC_IDENTIFICATION="POSIX"
LC_ALL=
[oracle@rhel54 ~]$ cd /opt/tools/database/
[oracle@rhel54 database]$ ll
total 52
drwxrwxr-x 9 root root 4096 Jul  3  2005 doc
drwxrwxr-x 5 root root 4096 Jul  3  2005 install
drwxrwxr-x 2 root root 4096 Jul  3  2005 response
-rwxrwxr-x 1 root root 1327 Jul  3  2005 runInstaller
drwxrwxr-x 9 root root 4096 Jul  3  2005 stage
-rwxrwxr-x 1 root root 5213 Jul  3  2005 welcome.html
[oracle@rhel54 database]$ ./runInstaller



 



 



 



 



 

[edgen@rhel54 ~]$ su - root
口令:
[root@rhel54 ~]# sh /app/oracle/oraInventory/orainstRoot.sh
Changing permissions of /app/oracle/oraInventory to 770.
Changing groupname of /app/oracle/oraInventory to oinstall.
The execution of the script is complete


[root@rhel54 ~]# sh /app/oracle/product/10.2.0/db_1/root.sh
Running Oracle10 root.sh script...

The following environment variables are set as:
    ORACLE_OWNER= oracle
    ORACLE_HOME=  /app/oracle/product/10.2.0/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.

 

[root@rhel54 ~]# cat /etc/oratab
orcl:/app/oracle/product/10.2.0/db_1:N



[root@rhel54 ~]# exit
logout

 

 


[edgen@rhel54 ~]$ su - root
口令:
[root@rhel54 ~]# vi /etc/redhat-release
[root@rhel54 ~]# cat /etc/redhat-release
Red Hat Enterprise Linux Server release 5.4 (Tikanga)


[root@rhel54 ~]# reboot

  • 大小: 109.8 KB
  • 大小: 74 KB
  • 大小: 119.4 KB
  • 大小: 98.7 KB
  • 大小: 51.5 KB
  • 大小: 68.4 KB
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
以下是在RHEL 7.8上安装Oracle 11g的基本步骤: 1. 安装必要的软件包 在RHEL 7.8上安装Oracle 11g需要安装一些必要的软件包,包括gcc、glibc、libstdc++、make、binutils、compat-libstdc++等。可以使用以下命令安装这些软件包: ``` sudo yum install gcc glibc libstdc++ make binutils compat-libstdc++ ``` 2. 创建Oracle用户和组 在安装Oracle 11g之前,需要创建一个名为oracle的用户和一个名为oinstall的组。可以使用以下命令创建这些用户和组: ``` sudo groupadd oinstall sudo groupadd dba sudo useradd -g oinstall -G dba oracle ``` 3. 配置内核参数和资源限制 在安装Oracle 11g之前,需要将一些内核参数和资源限制配置为Oracle建议的值。可以编辑/etc/sysctl.conf文件并添加以下行: ``` fs.file-max = 6815744 kernel.sem = 250 32000 100 128 kernel.shmmni = 4096 kernel.shmall = 1073741824 kernel.shmmax = 4398046511104 net.core.rmem_default = 262144 net.core.rmem_max = 4194304 net.core.wmem_default = 262144 net.core.wmem_max = 1048576 fs.aio-max-nr = 1048576 ``` 然后重新加载sysctl.conf文件中的参数: ``` sudo sysctl -p ``` 还需要编辑/etc/security/limits.conf文件并添加以下行: ``` oracle soft nproc 2047 oracle hard nproc 16384 oracle soft nofile 1024 oracle hard nofile 65536 ``` 4. 配置环境变量 在安装Oracle 11g之前,需要将一些环境变量设置为Oracle建议的值。可以编辑/etc/profile文件并添加以下行: ``` export ORACLE_BASE=/u01/app/oracle export ORACLE_HOME=$ORACLE_BASE/product/11.2.0/dbhome_1 export ORACLE_SID=orcl export PATH=$PATH:$ORACLE_HOME/bin ``` 然后重新加载profile文件中的变量: ``` source /etc/profile ``` 5. 下载并解压Oracle 11g 可以从Oracle官方网站下载Oracle 11g的安装文件(例如linux.x64_11gR2_database_1of2.zip和linux.x64_11gR2_database_2of2.zip),然后使用unzip命令解压文件: ``` unzip linux.x64_11gR2_database_1of2.zip unzip linux.x64_11gR2_database_2of2.zip ``` 6. 运行安装程序 在解压后的目录中,可以找到一个名为runInstaller的脚本,可以使用root用户执行此脚本来启动安装程序: ``` sudo ./runInstaller ``` 按照安装程序的指示进行安装,包括选择安装类型、指定Oracle安装路径、创建数据库、设置管理员密码等。 7. 完成安装 安装程序完成后,可以使用oracle用户登录到新安装Oracle数据库中,并且可以使用sqlplus等工具测试数据库是否正常运行。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值