版本:
Centos6.7(桌面版);oracle11gR2(两个压缩包);jdk1.7
java version "1.7.0_55" Java(TM) SE Runtime Environment (build 1.7.0_55-b13) Java HotSpot(TM) 64-Bit Server VM (build 24.55-b03, mixed mode)
[c6-media] name=CentOS-$releasever - Media baseurl=file:///media/CentOS_6.7_Final gpgcheck=0 enabled=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-63. 下载oracle11g的安装文件,并拷贝到/opt目录下面:
yum install gcc -y
yum install xorg-x11-app* -y
groupadd oracle useradd -g oracle -s /bin/bash oracle -m
mkdir /usr/oracle chmod -R oracle:oracle /usr/oracle
su oracle ./runInstaller
#!/bin/bash # description: Startup Script for Oracle Databases # /etc/init.d/oracle export ORACLE_SID=orcl.centos.com export ORACLE_BASE=/usr/oracle export ORACLE_HOME=/usr/oracle/app/oracle/product/11.2.0/dbhome_1 export PATH=$PATH:$ORACLE_HOME/bin case "$1" in start) su oracle -c $ORACLE_HOME/bin/dbstart touch /var/lock/oracle echo "OK" ;; stop) echo -n "Shutdown Oracle: " su oracle -c $ORACLE_HOME/bin/dbshut rm -f /var/lock/oracle echo "OK" ;; *) echo "Usage: 'basename $0' start|stop" exit 1 esac exit 0
chkconfig --add /etc/rc.d/init.d/oracle chkconfig oracle on
create tablespace test_my datafile '/home/app/oracle/oradata/oracle11g/test_my01.dbf' size 800M autoextend on next 50M maxsize unlimited
alter tablespace test_my add datafile '/home/app/oracle/oradata/oracle11g/test_my02.dbf' size 800M autoextend on next 50M maxsize 1000M;
create user test_user identified by test_user default tablespace test_my;
grant dba to test_user;
Exp user/password@ip:1521/database file=/opt/test.dmp导入:
imp user/password@ip:1521/database file =/opt/test.dmp fromuser=test_user touser=test_user ignore=y
分享,成长,快乐
脚踏实地,专注
转载请注明blog地址:http://blog.csdn.net/fansy1990