DEV Community

technonotes-hacker
technonotes-hacker

Posted on

SETUP Oracle DB in Linux ( Standalone )

  • Install Oracle Virtual Box , Winscip & Putty.
  • Load the lab.
  • Change the network setting from NAT to Bridged Adapter.

Image description

Image description

Image description

Image description

Image description

  • Click ON & OFF its like restart.
  • IP which is assigned 192.168.1.104.
  • Assign any IP from 192.168.1.(0 to 255) , so I have assigned as 192.168.1.104. This IP taken from IPv4 in laptop.
  • Open Terminal in the screen by right click.

Image description

Image description

  • Ping Google and check whether its working or not.

Image description

  • Now you can login with your IP which is assigned.

Image description

Image description

  • Now we need to understand the concept of SHARED FOLDER.
  • You can share the SOFTWARES to the VM from laptop folder , no need to use WINSCP. Lets explore.

Image description

Image description

Image description

  • Lets create directories and unzip the software.

mkdir -p /u01/app/oracle/product/19.0.0.0/dbhome_1
unzip /media/sf_Software/V982063-01-001.zip -d /u01/app/oracle/product/19.0.0.0/dbhome_1

Image description

Image description

Install all RPM required for DB installation

Image description

Image description

Image description

  • Once you install this RPM , oracle user will be created automatically.

Image description

  • we don't know the password of ORACLE user , now set it.

Image description

  • password is oracle and user : oracle
  • Now run the installer.
  • Before that execute xhost + --> Received error , its mainly used to set the DISPLAY.

Image description

Image description

  • Getting error while installing the runinstaller .

Image description

  • May be because of LOGIN root user. Lets try with new session with ORACLE user.

Image description

Image description

Image description

  • Login with VM machine to avoid the DISPLAY issue.

Image description

Image description

Image description

Image description

Image description

Image description

Image description

Image description

Image description

Image description

Image description

Image description

Image description

Image description

Image description

Image description

Image description

Now lets create Database

Image description

Image description

  • Password is ORACLE

Image description

Image description

Image description

Image description

Image description

Image description

  • DB installation is completed.
  • How many Oracle Softwares are installed in the servers ? How to check ? oraInventory file will help to do this.

Image description

  • Now comes the question , how to find the Inventory location ?

Image description

  • How many databases are created in the server , if this file is changes , complete database may corrupt.

Image description

  • How many are running in this server , that is the DB server ?

ps -ef|grep pmon
ps -ef|grep smon

  • How to start the DB ?

Image description

Image description

Image description

  • As I have faced issue with SID , changed completly to new SID and started the server.

Image description

Notes

  • Oracle Home / Oracle Software / Database Software / Database Home --> All these are same.
  • How many Oracle Softwares are installed in the servers ? How to check ? oraInventory file will help to do this.

Image description

  • Now comes the question , how to find the Inventory location ?

Image description

  • How many databases are created in the server , if this file is changes , complete database may corrupt.

Image description

  • How many are running in this server , that is the DB server ?

ps -ef|grep pmon
ps -ef|grep smon

Error & Solution

https://superuser.com/questions/1755254/virtualbox-guest-additions-update-got-error-missing-selinux-target-policy-file

Linux Commands Used

yum install oracle* --skip-broken 
yum -y install oracle-database-ee-19c
yum -y install oracle-database-ee-21c
# groupadd dba
# groupadd oinstall 
# useradd -g oinstall -G oinstall,dba oracle
#chown -R oracle:oinstall /u01

cd /u01/app/oracle/product/19.0.0.0/dbhome_1 --> Tool used to install Oracle Home / Database Home?
./runInstaller
cd /u01/app/oracle/product/19.0.0.0/dbhome_1/bin --> Tool used to create database?
./dbca

cat /u01/app/oraInventory/ContentsXML/inventory.xml
cat /etc/oraInst.loc
cat /etc/oratab
ps -ef|grep smon
ps -ef|grep pmon
su - oracle
. oraenv
env |grep ORA
sqlplus / as sysdba
passwd oracle
xhost +
Enter fullscreen mode Exit fullscreen mode

Top comments (0)