Installing Oracle Database 23c on AlmaLinux 9.2
- 1. Install Oracle Database 23c
- 2. Connect to Oracle Database 23c
- 3. After restarting, start the database manually
- 4. After restarting, manually start the Listener
- 5. Manually start the Pluggable Database
- 6. Automatically start Pluggable Database
- 7. Set up the startup database at startup
- 8. (Caution) Uninstall Oracle Database 23c
- 9. Oracle Database 23c installation file download
1. Install Oracle Database 23c
Create an installation directory,
mkdir -p /u01/app/oracle/product/23.4.0/dbhome_1
chown -R oracle:oracle /u01
chmod -R 775 /u01
Configure environment variables,
vi ~/.bashrc
--- add
export ORACLE_SID=orcl
export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=$ORACLE_BASE/product/23.4.0/dbhome_1
export PATH=$ORACLE_HOME/bin:$PATH:$HOME/bin
export LD_LIBRARY_PATH=$ORACLE_HOME/lib
---
source ~/.bashrc
Create a directory,
mkdir -p $ORACLE_HOME
unzip files,
cd $ORACLE_HOME
unzip oracle23c.zip
Run the following command to install,
./runInstaller
According to the default options, click "Next",
According to the default options, click "Next",
Enter each item and click “Next”.
According to the default options, click "Next",
According to the default options, click "Next",
Click "Fix & Check Again",
Copy the “Fixup Script” script,
Execute the “Fixup Script” script,
/tmp/InstallActions2023-12-01_09-22-30AM/CVU_23_oracle_2023-12-01_09-22-33_9158/runfixup.sh
Execute “Check Again” to prepare to fix the Packages problem,
Install the necessary Packages,
sudo dnf install sysstat ksh nfs-utils -y
Execute “Check Again”, ignore the “Swap Size” problem, click “Next”,
Click “Install”,
Execute “Configuration Scripts”,
/u01/app/oraInventory/orainstRoot.sh
/u01/app/oracle/product/23.4.0/dbhome_1/root.sh
After the installation is complete, click "Close"
2. Connect to Oracle Database 23c
Connect to the command line and grant dba permissions to pdbadmin.
sqlplus / as sysdba
SQL> show pdbs;
CON_ID CON_NAME OPEN MODE RESTRICTED
---------- ------------------------------ ---------- ----------
2 PDB$SEED READ ONLY NO
3 PDB1 READ WRITE NO
SQL> alter session set container=pdb1;
Session altered.
SQL> grant dba to pdbadmin;
Grant succeeded.
Oracle SQL Developer connection,
3. After restarting, start the database manually
sqlplus / as sysdba
SQL> startup
4. After restarting, manually start the Listener
lsnrctl start
sqlplus / as sysdba
SQL> show parameter service
SQL> alter system register;
SQL> quit
lsnrctl status
5. Manually start the Pluggable Database
sqlplus / as sysdba
SQL> show pdbs
SQL> alter pluggable database pdb1 open;
SQL> show pdbs
6. Automatically start Pluggable Database
sqlplus / as sysdba
SQL> show pdbs
SQL> alter pluggable database pdb1 open;
SQL> show pdbs
SQL> alter pluggable database all save state;
7. Set up the startup database at startup
7-1. Modify /etc/oratab
vi /etc/oratab
--- modify
# orcl:/u01/app/oracle/product/23.4.0/dbhome_1:N
orcl:/u01/app/oracle/product/23.4.0/dbhome_1:Y
---
7-2. Modify /etc/rc.d/rc.local
echo $ORACLE_HOME
--- output
/u01/app/oracle/product/23.4.0/dbhome_1
---
vi /etc/rc.d/rc.local
--- add
su - oracle -lc "/u01/app/oracle/product/23.4.0/dbhome_1/bin/lsnrctl start"
su - oracle -lc "/u01/app/oracle/product/23.4.0/dbhome_1/bin/dbstart /u01/app/oracle/product/23.4.0/dbhome_1"
---
sudo chmod +x /etc/rc.d/rc.local
8. (Caution) Uninstall Oracle Database 23c
cd $ORACLE_HOME/deinstall/
./deinstall
rm -r /etc/oraInst.loc
rm -r /opt/ORCLfmap
rm -r /etc/oratab
9. Oracle Database 23c installation file download
Copyright issues, please wait for the official release of the download address by Oracle.
end!