solaris10u10 x86-64 oracle11.2.0.3 64bit 检查软件环境 [root@MLCDBSERVER2@/]>pkginfo -i SUNWarc SUNWbtool SUNWhea SUNWlibC SUNWlibms SUNWsprot \ SUNWtoo SUNWi1of SUNWi1cs SUNWi15cs SUNWxwfnt [root@MLCDBSERVER2@/]>pkgadd -d . SUNWi1cs SUNWi15cs [root@MLCDBSERVER2@/]>mkdir -p /var/opt/oracle [root@MLCDBSERVER2@/]>vi /var/opt/oracle/oraInst.loc inventory_loc=/u01/app/oraInventory inst_group=oinstall 配置系统登录显示变量 [root@MLCDBSERVER2@/]>vi /etc/profile #add PS1='[$LOGNAME@`hostname`@$PWD]>';export PS1 [root@MLCDBSERVER2@/]>/usr/sbin/usermod -s /usr/bin/bash root 创建oracle用户和组 [root@MLCDBSERVER2@/]>mkdir -p /home/oracle [root@MLCDBSERVER2@/]>/usr/sbin/groupadd oinstall [root@MLCDBSERVER2@/]>/usr/sbin/groupadd -g 502 dba [root@MLCDBSERVER2@/]>/usr/sbin/groupadd -g 503 oper [root@MLCDBSERVER2@/]>/usr/sbin/useradd -u 502 -g oinstall -G dba -d /home/oracle -s /usr/bin/bash oracle [root@MLCDBSERVER2@/]>passwd oracle biierg_oracle [root@MLCDBSERVER2@/]>chown oracle:oinstall /home/oracle [root@MLCDBSERVER2@/]>mkdir /app/oracle [root@MLCDBSERVER2@/]>chown oracle:oinstall /app/oracle [root@MLCDBSERVER2@/]>chmod -R 775 /app/oracle [root@MLCDBSERVER2@/]>chown oracle:oinstall /var/opt/oracle 配置oracle环境变量 [root@MLCDBSERVER2@/]>su - oracle [oracle@MLCDBSERVER2@/home/oracle]>vi .bash_profile PERL_HOME=/opt/ActivePerl-5.8;export PERL_HOME PERL5LIB=${PERL5LIB}:/app/oracle/ofsdb/perl5lib;export PERL5LIB ORACLE_BASE=/app/oracle;export ORACLE_BASE ORACLE_HOME=${ORACLE_BASE}/product/server_ee/11.2.0.3;export ORACLE_HOME ORACLE_SID=MLC010C1;export ORACLE_SID ORACLE_DB=MLC010C1;export ORACLE_DB ORACLE_ADMIN=${ORACLE_BASE}/admin;export ORACLE_ADMIN TNS_ADMIN=/var/opt/oracle;export TNS_ADMIN ORACLE_DBA=${ORACLE_BASE}/admin/${ORACLE_SID}; export ORACLE_DBA ORACLE_LOGS=${ORACLE_DBA}/logbook; export ORACLE_LOGS ORACLE_HOSTNAME=MLCDBSERVER2.biierg-inner.com;export ORACLE_HOSTNAME PATH=${PERL_HOME}/bin PATH=${PATH}:${OFSDB_HOME}/bin PATH=$PATH:${ORACLE_HOME}/lib:${ORACLE_HOME}/bin:${ORACLE_BASE}/admin/bin PATH=$PATH:/usr/sbin:/usr/bin:/usr/local/bin:/usr/openwin/bin PATH=$PATH:/opt/SUNWcluster/bin:/usr/X/bin:/usr/ccs/bin:/usr/ccs/lib PATH=$PATH:/usr/bin/nsr:/usr/sbin/nsr PATH=$PATH:/opt/csw/bin export PATH LD_LIBRARY_PATH=${ORACLE_HOME}/lib:/usr/ccs/lib:/usr/lib ; export LD_LIBRARY_PATH MANPATH=/opt/SUNWcluster/man:/usr/share/man:${PERL_HOME}/man;export MANPATH PS1='[$LOGNAME@`hostname`@$PWD]>';export PS1 [oracle@MLCDBSERVER2@/home/oracle]>. .bash_profile [oracle@MLCDBSERVER2@/home/oracle]> 配置responseFile 开始安装oracle软件 [oracle@MLCDBSERVER2@/tmp/database]>./runInstaller -silent -responseFile /tmp/database/response/db_install.rsp 配置netca [oracle@MLCDBSERVER2@/tmp/database]>netca /silent /responsefile /tmp/database/response/netca.rsp [oracle@MLCDBSERVER2@/var/opt/oracle]>vi listener.ora 配置存储数据文件、日志文件的路径 [root@MLCDBSERVER2@/oracle]>mkdir {data1,data2,redo1,redo2,flash,arch,undo,temp} [root@MLCDBSERVER2@/oracle]>chown oracle:oinstall {data1,data2,redo1,redo2,flash,arch,undo,temp} 配置DB_TEMPLATE db_template.dbt 开始安装DB,需要在服务器上开启terminal执行 [oracle@MLCDBSERVER2@/tmp]>dbca -silent -createDatabase -templateName /tmp/db_template.dbt \ -gdbName MLC010C1 -sid MLC010C1 \ -variables DATA1=/oracle/data1,DATA2=/oracle/data2,DB_NAME=MLC010C1,FLASH=/oracle/flash,TEMP1=/oracle/temp,UNDO1=/oracle/undo,REDO1=/oracle/redo1,REDO2=/oracle/redo2 \ -listeners LISTENER 配置业务 [root@MLCDBSERVER2@/]>pkgadd -d ActivePerl-5.8.8.819-x86-solaris-2.10-cc-267479.pkg [root@MLCDBSERVER2@/]>pkgadd -d ERGoracore-1.0.3013.mas-SOLARIS10_X86-P.pkg [root@MLCDBSERVER2@/]>mkdir -p /AFC/AFC/parameterdata/data/XML [root@MLCDBSERVER2@/]>chown oracle:oinstall /AFC/AFC/parameterdata/data/XML 配置数据库随系统自动启动 [root@MLCDBSERVER2@/]>./app/oracle/ofsdb/init.d/ost-auto.ksh 通过oracle用户上传lcscd.xsd到AFC/AFC/parameterdata/data/XML下 [oracle@MLCDBSERVER2@/app/oracle]>sqlplus / as sysdba SQL> @/app/oracle/ofsdb/install/sql/verify_passwd.plsw Function created. SQL> @/app/oracle/ofsdb/install/sql/verify_passwd_profile.plsw Function created. Function created. SQL> @/app/oracle/ofsdb/install/sql/gen_password.plsw Function created. SQL> @/app/oracle/ofsdb/install/sql/priv_map_sys.pkg Package created. SQL> @/app/oracle/ofsdb/install/sql/priv_map_sys.pkb Package body created. [oracle@MLCDBSERVER2@/app/oracle/ofsdb/install/oracen/1.0.0000.mlc/install]>perl /app/oracle/ofsdb/bin/ost-install.pl -C INSTALL -i DBMGR/oracen.DBMGR_install.xml -s MLC010C1 -o DBMGRINSTALL
深入oracle,去透析oracle每个角落。
DBA、SQL开发技术人的集市,QQ高级群群号35448096