Pobieranie plików rpm z Oracle SQL
https://yum.oracle.com/oracle-linux-isos.html ISO Sytemu Oracle Linux
https://www.oracle.com/database/free/download/
https://www.youtube.com/watch?v=ePjupjnZwr4&t=546s
Zainstalowanie pakietów (opcjonalne jeżeli ich nie ma w systemie)
yum install binutils compat-openssl10 glibc-devel initscripts ksh libnsl make sysstat
yum -y localinstall oracle-database-preinstall*
yum -y localinstall oracle-database-preinstall-23c-1.0-0.5.el8.x86_64.rpm
yum -y localinstall oracle-database-free*
/etc/init.d/oracle-free-23c configure
[INFO] Executing post installation scripts…
[INFO] Oracle home installed successfully and ready to be configured.
To configure Oracle Database Free, optionally modify the parameters in '/etc/sysconfig/oracle-free-23c.conf’ and then run '/etc/init.d/oracle-free-23c configure’ as root.
nano /etc/sysconfig/oracle-free-23c.conf
Zmienne środowiskowe dla konta:
nano /home/marcin/.bash_profile
Dopisać na końcu pliku
export ORACLE_HOME=/opt/oracle/product/23c/dbhomeFree
export PATH=$PATH:$ORACLE_HOME/bin
Od tego momentu będzie działać polecenie sqlplus.
systemctl enable oracle-free-23c
systemctl start oracle-free-23c
systemctl status oracle-free-23c
Nasłuchiwanie bazy na adresach IP
nano /opt/oracle/product/23c/dbhomeFree/network/admin/listener.ora
sqlplus sys@localhost:1521/FREE as sysdba
[root@OracleLinux Wymiana]# /etc/init.d/oracle-free-23c configure
Specify a password to be used for database accounts. Oracle recommends that the password entered should be at least 8 characters in length, contain at least 1 uppercase character, 1 lower case character and 1 digit [0-9]. Note that the same password will be used for SYS, SYSTEM and PDBADMIN accounts:
The password you entered contains invalid characters. Enter password:
The password you entered contains invalid characters. Enter password:
Confirm the password:
Configuring Oracle Listener.
Listener configuration succeeded.
Configuring Oracle Database FREE.
Enter SYS user password:
Enter SYSTEM user password:
Enter PDBADMIN User Password:
Prepare for db operation
7% complete
Copying database files
29% complete
Creating and starting Oracle instance
30% complete
33% complete
36% complete
39% complete
43% complete
Completing Database Creation
47% complete
49% complete
50% complete
Creating Pluggable Databases
54% complete
71% complete
Executing Post Configuration Actions
93% complete
Running Custom Scripts
100% complete
Database creation complete. For details check the logfiles at:
/opt/oracle/cfgtoollogs/dbca/FREE.
Database Information:
Global Database Name:FREE
System Identifier(SID):FREE
Look at the log file „/opt/oracle/cfgtoollogs/dbca/FREE/FREE.log” for further details.
Connect to Oracle Database using one of the connect strings:
Pluggable database: OracleLinux/FREEPDB1
Multitenant container database: OracleLinux
[root@OracleLinux Wymiana]#
Utwórz bazę danych
Oprócz instalacji oprogramowania, RPM tworzy skrypt, który pozwala nam stworzyć bazę danych demonstracyjnych o nazwie „FREE” z wtykową bazą danych (PDB) o nazwie „FREEPDB1”. W poniższym przykładzie ustawiamy DB_PASSWORD zmienną środowiskową, dzięki czemu możemy wykonać ciche tworzenie bazy danych za pomocą skryptu.







