# uses ORACLE_PATH to locate the file.
# This variable is used by SQL*Plus, Forms and Menu. # ---------------------------------------------------
ORACLE_PATH=/u01/app/oracle/common/oracle/sql; export ORACLE_PATH
# --------------------------------------------------- # SQLPATH
# --------------------------------------------------- # Specifies the directory or list of directories that # SQL*Plus searches for a login.sql file.
# --------------------------------------------------- # SQLPATH=/u01/app/common/oracle/sql; export SQLPATH
# --------------------------------------------------- # ORACLE_TERM
# --------------------------------------------------- # Defines a terminal definition. If not set, it # defaults to the value of your TERM environment # variable. Used by all character mode products.
# --------------------------------------------------- ORACLE_TERM=xterm; export ORACLE_TERM
# --------------------------------------------------- # NLS_DATE_FORMAT
# --------------------------------------------------- # Specifies the default date format to use with the # TO_CHAR and TO_DATE functions. The default value of # this parameter is determined by NLS_TERRITORY. The # value of this parameter can be any valid date
# format mask, and the value must be surrounded by # double quotation marks. For example:
# # NLS_DATE_FORMAT = \
# # ---------------------------------------------------
NLS_DATE_FORMAT=\
# --------------------------------------------------- # TNS_ADMIN
# --------------------------------------------------- # Specifies the directory containing the Oracle Net # Services configuration files like listener.ora, # tnsnames.ora, and sqlnet.ora.
# --------------------------------------------------- TNS_ADMIN=$ORACLE_HOME/network/admin; export TNS_ADMIN
# --------------------------------------------------- # ORA_NLS11
# --------------------------------------------------- # Specifies the directory where the language,
# territory, character set, and linguistic definition # files are stored.
# --------------------------------------------------- ORA_NLS11=$ORACLE_HOME/nls/data; export ORA_NLS11
# --------------------------------------------------- # PATH
# --------------------------------------------------- # Used by the shell to locate executable programs; # must include the $ORACLE_HOME/bin directory.
# ---------------------------------------------------
PATH=.:${JAVA_HOME}/bin:${PATH}:$HOME/bin:$ORACLE_HOME/bin PATH=${PATH}:/usr/bin:/bin:/usr/bin/X11:/usr/local/bin PATH=${PATH}:/u01/app/common/oracle/bin export PATH
? 2014 VMware, Inc. All rights reserved.
Page 21 of 42
# --------------------------------------------------- # LD_LIBRARY_PATH
# --------------------------------------------------- # Specifies the list of directories that the shared # library loader searches to locate shared object # libraries at runtime.
# --------------------------------------------------- LD_LIBRARY_PATH=$ORACLE_HOME/lib
LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:$ORACLE_HOME/oracm/lib
LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/lib:/usr/lib:/usr/local/lib export LD_LIBRARY_PATH
# --------------------------------------------------- # CLASSPATH
# --------------------------------------------------- # Specifies the directory or list of directories that # contain compiled Java classes.
# --------------------------------------------------- CLASSPATH=$ORACLE_HOME/JRE
CLASSPATH=${CLASSPATH}:$ORACLE_HOME/jlib
CLASSPATH=${CLASSPATH}:$ORACLE_HOME/rdbms/jlib CLASSPATH=${CLASSPATH}:$ORACLE_HOME/network/jlib export CLASSPATH
# --------------------------------------------------- # THREADS_FLAG
# --------------------------------------------------- # All the tools in the JDK use green threads as a # default. To specify that native threads should be # used, set the THREADS_FLAG environment variable to # \# threads by setting THREADS_FLAG to the value # \
# --------------------------------------------------- THREADS_FLAG=native; export THREADS_FLAG
# --------------------------------------------------- # TEMP, TMP, and TMPDIR
# --------------------------------------------------- # Specify the default directories for temporary # files; if set, tools that create temporary files # create them in one of these directories.
# --------------------------------------------------- export TEMP=/tmp export TMPDIR=/tmp
# --------------------------------------------------- # UMASK
# --------------------------------------------------- # Set the default file mode creation mask
# (umask) to 022 to ensure that the user performing # the Oracle software installation creates files # with 644 permissions.
# --------------------------------------------------- umask 022
16. 创建oracle账号 “oracle”:
[root@racnode1 ~]# groupadd -g 1300 dba [root@racnode1 ~]# groupadd -g 1301 oper
[root@racnode1 ~]# useradd -m -u 1101 -g oinstall -G dba,oper,asmdba -d /home/oracle -s /bin/bash -c \
? 2014 VMware, Inc. All rights reserved.
Page 22 of 42
[root@racnode1 ~]# id oracle uid=1101(oracle) gid=1000(oinstall)
groups=1000(oinstall),1201(asmdba),1300(dba),1301(oper)
然后为oracle用户创建登录环境(/home/oracle/.bash_profile)
# --------------------------------------------------- # .bash_profile
# --------------------------------------------------- # OS User: oracle
# Application: Oracle Database Software Owner # Version: Oracle 11g release 2
# ---------------------------------------------------
# Get the aliases and functions if [ -f ~/.bashrc ]; then . ~/.bashrc fi
alias ls=\
# --------------------------------------------------- # ORACLE_SID
# --------------------------------------------------- # Specifies the Oracle system identifier (SID) for # the Oracle instance running on this node. # Each RAC node must have a unique ORACLE_SID. # (i.e. racdb1, racdb2,...)
# --------------------------------------------------- ORACLE_SID=racdb1; export ORACLE_SID
# --------------------------------------------------- # ORACLE_UNQNAME
# --------------------------------------------------- # In previous releases of Oracle Database, you were # required to set environment variables for
# ORACLE_HOME and ORACLE_SID to start, stop, and # check the status of Enterprise Manager. With
# Oracle Database 11g release 2 (11.2) and later, you # need to set the environment variables ORACLE_HOME # and ORACLE_UNQNAME to use Enterprise Manager. # Set ORACLE_UNQNAME equal to the database unique # name.
# --------------------------------------------------- ORACLE_UNQNAME=racdb; export ORACLE_UNQNAME
# --------------------------------------------------- # JAVA_HOME
# --------------------------------------------------- # Specifies the directory of the Java SDK and Runtime # Environment.
# --------------------------------------------------- JAVA_HOME=/usr/local/java; export JAVA_HOME
# --------------------------------------------------- # ORACLE_BASE
# --------------------------------------------------- # Specifies the base of the Oracle directory structure # for Optimal Flexible Architecture (OFA) compliant # database software installations.
# --------------------------------------------------- ORACLE_BASE=/u01/app/oracle; export ORACLE_BASE
? 2014 VMware, Inc. All rights reserved.
Page 23 of 42
# --------------------------------------------------- # ORACLE_HOME
# --------------------------------------------------- # Specifies the directory containing the Oracle # Database software.
# ---------------------------------------------------
ORACLE_HOME=$ORACLE_BASE/product/11.2.0/dbhome_1; export ORACLE_HOME
# --------------------------------------------------- # ORACLE_PATH
# --------------------------------------------------- # Specifies the search path for files used by Oracle # applications such as SQL*Plus. If the full path to # the file is not specified, or if the file is not # in the current directory, the Oracle application # uses ORACLE_PATH to locate the file.
# This variable is used by SQL*Plus, Forms and Menu. # ---------------------------------------------------
ORACLE_PATH=/u01/app/common/oracle/sql; export ORACLE_PATH
# --------------------------------------------------- # SQLPATH
# --------------------------------------------------- # Specifies the directory or list of directories that # SQL*Plus searches for a login.sql file.
# --------------------------------------------------- # SQLPATH=/u01/app/common/oracle/sql; export SQLPATH
# --------------------------------------------------- # ORACLE_TERM
# --------------------------------------------------- # Defines a terminal definition. If not set, it # defaults to the value of your TERM environment # variable. Used by all character mode products.
# --------------------------------------------------- ORACLE_TERM=xterm; export ORACLE_TERM
# --------------------------------------------------- # NLS_DATE_FORMAT
# --------------------------------------------------- # Specifies the default date format to use with the # TO_CHAR and TO_DATE functions. The default value of # this parameter is determined by NLS_TERRITORY. The # value of this parameter can be any valid date
# format mask, and the value must be surrounded by # double quotation marks. For example:
# # NLS_DATE_FORMAT = \
# # ---------------------------------------------------
NLS_DATE_FORMAT=\
# --------------------------------------------------- # TNS_ADMIN
# --------------------------------------------------- # Specifies the directory containing the Oracle Net # Services configuration files like listener.ora, # tnsnames.ora, and sqlnet.ora.
# --------------------------------------------------- TNS_ADMIN=$ORACLE_HOME/network/admin; export TNS_ADMIN
# --------------------------------------------------- # ORA_NLS11
# --------------------------------------------------- # Specifies the directory where the language,
? 2014 VMware, Inc. All rights reserved.
Page 24 of 42
# territory, character set, and linguistic definition # files are stored.
# --------------------------------------------------- ORA_NLS11=$ORACLE_HOME/nls/data; export ORA_NLS11
# --------------------------------------------------- # PATH
# --------------------------------------------------- # Used by the shell to locate executable programs; # must include the $ORACLE_HOME/bin directory.
# ---------------------------------------------------
PATH=.:${JAVA_HOME}/bin:${PATH}:$HOME/bin:$ORACLE_HOME/bin PATH=${PATH}:/usr/bin:/bin:/usr/bin/X11:/usr/local/bin PATH=${PATH}:/u01/app/common/oracle/bin export PATH
# --------------------------------------------------- # LD_LIBRARY_PATH
# --------------------------------------------------- # Specifies the list of directories that the shared # library loader searches to locate shared object # libraries at runtime.
# --------------------------------------------------- LD_LIBRARY_PATH=$ORACLE_HOME/lib
LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:$ORACLE_HOME/oracm/lib
LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/lib:/usr/lib:/usr/local/lib export LD_LIBRARY_PATH
# --------------------------------------------------- # CLASSPATH
# --------------------------------------------------- # Specifies the directory or list of directories that # contain compiled Java classes.
# --------------------------------------------------- CLASSPATH=$ORACLE_HOME/JRE
CLASSPATH=${CLASSPATH}:$ORACLE_HOME/jlib
CLASSPATH=${CLASSPATH}:$ORACLE_HOME/rdbms/jlib CLASSPATH=${CLASSPATH}:$ORACLE_HOME/network/jlib export CLASSPATH
# --------------------------------------------------- # THREADS_FLAG
# --------------------------------------------------- # All the tools in the JDK use green threads as a # default. To specify that native threads should be # used, set the THREADS_FLAG environment variable to # \# threads by setting THREADS_FLAG to the value # \
# --------------------------------------------------- THREADS_FLAG=native; export THREADS_FLAG
# --------------------------------------------------- # TEMP, TMP, and TMPDIR
# --------------------------------------------------- # Specify the default directories for temporary # files; if set, tools that create temporary files # create them in one of these directories.
# --------------------------------------------------- export TEMP=/tmp export TMPDIR=/tmp
# --------------------------------------------------- # UMASK
? 2014 VMware, Inc. All rights reserved.
Page 25 of 42
百度搜索“77cn”或“免费范文网”即可找到本站免费阅读全部范文。收藏本站方便下次阅读,免费范文网,提供经典小说综合文库在vmware vsphere esxi上安装oracle RAC(5)在线全文阅读。
相关推荐: