Linux(Centos7)安装Oracle11.2.0数据字典初始化,监听,网络,创建用户等部分配置

#创建数据字典和pl/sql包
@/u01/app/oracle/product/11.2.0/db_1/rdbms/admin/catalog.sql;
@/u01/app/oracle/product/11.2.0/db_1/rdbms/admin/catproc.sql;
@/u01/app/oracle/product/11.2.0/db_1/rdbms/admin/utlrp.sql;
conn system/system;
@/u01/app/oracle/product/11.2.0/db_1/sqlplus/admin/pupbld.sql;
前两个脚本执行过程很长。
创建完成后先执行 exit 命令退出,然后再执行 sqlplus / as sysdba 登陆数据库;
然后执行 shutdown immediate; 命令关闭数据库;
再执行 startup; 启动oracle数据库。先退出再登陆是因为conn system/system之后,当前用户就变成了system,而system没有关闭数据库权限。



#配置监听
vim /u01/app/oracle/product/11.2.0/db_1/network/admin/listener.ora
#GLOBAL_DBNAME= DB01                           修改为自己的全局数据库名
#ORACLE_HOME=/db/app/oracle/product/11.2.0     修改为自己的oracle家目录
#SID_NAME=orcl                                 修改为自己的SID
#HOST=192.168.122.155                          修改为自己电脑IP
#ADR_BASE_LISTENER = /db/app/oracle            修改为自己oracle安装目录


# listener.ora Network Configuration File: /u01/app/oracle/product/11.2.0/db_1/network/admin/listener.ora
# Generated by Oracle configuration tools.
SID_LIST_LISTENER=
  (SID_LIST=
    (SID_DESC=
      (GLOBAL_DBNAME=ORCL)
      (ORACLE_HOME=/u01/app/oracle/product/11.2.0)
      (SID_NAME=orcl)
    )
  )

LISTENER =
 (DESCRIPTION_LIST =
   (DESCRIPTION =
     (ADDRESS = (PROTOCOL = TCP)(HOST =192.168.11.13)(PORT =1521))
   )
 )


#配置网络
vim  /u01/app/oracle/product/11.2.0/db_1/network/admin/tnsnames.ora
# tnsnames.ora Network Configuration File: /u01/app/oracle/product/11.2.0/db_1/network/admin/tnsnames.ora
# Generated by Oracle configuration tools.
ORCL =
 (DESCRIPTION =
   (ADDRESS = (PROTOCOL = TCP)(HOST =192.168.11.13)(PORT = 1521))
   (CONNECT_DATA =
     (SERVER = DEDICATED)
     (SERVICE_NAME = orcl)
   )
 )


#创建用户
create user jonychen identified by 123456;
#授权
grant create session, connect, resource to jonychen;
#创建表空间
create tablespace jonychen_DATA datafile '/home/oracle/data/oracle/oradata/jonychen001.dbf' size 6G;
#指定表空间
alter user jonychen default tablespace jonychen_DATA temporary tablespace TEMP;

  

posted @ 2019-10-05 14:11  Jony.K.Chen  阅读(512)  评论(0编辑  收藏  举报