在redhat as 4下快速安装oracle 10gR2的步骤
时间:2011-03-04 来源:warehouse
讲课的时候经常安装,下面列出一个步骤供学员参考,安装rpm包这一步最好都能满足oracle的检查要求,内核参数如果只是学习用的话其实可以不设置,出现有关和内核参数相关的错误提示直接忽略就可以了。安装过程中最麻烦的其实就是安装rpm包和编辑内核参数了,其他的都非常容易...
--==========================
参考doc安装oracle环境需要的liunux rpm包
如:
rpm -Uvh compat-gcc-32-3.2.3-47.3.i386.rpm
rpm -Uvh compat-gcc-32-c++-3.2.3-47.3.i386.rpm
--==========================
根据自己的服务器配置以及环境需要编辑内核参数:/etc/sysctl.conf
kernel.shmall = 2097152
kernel.shmmax = 2147483648
kernel.shmmni = 4096
# semaphores: semmsl, semmns, semopm, semmni
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.rmem_max=262144
net.core.wmem_default=262144
net.core.wmem_max=262144
--===========================
--清除原有oracle用户、组、以及ORACLE_BASE目录
[root@node2 ~]# groupdel oinstall
groupdel: cannot remove user's primary group.
[root@node2 ~]# userdel oracle
[root@node2 ~]# groupdel oinstall
groupdel: cannot remove user's primary group.
[root@node2 ~]# groupdel dba
[root@node2 ~]# groupdel oinstall
groupdel: cannot remove user's primary group. GROUPDEL(8)
[root@node2 ~]#
[root@node2 ~]# ls
anaconda-ks.cfg Desktop install.log install.log.syslog
[root@node2 ~]# pwd
/root
[root@node2 ~]# cd /app
[root@node2 app]# ls
oracle
[root@node2 app]# cd oracle
[root@node2 oracle]# ls
admin agent10g agentDownload10.2.0.1.0Oui agentDownload.linux Desktop flash_recovery_area oradata oraInventory product
[root@node2 oracle]# pwd
/app/oracle
[root@node2 oracle]# cd ..
[root@node2 app]# rm -rf oracle
[root@node2 app]# groupdel oinstall
groupdel: cannot remove user's primary group.
[root@node2 app]# userdel oracle
userdel: user oracle does not exist
[root@node2 app]# userdel oracle1
[root@node2 app]# groupdel oinstall
[root@node2 app]# ls
--=======================================
--创建oracle用户以及组
[root@node2 app]# groupadd oinstall
[root@node2 app]# groupadd dba
[root@node2 app]# groupadd oper
[root@node2 app]# useradd -g oinstall -G dba oracle
[root@node2 app]# 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@node2 app]#
--===============================
--创建oracle主目录以及设置权限
[root@node2 app]# mkdir -p /app/oracle/product/10.2.0/db_1
[root@node2 app]# chown -R oracle.oinstall /app
[root@node2 app]# chmod -R 775 /app
[root@node2 app]#
--=============================
--在oracle用户的.bash_profile文件里增加下面环境变量
export ORACLE_BASE=/app/oracle/
export ORACLE_HOME=$ORACLE_BASE/product/10.2.0/db_1
export ORACLE_SID=test
export PATH=$ORACLE_HOME/bin:$PATH
--===============================
--以oracle用户登录x windows界面(切忌是oracle用户):
然后直接安装oracle即可
--==========================
参考doc安装oracle环境需要的liunux rpm包
如:
rpm -Uvh compat-gcc-32-3.2.3-47.3.i386.rpm
rpm -Uvh compat-gcc-32-c++-3.2.3-47.3.i386.rpm
--==========================
根据自己的服务器配置以及环境需要编辑内核参数:/etc/sysctl.conf
kernel.shmall = 2097152
kernel.shmmax = 2147483648
kernel.shmmni = 4096
# semaphores: semmsl, semmns, semopm, semmni
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.rmem_max=262144
net.core.wmem_default=262144
net.core.wmem_max=262144
--===========================
--清除原有oracle用户、组、以及ORACLE_BASE目录
[root@node2 ~]# groupdel oinstall
groupdel: cannot remove user's primary group.
[root@node2 ~]# userdel oracle
[root@node2 ~]# groupdel oinstall
groupdel: cannot remove user's primary group.
[root@node2 ~]# groupdel dba
[root@node2 ~]# groupdel oinstall
groupdel: cannot remove user's primary group. GROUPDEL(8)
[root@node2 ~]#
[root@node2 ~]# ls
anaconda-ks.cfg Desktop install.log install.log.syslog
[root@node2 ~]# pwd
/root
[root@node2 ~]# cd /app
[root@node2 app]# ls
oracle
[root@node2 app]# cd oracle
[root@node2 oracle]# ls
admin agent10g agentDownload10.2.0.1.0Oui agentDownload.linux Desktop flash_recovery_area oradata oraInventory product
[root@node2 oracle]# pwd
/app/oracle
[root@node2 oracle]# cd ..
[root@node2 app]# rm -rf oracle
[root@node2 app]# groupdel oinstall
groupdel: cannot remove user's primary group.
[root@node2 app]# userdel oracle
userdel: user oracle does not exist
[root@node2 app]# userdel oracle1
[root@node2 app]# groupdel oinstall
[root@node2 app]# ls
--=======================================
--创建oracle用户以及组
[root@node2 app]# groupadd oinstall
[root@node2 app]# groupadd dba
[root@node2 app]# groupadd oper
[root@node2 app]# useradd -g oinstall -G dba oracle
[root@node2 app]# 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@node2 app]#
--===============================
--创建oracle主目录以及设置权限
[root@node2 app]# mkdir -p /app/oracle/product/10.2.0/db_1
[root@node2 app]# chown -R oracle.oinstall /app
[root@node2 app]# chmod -R 775 /app
[root@node2 app]#
--=============================
--在oracle用户的.bash_profile文件里增加下面环境变量
export ORACLE_BASE=/app/oracle/
export ORACLE_HOME=$ORACLE_BASE/product/10.2.0/db_1
export ORACLE_SID=test
export PATH=$ORACLE_HOME/bin:$PATH
--===============================
--以oracle用户登录x windows界面(切忌是oracle用户):
然后直接安装oracle即可
相关阅读 更多 +