oracle安装

OCP安装
=====================
1、
name:ocp
name:ocp
passwd:redhatocp
passwd:redhatocp
---------------------
name:root
passwd:oracle
=====================
2、
mount 
====================
3、
mkdir -p /mnt/cdrom/
mount /dev/scd0 /mnt/cdrom/
=======================
4、
主机名
vi /etc/sysconfig/network
hostname
=======================
5、
[root@ocp yum.repos.d]# pwd
/etc/yum.repos.d
[root@ocp yum.repos.d]# ls
local.repo
--------------------
yum  update
======================
6、
Huawei@123!?
======================
olap
oltp
======================
root:xhost +
su - oracle
oracle:dbca
==============
root:xhost +
su - oracle
oracle:netca
================
ps -ef | grep smon
================
[root@ocp ~]# ps -ef | grep smon
oracle   10308     1  0 15:32 ?        00:00:00 ora_smon_orcl
root     13542  9310  0 15:37 pts/6    00:00:00 grep smon
=================
[root@ocp ~]# ps -ef | grep pmon
oracle   10284     1  0 15:32 ?        00:00:00 ora_pmon_orcl
root     13825  9310  0 15:41 pts/6    00:00:00 grep pmon
=================
[root@ocp ~]# ps -ef | grep mmon
oracle   10312     1  0 15:32 ?        00:00:00 ora_mmon_orcl
root     13828  9310  0 15:41 pts/6    00:00:00 grep mmon
=================
[root@ocp scripts]# pwd
/u01/app/oracle/admin/orcl/scripts
[root@ocp scripts]# cat orcl.sh
#!/bin/sh
OLD_UMASK=`umask`
umask 0027
mkdir -p /u01/app/oracle/admin/orcl/adump
mkdir -p /u01/app/oracle/admin/orcl/dpdump
mkdir -p /u01/app/oracle/admin/orcl/pfile
mkdir -p /u01/app/oracle/cfgtoollogs/dbca/orcl
mkdir -p /u01/app/oracle/fast_recovery_area
mkdir -p /u01/app/oracle/fast_recovery_area/orcl
mkdir -p /u01/app/oracle/oradata/orcl
mkdir -p /u01/app/oracle/product/11.2.0/db_1/dbs
umask ${OLD_UMASK}
ORACLE_SID=orcl; export ORACLE_SID
PATH=$ORACLE_HOME/bin:$PATH; export PATH
echo You should Add this entry in the /etc/oratab: orcl:/u01/app/oracle/product/11.2.0/db_1:Y
/u01/app/oracle/product/11.2.0/db_1/bin/sqlplus /nolog @/u01/app/oracle/admin/orcl/scripts/orcl.sql
[root@ocp scripts]#
=====================
[root@ocp scripts]# cat orcl.sql
set verify off
ACCEPT sysPassword CHAR PROMPT 'Enter new password for SYS: ' HIDE
ACCEPT systemPassword CHAR PROMPT 'Enter new password for SYSTEM: ' HIDE
ACCEPT sysmanPassword CHAR PROMPT 'Enter new password for SYSMAN: ' HIDE
ACCEPT dbsnmpPassword CHAR PROMPT 'Enter new password for DBSNMP: ' HIDE
host /u01/app/oracle/product/11.2.0/db_1/bin/orapwd file=/u01/app/oracle/product/11.2.0/db_1/dbs/orapworcl force=y
@/u01/app/oracle/admin/orcl/scripts/CloneRmanRestore.sql
@/u01/app/oracle/admin/orcl/scripts/cloneDBCreation.sql
@/u01/app/oracle/admin/orcl/scripts/postScripts.sql
@/u01/app/oracle/admin/orcl/scripts/lockAccount.sql
@/u01/app/oracle/admin/orcl/scripts/postDBCreation.sql
[root@ocp scripts]# pwd
/u01/app/oracle/admin/orcl/scripts
==========================
退出oracle
exit
!
===========
alias ss='sqlplus / as sysdba'
cd $ORACLE_HOME
===========
set sqlprompt "_USER'@'_CONNECT_IDENTIFIER>"
[oracle@ocp admin]$ pwd
/u01/app/oracle/product/11.2.0/db_1/sqlplus/admin
[oracle@ocp admin]$ ls
glogin.sql
===============
SYS@orcl>show users;
===============
posted @ 2019-03-02 15:59  zhouhaiwu  阅读(194)  评论(0编辑  收藏  举报