日期:2014-05-16 浏览次数:20485 次
unset USERNAME export LANG=UTF-8 export ORACLE_BASE=/oracle export ORACLE_HOME=/oracle/10g export DISPLAY=172.16.0.5:0.0 export NLS_LANG='american_america.ZHS16GBK' export ORACLE_SID=jrtdbtest PATH=$HOME/bin:$ORACLE_HOME/bin:$ORA_CRS_HOME/bin:/bin:/sbin:$JAVA_HOME/bin:$PATH export LD_LIBRARY_PATH=$ORACLE_HOME/lib:$LD_LIBRARY_PATH export CLASSPATH=$JAVA_HOME/bin:$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib export JAVA_HOME=/usr/java/jdk1.6.0_14 export PATH export PS1="[\u@\h \w]\$" alias s='sqlplus "/as sysdba"'
rpm -qa | grep binutils rpm -qa | grep compat-libstdc++ rpm -qa | grep elfutils-libelf rpm -qa | grep elfutils-libelf-devel rpm -qa | grep glibc rpm -qa | grep glibc-common rpm -qa | grep glibc-devel rpm -qa | grep glibc-headers rpm -qa | grep gcc rpm -qa | grep gcc-c++ rpm -qa | grep libaio rpm -qa | grep libaio-devel rpm -qa | grep libstdc++ rpm -qa | grep libstdc++-devel rpm -qa | grep make rpm -qa | grep sysstat rpm -qa | grep unixODBC rpm -qa | grep unixODBC-devel
#/usr/sbin/groupadd oinstall #/usr/sbin/groupadd dba #/usr/sbin/useradd -g oinstall -G dba oracle #passwd oracle oracleadmin
vi /etc/sysctl.conf 保持系统默认设置 kernel.shmall = 2097152 kernel.shmmax = 2147483648 添加 fs.file-max = 6815744 kernel.shmmni = 4096 kernel.sem = 250 32000 100 128 net.ipv4.ip_local_port_range = 9000 65500 net.core.rmem_default = 262144 net.core.rmem_max = 4194304 net.core.wmem_default = 262144 net.core.wmem_max = 1048576 #/sbin/sysctl -p 应用设置
vi /etc/security/limits.conf oracle soft nproc 2047 oracle hard nproc 16384 oracle soft nofile 1024 oracle hard nofile 65536 vi /etc/pam.d/login session required /lib/security/pam_limits.so
if [ $USER = "oracle" ]; then if [ $SHELL = "/bin/ksh" ]; then ulimit -p 16384 ulimit -n 65536 else ulimit -u 16384 -n 65536 fi fi
mkdir -p /u01/app/oracle chown -R oracle:oinstall /u01/app chmod -R 775 /u01/app
# .bash_profile # Get the aliases and functions if [ -f ~/.bashrc ]; then . ~/.bashrc fi # User specific environment and startup programs PATH=$PATH:$HOME/bin export PATH export ORACLE_BASE=/u01/app/oracle export ORACLE_HOME=$ORACLE_BASE/product/11.1.0/db_1 export ORA_CRS_HOME=$ORACLE_BASE/crs export ORACLE_PATH=$ORACLE_BASE/common/oracle/sql:.:$ORACLE_HOME/rdbms/admin export ORACLE_SID=orcl export PATH=$ORACLE_HOME/bin:$ORA_CRS_HOME/bin:${PATH}:$HOME/bin export PATH=${PATH}:/usr/bin:/bin:/usr/bin/X11:/usr/local/bin export PATH=${PATH}:$ORACLE_BASE/common/oracle/bin export ORACLE_TERM=xterm export TNS_ADMIN=$ORACLE_HOME/network/admin export ORA_NLS10=$ORACLE_HOME/nls/data export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/lib:/usr/lib:/usr/local/lib:$ORACLE_HOME/oracm/lib:$ORACLE_HOME/lib export LIBPATH=$LIBPATH:$ORA_CRS_HOME/lib:$ORACLE_HOME/lib export CLASSPATH=${CLASSPATH}:$ORACLE_HOME/rdbms/jlib:$ORACLE_HOME/jlib:$ORACLE_HOME/network/jlib:$ORACLE_HOME/JRE export NLS_LANG=AMERICAN_AMERICA.ZHS16GBK 运行命令来使设置应用:source /home/oracle/.bash_profile
切换到oracle用户 $/mount_point/db/runInstaller 选择 Basic Installation Oracle Base 的位置:/u01/app/oracle Oracle Home 位置:/u01/app/oracle/product/11.1.0/db_1 安装类型:Enterprise Edition (3.3GB) UNIX D