运维开发网
广告位招商联系QQ:123077622
 
广告位招商联系QQ:123077622

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

运维开发网 https://www.qedev.com 2020-07-21 08:39 出处:网络
#创建数据字典和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;
#创建数据字典和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;

扫码领视频副本.gif

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号