一.安装centos 5.2 (X64) pxe方式安装,不启动selinux 二.安装需要的软件 拷贝配置yum配置文件: scp 10.0.50.71:/etc/yum.repos.d/* /etc/yum.repos.d/ 安装文件 yum install -y binutils compat-libstdc++ elfutils-libelf elfutils-libelf-devel glibc glibc-common glibc-devel gcc gcc-c++ libaio libaio-devel libgcc libstdc++ libstdc++-devel make sysstat unixODBC unixODBC-devel libXp 三.建立用户和组 /usr/sbin/groupadd oinstall /usr/sbin/groupadd dba /usr/sbin/useradd -g oinstall -G dba oracle passwd oracle 四.建立目录和权限 mkdir /oracle mkdir /oracle/10g chown -R oracle:oinstall /oracle 五.编辑变量 1. cat » /etc/sysctl.conf «EOF kernel.shmall = 2097152 kernel.shmmax = 2147483648 kernel.shmmni = 4096 kernel.sem = 250 32000 100 128 net.ipv4.ip_local_port_range = 1024 65000 net.core.rmem_default=4194304 net.core.rmem_max=4194304 net.core.wmem_default=262144 net.core.wmem_max=262144 EOF 2. cat » /etc/security/limits.conf «EOF oracle soft nproc 2047 oracle hard nproc 16384 oracle soft nofile 1024 oracle hard nofile 65536 EOF 3. cat » /etc/pam.d/login «EOF session required /lib/security/pam_limits.so EOF 4. vi /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 5. cat » /home/oracle/.bash_profile «EOF ORACLE_BASE=/oracle ORACLE_HOME=$ORACLE_BASE/10g ORACLE_SID=wilson PATH=$ORACLE_HOME/bin:$PATH export orACLE_BASE orACLE_HOME orACLE_SID PATH EOF 六.解压安装文件 #gunzip 文件名.cpio.gz #cpio -idmv < 文件名.cpio 七.修改系统版本 vi /etc/redhat-release 将CentOS release 5 (Final) 修改成redhat 4 八.安装数据库 用oracle用户进入linux 进入终端 su root xhost local:oracle su oralce sh /ORACLE的目录/runInstaller 正常安装就可以,关于权限的错误可以忽略 九.启动和停止 iSQL*Plus: $ isqlplusctl start $ isqlplusctl stop 十.启动和停止监听器: 监听器接受客户端的连接请求,并在验证证书后创建数据库连接。要使用 OEM 或 iSQL*Plus,必须先启动监听器。 $ lsnrctl start $ lsnrctl stop 十一.启动和停止数据库: 启动和停止数据库的最简单方法是从 OEM 控制台启动和停止。要从命令行执行此操作,请在以 oracle 身份登录后使用 SQL*Plus,如下所示: 启动: $ sqlplus SQL*Plus:Release 10.1.0.2.0 - Production on Sun Jun 13 22:27:48 2004 Copyright (c) 1982, 2004, oracle.All rights reserved. Enter user-name:/ as sysdba Connected to an idle instance. SQL> startup ORACLE instance started. Total System Global Area 188743680 bytes Fixed Size 778036 bytes Variable Size 162275532 bytes Database Buffers 25165824 bytes Redo Buffers 524288 bytes Database mounted. Database opened. SQL> exit 停止: $ sqlplus SQL*Plus:Release 10.1.0.2.0 - Production on Sun Jun 13 22:25:55 2004 Copyright (c) 1982, 2004, oracle.All rights reserved. Enter user-name:/ as sysdba Connected to: Oracle Database 10g Enterprise Edition Release 10.1.0.2.0 - Production With the Partitioning, OLAP and Data Mining options SQL> shutdown immediate Database closed. Database dismounted. ORACLE instance shut down. SQL> exit