# ls
.profile bin lib or usr
.ssh dev lost+found sbin var
.sw etc net stand
backup home opt tmp
# rm -R /or/*
# cd /or
# mkdir oracle
# mkdir oradata
# mkdir backup
# mkdir -p /or/oracle/orcl
# mkdir /or/arch
# chown -R oracle:oinstall /or/oradata/orcl
# chown -R oracle:oinstall /or/arch
# mkdir /home/oracle
mkdir: cannot create /home/oracle: File exists
#
&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
用tftp软件删除/tmp目录下的OraInstall2015-11-18_03-08-49PM
&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
# chown oracle:oinstall /home/oracle
# mkdir -p /or/oracle/product/10.2.0/db_1
# chown -R oracle:oinstall /or/oracle
# /usr/sbin/groupadd dba
Group 'dba' not unique
# /usr/sbin/groupadd oinstall
Group 'oinstall' not unique
# /usr/sbin/groupadd oper
Group 'oper' not unique
# id oracle
uid=107(oracle) gid=106(oinstall) groups=105(dba)
#
&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
# cd /usr/bin
# chmod 751 unzip_hpx32
# cd /or
# ls
10gr2_database_hpi.zip oracle
arch oradata
backup
# unzip_hpx32 10gr2_database_hpi.zip
&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
inflating: database/stage/oracle.server.10_2_0_1_0_dep_bak.properties.47
inflating: database/stage/oracle.server.10_2_0_1_0_1139021004569.bak
解压完状态,略..............
&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
# su - oracle
You have mail.
$
&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
vi /home/oracle/.profile
$ vi /home/oracle/.profile
"/home/oracle/.profile" 6 lines, 165 characters
export ORACLE_BASE=/or/oradata
export ORACLE_HOME=/or/oracle/product/10.2.0/db_1
export NLS_LANG=AMERICAN
export PATH=$ORACLE_HOME/bin:$PATH
export ORACLE_SID=orcl
~
~
"/home/oracle/.profile" 6 lines, 165 characters
$
&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
查看状态
$ su - root
# /usr/contrib/bin/machinfo | grep -i Memory
Memory = 4074 MB (3.978516 GB)
# /usr/sbin/swapinfo -a
Kb Kb Kb PCT START/ Kb
TYPE AVAIL USED FREE USED LIMIT RESERVE PRI NAME
dev 12582912 0 12582912 0% 0 - 1 /dev/vg00/lvol2
reserve - 447036 -447036
memory 4171872 1013268 3158604 24%
# bdf /tmp
Filesystem kbytes used avail %used Mounted on
/dev/vg00/lvol4 524288 17656 503120 3% /tmp
# /bin/getconf KERNEL_BITS
64
# uname -a
HP-UX hostname B.11.23 U ia64 2423348647 unlimited-user license
# /usr/sbin/swlist -l patch | grep PHSS_33279
# kctune
Tunable Value Expression Changes
NSTREVENT 50 Default
…..
&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
# chown -R oracle:oinstall /or/oracle
# chown -R oracle:oinstall /or/oradata
# chown -R oracle:oinstall /or/backup
# chmod 775 /or/oracle
# chmod 775 /or/oradata
# chmod 775 /or/backup
# su - oracle
1.$export DISPLAY=192.168.0.1:3.0
2.打开XManager软件,登录Xbrowser,用Terminal安装
$ cd /or/database
$ ls
doc response stage
install runInstaller welcome.html
$ ./runInstaller
&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
开始安装
$ ./runInstaller
Starting Oracle Universal Installer...
Checking installer requirements...
Checking operating system version: must be B.11.23. Actual B.11.23
Passed
Checking swap space: must be greater than 250 MB. Actual 12288 MB Passed
Checking Temp space: must be greater than 250 MB. Actual 252 MB Passed
All installer requirements met.
Preparing to launch Oracle Universal Installer from /tmp/OraInstall2015-11-28_09-26-59AM. Please wait ...$
出现安装界面~~!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
出现此报错,删除/etc/oratab文件,重新安装即可
&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
#
# cd /or/oracle/product/10.2.0/db_1
# ls
OPatch jdbc perl
assistants jdk plsql
bin jlib precomp
cdata ldap racg
cfgtoollogs lib rdbms
clone lib32 relnotes
config log root.sh
crs md root.sh.old
css mesg slax
ctx mgw sqlj
dbs network sqlplus
demo nls srvm
diagnostics oc4j sysman
has olap tg4ifmx
hlddb03_orcl opmn tg4ingr
hs oraInst.loc tg4sybs
install oracore tg4tera
install.platform ord uix
inventory oui wwg
javavm owm xdk
# sh root.sh
Running Oracle10 root.sh script...
The following environment variables are set as:
ORACLE_OWNER= oracle
ORACLE_HOME= /or/oracle/product/10.2.0/db_1
Enter the full pathname of the local bin directory: [/usr/local/bin]: /usr/local/bin
The file "dbhome" already exists in /usr/local/bin. Overwrite it? (y/n) [n]: y
Copying dbhome to /usr/local/bin ...
The file "oraenv" already exists in /usr/local/bin. Overwrite it? (y/n) [n]: y
Copying oraenv to /usr/local/bin ...
The file "coraenv" already exists in /usr/local/bin. Overwrite it? (y/n) [n]: y
Copying coraenv to /usr/local/bin ...
Creating /etc/oratab file...
Entries will be added to the /etc/oratab file as needed by
Database Configuration Assistant when a database is created
Finished running generic part of root.sh script.
Now product-specific root actions will be performed.
#
&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
# su - oracle
$ sqlplus /nolog
SQL*Plus: Release 10.2.0.1.0 - Production on Sat Nov 28 22:15:14 2015
Copyright (c) 1982, 2005, Oracle. All rights reserved.
SQL> conn /as sysdba
Connected.
SQL> show user
USER is "SYS"
SQL> create user hldjq identified by hldjq;
User created.
SQL> grant all privileges to hldjq;
Grant succeeded.
SQL>
&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
创建表空间
SQL> create tablespace NNC_DATA01 datafile '/or/oradata/oradata/orcl/nnc_data01.dbf' size 2000m extent management local segment space management auto;
Tablespace created.
SQL> SQL> SQL> SQL> SQL> SQL> SQL> SQL> create tablespace NNC_DATA02 datafile '/or/oradata/oradata/orcl/nnc_data02.dbf' SIZE 2000m extent management local segment space management auto;
Tablespace created.
SQL> create tablespace NNC_DATA03 datafile '/or/oradata/oradata/orcl/nnc_data03.dbf' SIZE 2000m extent management local segment space management auto;
Tablespace created.
SQL> create tablespace NNC_INDEX01 datafile '/or/oradata/oradata/orcl/nnc_index01.dbf' SIZE 2000m extent management local segment space management auto;
Tablespace created.
SQL> create tablespace NNC_INDEX02 datafile'/or/oradata/oradata/orcl/nnc_index02.dbf' SIZE 2000m extent management local segment space management auto;
Tablespace created.
SQL> create tablespace NNC_INDEX03 datafile '/or/oradata/oradata/orcl/nnc_index03.dbf' SIZE 2000m extent management local segment space management auto;
Tablespace created.
&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
给hldjq用户赋予权限
grant create session to hldjq;
grant alter session to hldjq;
Grant succeeded.
SQL> grant create table to hldjq;
Grant succeeded.
SQL> grant select any table to hldjq;
Grant succeeded.
SQL> grant flashback any table to hldjq;
Grant succeeded.
SQL> grant create any index to hldjq;
Grant succeeded.
SQL> grant alter any index to hldjq;
Grant succeeded.
SQL> grant drop any index to hldjq;
Grant succeeded.
SQL> grant create view to hldjq;
Grant succeeded.
SQL> grant create procedure to hldjq;
Grant succeeded.
SQL> grant create sequence to hldjq;
Grant succeeded.
SQL> grant create trigger to hldjq;
Grant succeeded.
SQL> grant create database link to hldjq;
Grant succeeded.
SQL> grant create synonym to hldjq;
Grant succeeded.
SQL> grant select any dictionary to hldjq;
Grant succeeded.
SQL> grant unlimited tablespace to hldjq;
Grant succeeded.
SQL> grant export full database to hldjq;
Grant succeeded.
Windows 2003下命令行执行
imp hldjq/hldjq@orcl_10.1.1.17 file=E:\ncdb5502-11-03.DMP full=y ****
开始导入数据