1. Disable firewalld
[root@teguhth ~]# systemctl stop firewalld
[root@teguhth ~]# systemctl disable firewalld
Removed symlink /etc/systemd/system/multi-user.target.wants/firewalld.service.
Removed symlink /etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service.
[root@teguhth ~]#
2. add /etc/hosts
[root@teguhth ~]# cat /etc/hosts
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
10.10.10.50 teguhth
[root@teguhth ~]#
3. add packet
[root@teguhth ~]# yum -y install wget vsftpd gcc-c++
4. install oracle preinstall (download from oracle)
[root@teguhth data]# yum install oracle-database-preinstall-19c-1.0-1.el7.x86_64.rpm -y
5. setting password oracle
[root@teguhth data]# passwd oracle
Changing password for user oracle.
New password:
BAD PASSWORD: The password is shorter than 8 characters
Retype new password:
passwd: all authentication tokens updated successfully.
[root@teguhth data]#
6. create directory
[root@teguhth data]# mkdir -p /u01/app/oracle/product/19.0.0/dbhome_1
[root@teguhth data]# chown -R oracle:oinstall /u01
[root@teguhth data]# chmod -R 775 /u01
[root@teguhth data]#
7. reboot machine
[root@teguhth data]# init 6
8. unzip as user oracle
[oracle@teguhth soft]$ unzip LINUX.X64_193000_db_home.zip /u01/app/oracle/product/19.0.0/dbhome_1
9. setting bash profile
[oracle@teguhth ~]$ cat .bash_profile
# .bash_profile
# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
# User specific environment and startup programs
#PATH=$PATH:$HOME/.local/bin:$HOME/bin
#i#export PATH
# Oracle Settings
export TMP=/tmp
export TMPDIR=$TMP
export ORACLE_BASE=/u01/app/oracle/
export ORACLE_HOME=/u01/app/oracle/product/19.0.0/dbhome_1
export PATH=$ORACLE_HOME/bin:$PATH
export ORACLE_SID=tgh
[oracle@teguhth ~]$
export CV_ASSUME_DISTID=OEL7.9
10. Install oracle as user oracle
[oracle@teguhth ~]$ cd /u01/app/oracle/product/19.0.0/dbhome_1/
[oracle@teguhth dbhome_1]$
[oracle@teguhth dbhome_1]$ ./runInstaller
[oracle@teguhth dbhome_1]$
[oracle@teguhth dbhome_1]$ ./runInstaller
11. check oracle ora tab
[oracle@teguhth bin]$ cat /etc/oratab
#
# This file is used by ORACLE utilities. It is created by root.sh
# and updated by either Database Configuration Assistant while creating
# a database or ASM Configuration Assistant while creating ASM instance.
# A colon, ':', is used as the field terminator. A new line terminates
# the entry. Lines beginning with a pound sign, '#', are comments.
#
# Entries are of the form:
# $ORACLE_SID:$ORACLE_HOME:<N|Y>:
#
# The first and second fields are the system identifier and home
# directory of the database respectively. The third field indicates
# to the dbstart utility that the database should , "Y", or should not,
# "N", be brought up at system boot time.
#
# Multiple entries with the same $ORACLE_SID are not allowed.
#
#
tgh:/u01/app/oracle/product/19.0.0/dbhome_1:N
[oracle@teguhth bin]$
12, setting export patch bash on oratab
[oracle@teguhth bin]$ export ORACLE_HOME=tgh:/u01/app/oracle/product/19.0.0/dbhome_1:N
[oracle@teguhth bin]$ export PATH=$ORACLE_HOME/bin:$PATH
[oracle@teguhth bin]$ export ORACLE_SID=tgh
[oracle@teguhth bin]$ sqlplus / as sysdba
SQL*Plus: Release 19.0.0.0.0 - Production on Fri Nov 19 12:53:19 2021
Version 19.3.0.0.0
Copyright (c) 1982, 2019, Oracle. All rights reserved.
Connected to:
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.3.0.0.0
SQL>
13. make sure listener up
[oracle@teguhth bin]$ lsnrctl
LSNRCTL for Linux: Version 19.0.0.0.0 - Production on 19-NOV-2021 12:55:08
Copyright (c) 1991, 2019, Oracle. All rights reserved.
Welcome to LSNRCTL, type "help" for information.
LSNRCTL> status
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=localhost)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 19.0.0.0.0 - Production
Start Date 19-NOV-2021 11:15:27
Uptime 0 days 1 hr. 39 min. 56 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /home/oracle/soft/network/admin/listener.ora
Listener Log File /u01/app/oracle/diag/tnslsnr/teguhth/listener/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=127.0.0.1)(PORT=1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcps)(HOST=teguhth)(PORT=5500))(Security=(my_wallet_directory=/u01/app/oracle/admin/tgh/xdb_wallet))(Presentation=HTTP)(Session=RAW))
Services Summary...
Service "tgh" has 1 instance(s).
Instance "tgh", status READY, has 1 handler(s) for this service...
Service "tghXDB" has 1 instance(s).
Instance "tgh", status READY, has 1 handler(s) for this service...
The command completed successfully
LSNRCTL>
LSNRCTL> start
TNS-01106: Listener using listener name LISTENER has already been started
LSNRCTL>
LSNRCTL> exit
14. check login as sysdba no password
[oracle@teguhth bin]$ sqlplus / as sysdba
SQL*Plus: Release 19.0.0.0.0 - Production on Fri Nov 19 12:56:18 2021
Version 19.3.0.0.0
Copyright (c) 1982, 2019, Oracle. All rights reserved.
Connected to:
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.3.0.0.0
SQL> startup
ORA-01081: cannot start already-running ORACLE - shut it down first
SQL>
SQL> status
SP2-0042: unknown command "status" - rest of line ignored.
SQL> exit
Disconnected from Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.3.0.0.0
[oracle@teguhth bin]$
15. check login user system
[oracle@teguhth bin]$ sqlplus
SQL*Plus: Release 19.0.0.0.0 - Production on Fri Nov 19 13:01:36 2021
Version 19.3.0.0.0
Copyright (c) 1982, 2019, Oracle. All rights reserved.
Enter user-name: system
Enter password:
Connected to:
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.3.0.0.0
SQL> exitr
SP2-0042: unknown command "exitr" - rest of line ignored.
SQL> exit
Disconnected from Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.3.0.0.0
[oracle@teguhth bin]$
16. enable automatic booting and enable stop start service
https://www.server-world.info/en/note?os=CentOS_7&p=oracle19c&f=6
No comments:
Post a Comment