1.安装前装备

1.1 硬件要求
要求 查看方式
内存 至少1G内存 grep MemTotal /proc/meminfo
SWAP
如果内存为大于512M则swap大小为内存2倍
如果内存在1到2G之间则swap大小为内存1.5倍
如果内存在2到8G之间则swap大小为内存1倍
如果内存大于8G则swap大小为内存0.75倍
grep SwapTotal /proc/meminfo
磁盘
/tmp目录至少400MB
oracle安装目录大约在1.5到3.5G之间
数据文件至少1.2G
df -h
1.2软件要求
CentOS5.6标准安装,使用YUM安装以下所需软件
yum install -y compat-db pdksh sysstat screen libXp compat-libstdc++*
Red Hat Enterprise Linux 4.0需安装以下所需软件包
binutils-2.15.92.0.2-10.EL4
compat-db-4.1.25-9
control-center-2.8.0-12
gcc-3.4.3-9.EL4
gcc-c++-3.4.3-9.EL4
glibc-2.3.4-2
glibc-common-2.3.4-2
gnome-libs-1.4.1.2.90-44.1
libstdc++-3.4.3-9.EL4
libstdc++-devel-3.4.3-9.EL4
make-3.80-5
pdksh-5.2.14-30
sysstat-5.0.5-1
xscreensaver-4.18-5.rhel4.2

1.3添加用户及用户组
添加必要的用户组:/usr/sbin/groupadd oinstall
/usr/sbin/groupadd dba
/usr/sbin/groupadd oper

建立oracle用户
/usr/sbin/useradd -g oinstall -G dba,oper oracle
配置oracle的密码:
passwd oracle

1.4配置内核参数、修改用户环境变量
编辑/etc/sysctl.conf文件,在此文件中加入:
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.rmem_max = 262144
net.core.wmem_default = 262144
net.core.wmem_max = 262144

