Linux (CentOS7) Install Oracle11.0 Data Dictionary Initialization, Listening, Network, Create Some Configuration

#Create data dictionary and pl/sql package
@/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;
The execution process of the first two scripts is very long.
After the creation is completed, execute the exit command to exit, and then execute sqlplus / as sysdba to log in to the database;
Then execute shutdown immediate; command to shut down the database;
Then execute startup; to start the oracle database. Log out first and log in because after conn system/system, the current user becomes system, and system does not have permission to close the database.



#Configure monitoring
vim /u01/app/oracle/product/11.2.0/db_1/network/admin/listener.ora
#GLOBAL_DBNAME = DB01 is modified to its own global database name
#ORACLE_HOME=/db/app/oracle/product/11.2.0 modify to own oracle home directory
#SID_NAME=orcl modify to own SID
#HOST=192.168.122.155 Change to your own computer IP
#ADR_BASE_LISTENER = /db/app/oracle modify to own oracle installation directory


# 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))
   )
 )


#Configure the network
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
create user jonychen identified by 123456;
#Authorization
grant create session, connect, resource to jonychen;
#Create table space
create tablespace jonychen_DATA datafile ‘/home/oracle/data/oracle/oradata/jonychen001.dbf’ size 6G;
#Specify the table space
alter user jonychen default tablespace jonychen_DATA temporary tablespace TEMP;

#Create data dictionary and pl/sql package
@/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;
The execution process of the first two scripts is very long.
After the creation is completed, execute the exit command to exit, and then execute sqlplus / as sysdba to log in to the database;
Then execute shutdown immediate; command to shut down the database;
Then execute startup; to start the oracle database. Log out first and log in because after conn system/system, the current user becomes system, and system does not have permission to close the database.



#Configure monitoring
vim /u01/app/oracle/product/11.2.0/db_1/network/admin/listener.ora
#GLOBAL_DBNAME = DB01 is modified to its own global database name
#ORACLE_HOME=/db/app/oracle/product/11.2.0 modify to own oracle home directory
#SID_NAME=orcl modify to own SID
#HOST=192.168.122.155 Change to your own computer IP
#ADR_BASE_LISTENER = /db/app/oracle modify to own oracle installation directory


# 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))
   )
 )


#Configure the network
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
create user jonychen identified by 123456;
#Authorization
grant create session, connect, resource to jonychen;
#Create table space
create tablespace jonychen_DATA datafile ‘/home/oracle/data/oracle/oradata/jonychen001.dbf’ size 6G;
#Specify the table space
alter user jonychen default tablespace jonychen_DATA temporary tablespace TEMP;

Leave a Comment

Your email address will not be published.