安装oracle 10G

for i in binutils compat-db compat-libstdc++-296  control-center gcc-4.1 gcc-c++ glibc glibc-common libstdc++ libstdc++-devel make sysstat setarch libaio libXp
do
        yum install $i
done

vi /etc/sysctl.conf

kernel.shmall = 2097152

kernel.shmmax = 268435456

kernel.shmmni = 4096

kernel.sem = 250 32000 100 128

fs.file-max = 65536

net.ipv4.ip_local_port_range = 1024 65000

net.core.rmem_default=262144

net.core.rmem_max=262144

net.core.wmem_default=262144

net.core.wmem_max=262144

/sbin/sysctl -p


vi /etc/security/limits.conf

oracle soft nproc 2047

oracle hard nproc 16384

oracle soft nofile 1024

oracle hard nofile 65536


mkdir -p /u01/app
groupadd oinstall
groupadd dba
useradd -g oinstall -G dba -d /u01/app/oracle oracle
passwd oracle
chown -R oracle.oinstall /u01

xhost +

su - oracle
vi .bash_profile

TMP=/tmp;export TMP

TMPDIR=$TMP;export TMPDIR

ORACLE_BASE=/u01/app/oracle;export ORACLE_BASE

ORACLE_HOME=$ORACLE_BASE/product/10.2.0/db_1;export ORACLE_HOME

ORACLE_SID=orcl;export ORACLE_SID

LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib; export LD_LIBRARY_PATH

PATH=$ORACLE_HOME/bin:$PATH; export PATH


source .bash_profile
tar xf oracle.tar.gz
cd database
./runInstaller

$sqlplus / as sysdba
SQL>shutdown immediate
SQL>startup

SQL>alter user scott identified by tiger account unlock;

tar xf rlwrap.tar.gz
cd rlwrap
./configure && make && make install

$ vi .bashrc
alias sqlplus="rlwrap sqlplus"
source .bashrc

 

#vim /u01/app/oracle/product/10.2.0/db_1/sqlplus/admin/glogin.sql

set sqlprompt "_user>"

define_EDITOR="vi"

set linesize 120

set pagesize 200




你可能感兴趣的:(操作系统)