运行命令: sysctl -p 使设置生效
编辑/etc/security/limits.conf文件,加入以下内容:
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536
编辑/etc/pam.d/login文件,加入以下内容:
session required pam_limits.so
同时在/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
在/etc/profile文件中加入以下内容:
ORACLE_BASE="/opt/app/oracle"
export ORACLE_BASE
ORACLE_HOME=$ORACLE_BASE"/product/10.2.0/db_1"
ORACLE_SID=xmydlinux
#此SID在后面安装时需要填入和这里配置一样的
export ORACLE_HOME ORACLE_SID
vi /etc/redhat-release,修改redhat-release文件内容如下:(10G默认不支持5.6版本,修改掉此信息可略过错误)
redhat-4
修改oracle用户的环境配置文件
执行:su oracle 切换到oracle用户环境,然后编辑 .bash_profile 文件,更改PATH的配置,同时在环境变量中增加NLS_LANG的配置。如下:
PATH=$PATH:$HOME/bin:$ORACLE_HOME/bin
export PATH
export NLS_LANG=AMERICAN_AMERICA.ZHS16GBK
1.5 创建目录
创建ORACLE_BASE目录: mkdir -p /opt/app/oracle
权限设置: chown -R oracle:oinstall /opt/app/
2.安装
2.1 切换至oracle用户,copy 10201_database_linux32.zip文件到/OPT目录。执行:unzip 10201_database_linux32.zip解压10g文件。
执行:export LANG=en_US (防止乱码)
2.2  执行:/opt/database/runInstaller
CentOS5.6环境安装oracle 10g(完整版)
选择安装方法,建议选择高级模式,如下图所示:
CentOS5.6环境安装oracle 10g(完整版)
点击“next”,进入下一步骤
CentOS5.6环境安装oracle 10g(完整版)
使用默认配置,点击“next”进入下一步骤
CentOS5.6环境安装oracle 10g(完整版)
选择数据库版本,选择“企业版”,点击“产品语言”,出现下图对话框
CentOS5.6环境安装oracle 10g(完整版)
在对话框中添加“简体中文”,点击“OK”,进入下一步
CentOS5.6环境安装oracle 10g(完整版)
使用默认的安装目录,点击“next”进入下一步骤
CentOS5.6环境安装oracle 10g(完整版)
进行数据库安装前检查,如上图所示,检查通过,如果没有任何错误,点击“next”
CentOS5.6环境安装oracle 10g(完整版)
此处选择“只安装数据库软件”,点击“next”,进入下一步骤
CentOS5.6环境安装oracle 10g(完整版)
点击“install”,进行安装
CentOS5.6环境安装oracle 10g(完整版)
正在安装,如上图所示安装完成后点击“OK”
CentOS5.6环境安装oracle 10g(完整版)
用root用户,运行以下脚本:
/opt/app/oracle/oraInventory/orainstRoot.sh
/opt/app/oracle/product/10.2.0/db_1/root.sh
[root@xmydlinux]# /opt/app/oracle/oraInventory/orainstRoot.sh
Changing permissions of /opt/app/oracle/oraInventory to 770.
Changing groupname of /opt/app/oracle/oraInventory to oinstall.
The execution of the script is complete
[root@xmydlinux]# /opt/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=  /opt/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.
此时数据库软件的安装完成。
3.创建数据库
数据库软件安装完成后还需要创建数据库实例,在原来运行runInstall的终端中运行dbca命令,运行此命令后,将会在本地的xmanager-passive的显示如下界面:
CentOS5.6环境安装oracle 10g(完整版)
点击“next”进行配置
CentOS5.6环境安装oracle 10g(完整版)
选择“create a database”进行创建数据库,点击“Next”进入下一步
CentOS5.6环境安装oracle 10g(完整版)
勾选“Create Database”,点击“Finish”进入下一步
CentOS5.6环境安装oracle 10g(完整版)
选择“General Purpose”,点击“Next”,进入下一步,
CentOS5.6环境安装oracle 10g(完整版)
输入SID,此处输入的SID应该与环境变量的中设置的SID一致,注意区分大小写。点击“Next”进入下一步,
CentOS5.6环境安装oracle 10g(完整版)
点击“Next”进入下一步
CentOS5.6环境安装oracle 10g(完整版)
输入密码,点击“Next”进入下一步
CentOS5.6环境安装oracle 10g(完整版)
在存储选项中选择“File System”,点击“Next”进入下一步
CentOS5.6环境安装oracle 10g(完整版)
使用默认配置,点击“Next”进入下一步
CentOS5.6环境安装oracle 10g(完整版)
使用默认配置,点击“Next”进入下一步
CentOS5.6环境安装oracle 10g(完整版)
点击“Next”进入下一步
CentOS5.6环境安装oracle 10g(完整版)
在初始化参数设置中的选项卡中选择“Sizing”,在Processes中填写600
CentOS5.6环境安装oracle 10g(完整版)
在字符集选项卡中,选择字符集为“ZHS16FBK”,点击“Next”进入下一步
CentOS5.6环境安装oracle 10g(完整版)
使用默认值,点击“Next”进入下一步
CentOS5.6环境安装oracle 10g(完整版)
点击“Finish”创建数据库
CentOS5.6环境安装oracle 10g(完整版)
点击“OK”确认配置
CentOS5.6环境安装oracle 10g(完整版)
建数据库创建中……
CentOS5.6环境安装oracle 10g(完整版)
在sys和system账号中输入密码,点击“OK”至此数据库安装完成。
附:oracle 10g下载地址:
OracleDatabase 10g Release 2 (10.2.0.1.0) Enterprise/Standard Edition for Microsoft Windows (x64)
OracleDatabase 10g Release 2 (10.2.0.1.0) Enterprise/Standard Edition for Linux x86
OracleDatabase 10g Release 2 (10.2.0.1.0) Enterprise/Standard Edition for Linux x86-64
OracleDatabase 10g Release 2 (10.2.0.1.0) Enterprise/Standard Edition for AIX5L
OracleDatabase 10g Release 2 (10.2.0.2) Enterprise/Standard Edition for Solaris Operating System (x86)
OracleDatabase 10g Release 2 (10.2.0.1.0) Enterprise/Standard Edition for Solaris Operating System (x86-64)

相关文章:

  • 2022-12-23
  • 2021-06-27
  • 2021-11-13
  • 2022-03-04
  • 2021-11-19
  • 2021-06-21
猜你喜欢
  • 2022-02-19
  • 2021-05-18
  • 2022-01-08
  • 2021-10-16
  • 2021-11-03
  • 2022-02-03
  • 2022-12-23
相关资源
相似解决方案