binutils-2.17.50.0.6-5.el5
compat-db-4.2.52-5.1 control-center-2.16.0-14.el5 gcc-4.1.2-14.el5 gcc-c++-4.1.2-14.el5 glibc-2.5-18 libXp-1.0.0-8.1.el5 libstdc++-4.1.2-14.el5 libstdc++-devel-4.1.2-14.el5 make-3.81-1.1 openmotif-2.3.1-2.el5.i386.rpm 2.安装依赖包 yum -y install control-center yum -y install sysstat修改语言
[root@sq1 ~]# vi /etc/sysconfig/i18n LANG="zh_CN.UTF-8" LANG="en_US.UTF-8" SYSFONT="latarcyrheb-sun16"查看系统空间
df -h
3.root用户设置核心参数
vi /etc/sysctl.conf kernel.shmall = 2097152 (共享内存,单位是页面数 x86的32位为4k,oracle中是8K) kernel.shmmax = 2147483648 (单个共享内存段的最大尺寸) kernel.sem = 250 32000 100 128 (信号量) fs.file-max = 65536 (文件句柄的最大数量) net.ipv4.ip_local_port_range = 1024 65000(提供的服务端口号 1024 到 65000之间) net.core.rmem_default = 262144 net.core.rmem_max = 262144 net.core.wmem_default = 262144 net.core.wmem_max = 262144vi /etc/redhat-release
Red Hat Enterprise Linux Server release 3 (Tikanga)使内核生效
[root@sq1 ~]# /sbin/sysctl -p 4. [root@sq1 ~]# vi /etc/security/limits.conf (文件实际是 Linux PAM,插入式认证模块) oracle soft nproc 2047 oracle hard nproc 16384 oracle soft nofile 1024 oracle hard nofile 65536 ( core - 限制内核文件的大小 date - 最大数据大小 fsize - 最大文件大小 memlock - 最大锁定内存地址空间 nofile - 打开文件的最大数目 rss - 最大持久设置大小 stack - 最大栈大小 cpu - 以分钟为单位的最多 CPU 时间 noproc - 进程的最大数目 as - 地址空间限制 maxlogins - 此用户允许登录的最大数目)5.
[root@sq1 ~]# vi /etc/pam.d/login (limits.conf是pam_limits.so的配置文件) session required /lib/security/pam_limits.so 6.用户环境变量 [root@localhost ~]# groupadd oinstall [root@localhost ~]# groupadd dba [root@localhost ~]# useradd -g oinstall -G dba oracle [root@localhost ~]# passwd oracle[root@localhost ~]# su - oracle
[oracle@localhost ~]$ vi .bash_profile ORACLE_BASE=/oracle/app ORACLE_HOME=$ORACLE_BASE/oracle/product/10.2.0/db_1 ORACLE_SID=TEST PATH=$PATH:$HOME/bin:$ORACLE_HOME/bin LD_LIBRARY_PATH=$ORACLE_HOME/lib:/usr/lib LANG=en_US.UTF-8 export ORACLE_BASE ORACLE_HOME ORACLE_SID PATH LD_LIBRARY_PATH LANG让环境变量生效
[oracle@localhost ~]$ source .bash_profile 7.把oracle 安装程序 拷贝到linux 用oracle用户 解压缩 [root@localhost ~]# chmod 777 /home/oracle/oracle_database_linux32.zip [root@localhost ~]# su - oracle
8.root用户创建安装目录 并修改/etc/hosts
[root@localhost 10g]# hostname sq1 [root@localhost 10g]# vi /etc/hosts 192.168.8.12 sq1[root@localhost /]# mkdir -p /oracle/app
[root@localhost /]# chmod 777 /oracle [root@localhost ~]# chmod 777 /oracle/app/ [root@localhost /]# chown -R oracle.oinstall /oracle9.开始安装oracle(如果是su 切换的用户会报错Can't connect to x11 window server using 解决方式:以root用户执行:xhost +IP(本机ip)然后以oracle用户执行export DISPLAY=IP:0.0) 以oracle 用户登陆 进入解压缩目录 ./runInstaller
选择高级安装(advanced installation)
注意此处为oinstall组点击下一步 此处选择企业版下一步 选择安装目录 下一步 /oracle/app/oracle/product/10.2.0/db_1 (注意安装目录要跟bash_profile中 ORACLE_HOME目录一样)检测是否缺乏软件包(警告为正常)下一步
只安装数据库软件(install database software only)下一步
选择安装
安装最后提示需要root身份 执行两个脚本
执行后退出即可
-------------------------- dbca 创建数据库数据库SID 参照 用户环境变量中的设置(TEST)
[oracle@localhost ~]$ unzip oracle_database_linux32.zip
[oracle@oracle2 ~]$ ls
database Desktop oracle_database_linux32.zip [oracle@oracle2 ~]$ cd database/ [oracle@oracle2 database]$ ls doc install response runInstaller stage welcome.html [oracle@oracle2 database]$ [oracle@oracle2 database]$ ./runInstaller
[root@localhost ~]# cd /oracle/app/oraInventory/
[root@localhost oraInventory]# ls Contents logs orainstRoot.sh ContentsXML oraInstaller.properties oui install.platform oraInst.loc sessionContext.ser [root@localhost oraInventory]# ./orainstRoot.sh Changing permissions of /oracle/app/oraInventory to 770. Changing groupname of /oracle/app/oraInventory to oinstall. The execution of the script is complete[root@localhost ~]# cd /oracle/app/oracle/product/10.2.0/db_1/
[root@localhost db_1]# ls assistants demo jlib odbc plsql srvm bin diagnostics jre olap precomp sysman cdata has ldap OPatch racg uix cfgtoollogs hs lib opmn rdbms wwg clone install md oracore relnotes xdk config install.platform mesg oraInst.loc root.sh crs inventory mgw ord root.sh.old css javavm network oui slax ctx jdbc nls owm sqlj dbs jdk oc4j perl sqlplus [root@localhost db_1]# ./root.sh
[root@localhost db_1]# cd /
[root@localhost ~]# su – oracle [root@localhost ~]# su - oracle [oracle@oracle2 ~]$ cd $ORACLE_HOME [oracle@oracle2 db_1]$ pwd /oracle/app/oracle/product/10.2.0/db_1 [oracle@oracle2 db_1]$ [oracle@oracle2 db_1]$ cd /oracle/app/ [oracle@oracle2 app]$ ls oracle oraInventory [oracle@oracle2 database]$ dbca
[oracle@oracle2 ~]$ cd /oracle/app/
[oracle@oracle2 app]$ ls admin flash_recovery_area oracle oradata oraInventory [oracle@oracle2 app]$ cd oradata/ [oracle@oracle2 oradata]$ ls TEST [oracle@oracle2 TEST]$ sqlplus sys/a123456 as sysdbaSQL*Plus: Release 10.2.0.1.0 - Production on Thu Sep 20 18:05:21 2012
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 optionsSQL>select *from scott.emp;
[oracle@oracle2 TEST]$ sqlplus / as sysdba
安装最后提示需要root身份 执行两个脚本
su - cd /oracle/app/oraInventory/./orainstRoot.sh
cd /oracle/app/oracle/product/10.2.0/db_1/ ./root.sh 执行后退出即可