共计 12128 个字符,预计需要花费 31 分钟才能阅读完成。
1、检查系统,看是否满足 Oracle10G 的安装条件。
①硬件条件:
内存:Memory >= 1024M
交换空间:Swap
Memory <= 1024M Swap = 2*Memory
1024M < Memory <=2048MSwap = 1.5*Memory
2048M < Memory <= 8192MSwap = Memory
Memory > 8192MSwap = 0.75*Memory
temp 分区:/temp >= 400M
1.5G 到 3.5G 的磁盘空间存放 Oracle 软件;
1.2G 的磁盘空间供 Oracle 软件缓冲( 这个我个人感觉主要是解压缩释放需要临时存储 )。
②硬件查询 shell 命令
查内存(Memory):
grep MemTotal /proc/Meminfo
查交换空间(Swap):
grep SwapTotal /proc/meminfo
查内存和交换空间爱你的使用情况:
free
查 temp 分区的大小 (单位 K):
df -k /tmp
查看 CPU 是否适合安装 Oracle(这步没什么必要):
grep "model name" /proc/cpuinfo
2、安装 Oracle 所需要的依赖包:
①64 位 CentOS 需要如下安装包:
yum install binutils-2.17.50.0.6-2.el5 compat-db-4.2.52-5.1 compat-gcc-34-3.4.6-4 compat-gcc-34-c++-3.4.6-4 compat-libstdc++-33-3.2.3-61 compat-libstdc++-33-3.2.3-61 compat-libstdc++-296 gcc-4.1.1-52.el5.2 gcc-c++-4.1.1-52.el5.2 glibc-2.5-12 glibc-2.5-12 glibc-common-2.5-12 glibc-devel-2.5-12 glibc-devel-2.5-12 glibc-headers-2.5-12 libgcc-4.1.1-52.el5 libXp-1.0.0 libXt-1.0.2 libXtst-1.0.1 libaio-0.3.106-3.2 libaio-devel-0.3.106-3.2 libgcc-4.1.1-52.el5 libstdc++-4.1.1-52.el5.2 libstdc++-devel-4.1.1-52.el5.2 libgomp-4.1.1-52.EL5 make-3.81-1.1 numactl-devel-0.9.8.x86_64 sysstat-7.0.0-3.el5
②或者利用挂载光盘镜像,利用 rpm 的本地安装
rpm -Uvh binutils-2.*
rpm -Uvh glibc-2*
rpm -Uvh glibc-common-2.*
rpm -Uvh libaio-0*
rpm -Uvh libgcc-4.*
rpm -Uvh libstdc++-4.*
rpm -Uvh make-3*
rpm -Uvh setarch-2*
rpm -Uvh glibc-devel-2.*
rpm -Uvh gcc-4*
rpm -Uvh gcc-c++-4.*
rpm -Uvh libstdc++-devel-4.*
rpm -Uvh compat-db-4*
rpm -Uvh compat-gcc-34-3*
rpm -Uvh compat-gcc-34-c++-3*
rpm -Uvh compat-libstdc++-33-3*
rpm -Uvh libaio-devel-0.*
rpm -Uvh libXp-1*
rpm -Uvh openmotif-2*
rpm -Uvh sysstat-7.*
③文件系统的设置
[root@localhost CentOS]# mkdir /u02// 创建 Oracle 备份文件夹
④配置 /etc/sysctl.conf 文件:
# +---------------------------------------------------------+
# | SHARED MEMORY |
# +---------------------------------------------------------+
kernel.shmmni = 4096
# +---------------------------------------------------------+
# | SEMAPHORES |
# | ---------- |
# | |
# | SEMMSL_value SEMMNS_value SEMOPM_value SEMMNI_value |
# | |
# +---------------------------------------------------------+
kernel.sem = 250 32000 100 128
# +---------------------------------------------------------+
# | FILE HANDLES |
# ----------------------------------------------------------+
fs.file-max = 65536
# +---------------------------------------------------------+
# | LOCAL IP RANGE |
# ----------------------------------------------------------+
net.ipv4.ip_local_port_range = 1024 65000
# +---------------------------------------------------------+
# | NETWORKING |
# ----------------------------------------------------------+
net.core.rmem_default = 1048576
net.core.rmem_max = 1048576
net.core.wmem_default = 262144
net.core.wmem_max = 262144
⑤从新引导 /etc/sysctl.conf 该文件:
[root@localhost /]# /sbin/sysctl -p
⑥配置 Oracle 用户使用 shell 所需要的配置
[root@localhost /]# cat>> /etc/security/limits.conf <<EOF
> oracle soft nproc 2047
> oracle hard nproc 16348
> oracle soft nofile 1024
> oracle hard nofile 65536
> EOF
// 配置 /etc/pam.d/login
[root@localhost /]# cat >> /etc/pam.d/login <<EOF
> session required /lib/security/pam_limits.so
> EOF
⑦创建 Oracle 用户组和用户
⑧创建数据库文件目录 u01、u01
# chmod -R 775 /u01/app/oracle
# chown oracle:oinstall /u02/oradata
# chmod 775 /u02/oradata
# mkdir -p /u02/flash_recovery_area
# chown oracle:oinstall /u02/flash_recovery_area
# chmod 775 /u02/flash_recovery_area
⑨配置 Oracle 的.bash_profile 文件,添加如下内容,保存,创建环境变量
# .bash_profile
# Get the aliases and functions
if [-f ~/.bashrc]; then
. ~/.bashrc
fi
alias ls="ls -FA"
alias s="screen -DRRS iPad -t iPad"
export JAVA_HOME=/usr/local/java
# User specific environment and startup programs
export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=$ORACLE_BASE/product/10.2.0/db_1
export ORACLE_PATH=$ORACLE_BASE/dba_scripts/sql:.:$ORACLE_HOME/rdbms/admin
export ORACLE_SID=TESTDB
export PATH=.:${JAVA_HOME}/bin:$JAVA_HOME/db/bin:${PATH}:$HOME/bin:$ORACLE_HOME/bin
export PATH=${PATH}:/usr/bin:/bin:/usr/bin/X11:/usr/local/bin
export PATH=${PATH}:$ORACLE_BASE/dba_scripts/bin
export ORACLE_TERM=xterm
export TNS_ADMIN=$ORACLE_HOME/network/admin
export ORA_NLS10=$ORACLE_HOME/nls/data
export NLS_DATE_FORMAT="DD-MON-YYYY HH24:MI:SS"
export LD_LIBRARY_PATH=$ORACLE_HOME/lib
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:$ORACLE_HOME/oracm/lib
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/lib:/usr/lib:/usr/local/lib
export CLASSPATH=$ORACLE_HOME/JRE
export CLASSPATH=${CLASSPATH}:$ORACLE_HOME/jlib
export CLASSPATH=${CLASSPATH}:$ORACLE_HOME/rdbms/jlib
export CLASSPATH=${CLASSPATH}:$ORACLE_HOME/oc4j/ant/lib/ant.jar
export CLASSPATH=${CLASSPATH}:$ORACLE_HOME/oc4j/ant/lib/ant-launcher.jar
export CLASSPATH=${CLASSPATH}:$JAVA_HOME/db/lib/derby.jar
export CLASSPATH=${CLASSPATH}:$ORACLE_HOME/network/jlib
export THREADS_FLAG=native
export TEMP=/tmp
export TMPDIR=/tmp
3、设置远程桌面连接
VNCSERVERS="1:root 2:oracle"
VNCSERVERARGS[1]="-geometry 1200x720"
VNCSERVERARGS[2]="-geometry 1200x720"
保存,并推出。
4、上传需要安装的 Oracle10G 和升级补丁
更多详情见请继续阅读下一页的精彩内容 :http://www.linuxidc.com/Linux/2016-05/131089p2.htm
安装篇:
其实安装准备做好了之后,安装 Oracle 软件是一件非常简单的事情,一下就是我安装 oracle 的步骤。
①上传 oracle 安装软件
我要装的是 10201_database_linux_x86_64.cpio,所以我先上传,然后解压该文件。
解压命令:cpio idmv < 10201_database_linux_x86_64.cpio
②修改 /etc/RedHat-release 文件
在 Oracle 设置的默认安装操作系统中是没有 CentOS 的,所以要将该文件中的 Centos 操作系统版本信息改为可安装的,一般都是伪装成 Redhat。
先备份该文件:cp /etc/redhat-release /etc/redhat-release.bak
修改文件:echo“redhat”> /etc/redhat-release
③安装 oracle
利用 vnc 远程登录服务器 oracle 账户,进入被解压的 oracle 软件目录 database。
安装命令:./runInstaller
④安装完毕
升级篇
./runInstaller -ignoreSysPrereqs
更多 Oracle 相关信息见 Oracle 专题页面 http://www.linuxidc.com/topicnews.aspx?tid=12
本文永久更新链接地址 :http://www.linuxidc.com/Linux/2016-05/131089.htm
1、检查系统,看是否满足 Oracle10G 的安装条件。
①硬件条件:
内存:Memory >= 1024M
交换空间:Swap
Memory <= 1024M Swap = 2*Memory
1024M < Memory <=2048MSwap = 1.5*Memory
2048M < Memory <= 8192MSwap = Memory
Memory > 8192MSwap = 0.75*Memory
temp 分区:/temp >= 400M
1.5G 到 3.5G 的磁盘空间存放 Oracle 软件;
1.2G 的磁盘空间供 Oracle 软件缓冲( 这个我个人感觉主要是解压缩释放需要临时存储 )。
②硬件查询 shell 命令
查内存(Memory):
grep MemTotal /proc/Meminfo
查交换空间(Swap):
grep SwapTotal /proc/meminfo
查内存和交换空间爱你的使用情况:
free
查 temp 分区的大小 (单位 K):
df -k /tmp
查看 CPU 是否适合安装 Oracle(这步没什么必要):
grep "model name" /proc/cpuinfo
2、安装 Oracle 所需要的依赖包:
①64 位 CentOS 需要如下安装包:
yum install binutils-2.17.50.0.6-2.el5 compat-db-4.2.52-5.1 compat-gcc-34-3.4.6-4 compat-gcc-34-c++-3.4.6-4 compat-libstdc++-33-3.2.3-61 compat-libstdc++-33-3.2.3-61 compat-libstdc++-296 gcc-4.1.1-52.el5.2 gcc-c++-4.1.1-52.el5.2 glibc-2.5-12 glibc-2.5-12 glibc-common-2.5-12 glibc-devel-2.5-12 glibc-devel-2.5-12 glibc-headers-2.5-12 libgcc-4.1.1-52.el5 libXp-1.0.0 libXt-1.0.2 libXtst-1.0.1 libaio-0.3.106-3.2 libaio-devel-0.3.106-3.2 libgcc-4.1.1-52.el5 libstdc++-4.1.1-52.el5.2 libstdc++-devel-4.1.1-52.el5.2 libgomp-4.1.1-52.EL5 make-3.81-1.1 numactl-devel-0.9.8.x86_64 sysstat-7.0.0-3.el5
②或者利用挂载光盘镜像,利用 rpm 的本地安装
rpm -Uvh binutils-2.*
rpm -Uvh glibc-2*
rpm -Uvh glibc-common-2.*
rpm -Uvh libaio-0*
rpm -Uvh libgcc-4.*
rpm -Uvh libstdc++-4.*
rpm -Uvh make-3*
rpm -Uvh setarch-2*
rpm -Uvh glibc-devel-2.*
rpm -Uvh gcc-4*
rpm -Uvh gcc-c++-4.*
rpm -Uvh libstdc++-devel-4.*
rpm -Uvh compat-db-4*
rpm -Uvh compat-gcc-34-3*
rpm -Uvh compat-gcc-34-c++-3*
rpm -Uvh compat-libstdc++-33-3*
rpm -Uvh libaio-devel-0.*
rpm -Uvh libXp-1*
rpm -Uvh openmotif-2*
rpm -Uvh sysstat-7.*
③文件系统的设置
[root@localhost CentOS]# mkdir /u02// 创建 Oracle 备份文件夹
④配置 /etc/sysctl.conf 文件:
# +---------------------------------------------------------+
# | SHARED MEMORY |
# +---------------------------------------------------------+
kernel.shmmni = 4096
# +---------------------------------------------------------+
# | SEMAPHORES |
# | ---------- |
# | |
# | SEMMSL_value SEMMNS_value SEMOPM_value SEMMNI_value |
# | |
# +---------------------------------------------------------+
kernel.sem = 250 32000 100 128
# +---------------------------------------------------------+
# | FILE HANDLES |
# ----------------------------------------------------------+
fs.file-max = 65536
# +---------------------------------------------------------+
# | LOCAL IP RANGE |
# ----------------------------------------------------------+
net.ipv4.ip_local_port_range = 1024 65000
# +---------------------------------------------------------+
# | NETWORKING |
# ----------------------------------------------------------+
net.core.rmem_default = 1048576
net.core.rmem_max = 1048576
net.core.wmem_default = 262144
net.core.wmem_max = 262144
⑤从新引导 /etc/sysctl.conf 该文件:
[root@localhost /]# /sbin/sysctl -p
⑥配置 Oracle 用户使用 shell 所需要的配置
[root@localhost /]# cat>> /etc/security/limits.conf <<EOF
> oracle soft nproc 2047
> oracle hard nproc 16348
> oracle soft nofile 1024
> oracle hard nofile 65536
> EOF
// 配置 /etc/pam.d/login
[root@localhost /]# cat >> /etc/pam.d/login <<EOF
> session required /lib/security/pam_limits.so
> EOF
⑦创建 Oracle 用户组和用户
⑧创建数据库文件目录 u01、u01
# chmod -R 775 /u01/app/oracle
# chown oracle:oinstall /u02/oradata
# chmod 775 /u02/oradata
# mkdir -p /u02/flash_recovery_area
# chown oracle:oinstall /u02/flash_recovery_area
# chmod 775 /u02/flash_recovery_area
⑨配置 Oracle 的.bash_profile 文件,添加如下内容,保存,创建环境变量
# .bash_profile
# Get the aliases and functions
if [-f ~/.bashrc]; then
. ~/.bashrc
fi
alias ls="ls -FA"
alias s="screen -DRRS iPad -t iPad"
export JAVA_HOME=/usr/local/java
# User specific environment and startup programs
export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=$ORACLE_BASE/product/10.2.0/db_1
export ORACLE_PATH=$ORACLE_BASE/dba_scripts/sql:.:$ORACLE_HOME/rdbms/admin
export ORACLE_SID=TESTDB
export PATH=.:${JAVA_HOME}/bin:$JAVA_HOME/db/bin:${PATH}:$HOME/bin:$ORACLE_HOME/bin
export PATH=${PATH}:/usr/bin:/bin:/usr/bin/X11:/usr/local/bin
export PATH=${PATH}:$ORACLE_BASE/dba_scripts/bin
export ORACLE_TERM=xterm
export TNS_ADMIN=$ORACLE_HOME/network/admin
export ORA_NLS10=$ORACLE_HOME/nls/data
export NLS_DATE_FORMAT="DD-MON-YYYY HH24:MI:SS"
export LD_LIBRARY_PATH=$ORACLE_HOME/lib
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:$ORACLE_HOME/oracm/lib
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/lib:/usr/lib:/usr/local/lib
export CLASSPATH=$ORACLE_HOME/JRE
export CLASSPATH=${CLASSPATH}:$ORACLE_HOME/jlib
export CLASSPATH=${CLASSPATH}:$ORACLE_HOME/rdbms/jlib
export CLASSPATH=${CLASSPATH}:$ORACLE_HOME/oc4j/ant/lib/ant.jar
export CLASSPATH=${CLASSPATH}:$ORACLE_HOME/oc4j/ant/lib/ant-launcher.jar
export CLASSPATH=${CLASSPATH}:$JAVA_HOME/db/lib/derby.jar
export CLASSPATH=${CLASSPATH}:$ORACLE_HOME/network/jlib
export THREADS_FLAG=native
export TEMP=/tmp
export TMPDIR=/tmp
3、设置远程桌面连接
VNCSERVERS="1:root 2:oracle"
VNCSERVERARGS[1]="-geometry 1200x720"
VNCSERVERARGS[2]="-geometry 1200x720"
保存,并推出。
4、上传需要安装的 Oracle10G 和升级补丁
更多详情见请继续阅读下一页的精彩内容 :http://www.linuxidc.com/Linux/2016-05/131089p2.htm