The experiences, Test cases, views, and opinions etc expressed in this website are my own and does not reflect the views or opinions of my employer. This site is independent of and does not represent Oracle Corporation in any way. Oracle does not officially sponsor, approve, or endorse this site or its content.Product and company names mentioned in this website may be the trademarks of their respective owners.
Oracle Database Express Edition (XE) is a community supported edition of the Oracle Database family. It can be Installed in Linux, Windows, Dockers, and Virtual Machine as well.
Oracle Database Express Edition does not restrict in which environment it can be deployed. However, Oracle Database Express Edition is not supported and does not receive any patches, including security patches.
Oracle Database XE supports up to:
2 CPUs for foreground processes
2GB of RAM (SGA and PGA combined)
12GB of user data on disk (irrespective of compression factor)
wget https://download.oracle.com/otn-pub/otn_software/db-express/oracle-database-xe-21c-1.0-1.ol8.x86_64.rpm
--2022-12-22 06:35:24-- https://download.oracle.com/otn-pub/otn_software/db-express/oracle-database-xe-21c-1.0-1.ol8.x86_64.rpm
Resolving download.oracle.com (download.oracle.com)... 23.216.84.89
Connecting to download.oracle.com (download.oracle.com)|23.216.84.89|:443... connected.
HTTP request sent, awaiting response... 302 Moved Temporarily
Location: https://edelivery.oracle.com/otn-pub/otn_software/db-express/oracle-database-xe-21c-1.0-1.ol8.x86_64.rpm [following]
--2022-12-22 06:35:24-- https://edelivery.oracle.com/otn-pub/otn_software/db-express/oracle-database-xe-21c-1.0-1.ol8.x86_64.rpm
Resolving edelivery.oracle.com (edelivery.oracle.com)... 23.218.130.184, 2600:1408:9000:690::366, 2600:1408:9000:684::366
Connecting to edelivery.oracle.com (edelivery.oracle.com)|23.218.130.184|:443... connected.
HTTP request sent, awaiting response... 302 Moved Temporarily
Location: https://download.oracle.com/otn-pub/otn_software/db-express/oracle-database-xe-21c-1.0-1.ol8.x86_64.rpm?AuthParam=1671709045_2ea5c9ceb6bfd5f59e6722739e5109ef [following]
--2022-12-22 06:35:25-- https://download.oracle.com/otn-pub/otn_software/db-express/oracle-database-xe-21c-1.0-1.ol8.x86_64.rpm?AuthParam=1671709045_2ea5c9ceb6bfd5f59e6722739e5109ef
Connecting to download.oracle.com (download.oracle.com)|23.216.84.89|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 2339651768 (2.2G) [application/x-redhat-package-manager]
Saving to: ‘oracle-database-xe-21c-1.0-1.ol8.x86_64.rpm’
oracle-database-xe-21c-1.0-1.ol8.x86_64.rpm 54%[=========================================================================> ] 1.18G 2.14MB/s eta 2m 41s
oracle-database-xe-21c-1.0-1.ol8.x86_64.rpm 67%[===========================================================================================> ] 1.47G 2.80MB/s eta 2m 27s
oracle-database-xe-21c-1.0-1.ol8.x86_64.rpm 80%[=============================================================================================================> ] 1.76G 2.85MB/s eta 98s
oracle-database-xe-21c-1.0-1.ol8.x86_64.rpm 80%[=============================================================================================================> ] 1.76G 2.76MB/s eta 98s
oracle-database-xe-21c-1.0-1.ol8.x86_64.rpm 100%[========================================================================================================================================>] 2.18G 6.60MB/s in 8m 57s
2022-12-22 06:44:22 (4.16 MB/s) - ‘oracle-database-xe-21c-1.0-1.ol8.x86_64.rpm’ saved [2339651768/2339651768]
Downloading PreInstall RPM
curl -o oracle-database-preinstall-21c-1.0-1.el8.x86_64.rpm https://yum.oracle.com/repo/OracleLinux/OL8/appstream/x86_64/getPackage/oracle-database-preinstall-21c-1.0-1.el8.x86_64.rpm
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 30772 100 30772 0 0 132k 0 --:--:-- --:--:-- --:--:-- 132k
dnf -y localinstall oracle-database-xe-21c-1.0-1.ol8.x86_64.rpm
Last metadata expiration check: 3:43:34 ago on Thu 22 Dec 2022 03:25:41 AM EST.
Dependencies resolved.
=============================================================================================================================================================================================================================================
Package Architecture Version Repository Size
=============================================================================================================================================================================================================================================
Installing:
oracle-database-xe-21c x86_64 1.0-1 @commandline 2.2 G
Transaction Summary
=============================================================================================================================================================================================================================================
Install 1 Package
Total size: 2.2 G
Installed size: 5.8 G
Downloading Packages:
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
Preparing : 1/1
Running scriptlet: oracle-database-xe-21c-1.0-1.x86_64 1/1
Installing : oracle-database-xe-21c-1.0-1.x86_64 1/1
Running scriptlet: oracle-database-xe-21c-1.0-1.x86_64 1/1
[INFO] Executing post installation scripts...
[INFO] Oracle home installed successfully and ready to be configured.
To configure Oracle Database XE, optionally modify the parameters in '/etc/sysconfig/oracle-xe-21c.conf' and then execute '/etc/init.d/oracle-xe-21c configure' as root.
Verifying : oracle-database-xe-21c-1.0-1.x86_64 1/1
Installed:
oracle-database-xe-21c-1.0-1.x86_64
Complete!
This Completes the Required RPM and Database Installation
Configuring the Database
# /etc/init.d/oracle-xe-21c configure
Oracle Net Listener configured.
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:
Confirm the password:
Configuring Oracle Listener.
Listener configuration succeeded.
Configuring Oracle Database XE.
Enter SYS user password:
************
Enter SYSTEM user password:
**************
Enter PDBADMIN User Password:
**************
[WARNING] [INS-08109] Unexpected error occurred while validating inputs at state 'DBCreationOptions'.
CAUSE: No additional information available.
ACTION: Contact Oracle Support Services or refer to the software manual.
SUMMARY:
- java.lang.NullPointerException
Database configuration failed. Check logs under '/opt/oracle/cfgtoollogs/dbca'.
Set the CV_ASSUME_DISTID variable as its coming as NULL, to proceed further.
export CV_ASSUME_DISTID=OEL8.4
# /etc/init.d/oracle-xe-21c configure
Oracle Net Listener configured.
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:
Confirm the password:
Configuring Oracle Listener.
Listener configuration succeeded.
Configuring Oracle Database XE.
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
37% complete
40% complete
43% complete
Completing Database Creation
47% 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/XE.
Database Information:
Global Database Name:XE
System Identifier(SID):XE
Look at the log file "/opt/oracle/cfgtoollogs/dbca/XE/XE.log" for further details.
Connect to Oracle Database using one of the connect strings:
Pluggable database: masked_FQDN:1523/XEPDB1
Multitenant container database: masked_FQDN:1523
Use https://localhost:5500/em to access Oracle Enterprise Manager for Oracle Database XE
This Completes the Oracle Database 21c Express Edition Installation on Oracle Linux 9
$ sqlplus /nolog
SQL*Plus: Release 21.0.0.0.0 - Production on Thu Dec 22 08:03:44 2022
Version 21.3.0.0.0
Copyright (c) 1982, 2021, Oracle. All rights reserved.
SQL> exit
Disconnected from Oracle Database 21c Express Edition Release 21.0.0.0.0 - Production
Version 21.3.0.0.0
Upgrade from MySQL 5.7 to 8.0 is supported. However, upgrade is only supported between General Availability (GA) releases. For MySQL 8.0, it is required that you upgrade from a MySQL 5.7 GA release (5.7.9 or higher). Upgrades from non-GA releases of MySQL 5.7 are not supported.
Upgrading to the latest release is recommended before upgrading to the next version. For example, upgrade to the latest MySQL 5.7 release before upgrading to MySQL 8.0.
Upgrade that skips versions is not supported. For example, upgrading directly from MySQL 5.6 to 8.0 is not supported.
Once a release series reaches General Availability (GA) status, upgrade within the release series (from one GA version to another GA version) is supported. For example, upgrading from MySQL 8.0.x to 8.0.y is supported. (Upgrade involving development-status non-GA releases is not supported.) Skipping a release is also supported. For example, upgrading from MySQL 8.0.x to 8.0.z is supported. MySQL 8.0.11 is the first GA status release within the MySQL 8.0 release series.
[root@localhost mysql_binaries]# yum localinstall mysql-community-{server,client,common,libs}-*
Loaded plugins: fastestmirror, langpacks
Examining mysql-community-server-8.0.30-1.el7.x86_64.rpm: mysql-community-server-8.0.30-1.el7.x86_64
Marking mysql-community-server-8.0.30-1.el7.x86_64.rpm as an update to mysql-community-server-5.7.9-1.el7.x86_64
Examining mysql-community-server-debug-8.0.30-1.el7.x86_64.rpm: mysql-community-server-debug-8.0.30-1.el7.x86_64
Marking mysql-community-server-debug-8.0.30-1.el7.x86_64.rpm to be installed
Examining mysql-community-client-8.0.30-1.el7.x86_64.rpm: mysql-community-client-8.0.30-1.el7.x86_64
Marking mysql-community-client-8.0.30-1.el7.x86_64.rpm as an update to mysql-community-client-5.7.9-1.el7.x86_64
Examining mysql-community-client-plugins-8.0.30-1.el7.x86_64.rpm: mysql-community-client-plugins-8.0.30-1.el7.x86_64
Marking mysql-community-client-plugins-8.0.30-1.el7.x86_64.rpm to be installed
Examining mysql-community-common-8.0.30-1.el7.x86_64.rpm: mysql-community-common-8.0.30-1.el7.x86_64
Marking mysql-community-common-8.0.30-1.el7.x86_64.rpm as an update to mysql-community-common-5.7.9-1.el7.x86_64
Examining mysql-community-libs-8.0.30-1.el7.x86_64.rpm: mysql-community-libs-8.0.30-1.el7.x86_64
Marking mysql-community-libs-8.0.30-1.el7.x86_64.rpm as an update to mysql-community-libs-5.7.9-1.el7.x86_64
Examining mysql-community-libs-compat-8.0.30-1.el7.x86_64.rpm: mysql-community-libs-compat-8.0.30-1.el7.x86_64
Marking mysql-community-libs-compat-8.0.30-1.el7.x86_64.rpm as an update to mysql-community-libs-compat-5.7.9-1.el7.x86_64
Resolving Dependencies
--> Running transaction check
---> Package mysql-community-client.x86_64 0:5.7.9-1.el7 will be updated
---> Package mysql-community-client.x86_64 0:8.0.30-1.el7 will be an update
---> Package mysql-community-client-plugins.x86_64 0:8.0.30-1.el7 will be installed
---> Package mysql-community-common.x86_64 0:5.7.9-1.el7 will be updated
---> Package mysql-community-common.x86_64 0:8.0.30-1.el7 will be an update
---> Package mysql-community-libs.x86_64 0:5.7.9-1.el7 will be updated
---> Package mysql-community-libs.x86_64 0:8.0.30-1.el7 will be an update
---> Package mysql-community-libs-compat.x86_64 0:5.7.9-1.el7 will be updated
---> Package mysql-community-libs-compat.x86_64 0:8.0.30-1.el7 will be an update
---> Package mysql-community-server.x86_64 0:5.7.9-1.el7 will be updated
---> Package mysql-community-server.x86_64 0:8.0.30-1.el7 will be an update
---> Package mysql-community-server-debug.x86_64 0:8.0.30-1.el7 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
=============================================================================================================================================================================================================================================
Package Arch Version Repository Size
=============================================================================================================================================================================================================================================
Installing:
mysql-community-client-plugins x86_64 8.0.30-1.el7 /mysql-community-client-plugins-8.0.30-1.el7.x86_64 14 M
mysql-community-server-debug x86_64 8.0.30-1.el7 /mysql-community-server-debug-8.0.30-1.el7.x86_64 115 M
Updating:
mysql-community-client x86_64 8.0.30-1.el7 /mysql-community-client-8.0.30-1.el7.x86_64 71 M
mysql-community-common x86_64 8.0.30-1.el7 /mysql-community-common-8.0.30-1.el7.x86_64 9.9 M
mysql-community-libs x86_64 8.0.30-1.el7 /mysql-community-libs-8.0.30-1.el7.x86_64 7.6 M
mysql-community-libs-compat x86_64 8.0.30-1.el7 /mysql-community-libs-compat-8.0.30-1.el7.x86_64 3.7 M
mysql-community-server x86_64 8.0.30-1.el7 /mysql-community-server-8.0.30-1.el7.x86_64 241 M
Transaction Summary
=============================================================================================================================================================================================================================================
Install 2 Packages
Upgrade 5 Packages
Total size: 462 M
Is this ok [y/d/N]: y
Downloading packages:
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Installing : mysql-community-client-plugins-8.0.30-1.el7.x86_64 1/12
Updating : mysql-community-common-8.0.30-1.el7.x86_64 2/12
Updating : mysql-community-libs-8.0.30-1.el7.x86_64 3/12
Updating : mysql-community-client-8.0.30-1.el7.x86_64 4/12
Updating : mysql-community-server-8.0.30-1.el7.x86_64 5/12
Installing : mysql-community-server-debug-8.0.30-1.el7.x86_64 6/12
Updating : mysql-community-libs-compat-8.0.30-1.el7.x86_64 7/12
Cleanup : mysql-community-server-5.7.9-1.el7.x86_64 8/12
Cleanup : mysql-community-client-5.7.9-1.el7.x86_64 9/12
Cleanup : mysql-community-libs-compat-5.7.9-1.el7.x86_64 10/12
Cleanup : mysql-community-libs-5.7.9-1.el7.x86_64 11/12
Cleanup : mysql-community-common-5.7.9-1.el7.x86_64 12/12
Verifying : mysql-community-common-8.0.30-1.el7.x86_64 1/12
Verifying : mysql-community-client-plugins-8.0.30-1.el7.x86_64 2/12
Verifying : mysql-community-libs-8.0.30-1.el7.x86_64 3/12
Verifying : mysql-community-client-8.0.30-1.el7.x86_64 4/12
Verifying : mysql-community-libs-compat-8.0.30-1.el7.x86_64 5/12
Verifying : mysql-community-server-8.0.30-1.el7.x86_64 6/12
Verifying : mysql-community-server-debug-8.0.30-1.el7.x86_64 7/12
Verifying : mysql-community-client-5.7.9-1.el7.x86_64 8/12
Verifying : mysql-community-libs-5.7.9-1.el7.x86_64 9/12
Verifying : mysql-community-server-5.7.9-1.el7.x86_64 10/12
Verifying : mysql-community-common-5.7.9-1.el7.x86_64 11/12
Verifying : mysql-community-libs-compat-5.7.9-1.el7.x86_64 12/12
Installed:
mysql-community-client-plugins.x86_64 0:8.0.30-1.el7 mysql-community-server-debug.x86_64 0:8.0.30-1.el7
Updated:
mysql-community-client.x86_64 0:8.0.30-1.el7 mysql-community-common.x86_64 0:8.0.30-1.el7 mysql-community-libs.x86_64 0:8.0.30-1.el7 mysql-community-libs-compat.x86_64 0:8.0.30-1.el7 mysql-community-server.x86_64 0:8.0.30-1.el7
Complete!
This completes the Upgrade from 5.7 to 8.0(Or Latest) Start the Service again and verify.
[root@localhost mysql_binaries]# service mysqld start
Redirecting to /bin/systemctl start mysqld.service
[root@localhost mysql_binaries]# service mysqld status
Redirecting to /bin/systemctl status mysqld.service
● mysqld.service - MySQL Server
Loaded: loaded (/usr/lib/systemd/system/mysqld.service; enabled; vendor preset: disabled)
Active: active (running) since Sun 2022-10-02 03:54:08 EDT; 4s ago
Docs: man:mysqld(8)
http://dev.mysql.com/doc/refman/en/using-systemd.html
Process: 21468 ExecStartPre=/usr/bin/mysqld_pre_systemd (code=exited, status=0/SUCCESS)
Main PID: 21502 (mysqld)
Status: "Server is operational"
Tasks: 39
CGroup: /system.slice/mysqld.service
└─21502 /usr/sbin/mysqld
Oct 02 03:53:16 localhost.localdomain systemd[1]: Starting MySQL Server...
Oct 02 03:54:08 localhost.localdomain systemd[1]: Started MySQL Server.
Note You can also use rpm -Uvh *.rpm to upgrade the Version.
Connect to the Database and verify if there are any errors.
[root@localhost mysql_binaries]# mysql -uroot -p************
mysql: [Warning] Using a password on the command line interface can be insecure.
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 11
Server version: 8.0.30 MySQL Community Server - GPL
Copyright (c) 2000, 2022, Oracle and/or its affiliates.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| mysql |
| performance_schema |
| sriram |
| sys |
+--------------------+
5 rows in set (0.00 sec)
mysql> use sriram;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Database changed
mysql> show tables;
+------------------+
| Tables_in_sriram |
+------------------+
| sriram_table |
+------------------+
1 row in set (0.01 sec)
mysql> select * from sriram_table;
+------+---------+
| id | name |
+------+---------+
| 1 | Sriram |
| 2 | Sriram2 |
| 3 | Sriram3 |
+------+---------+
3 rows in set (0.00 sec)
mysql> show variables like '%version%';
+--------------------------+------------------------------+
| Variable_name | Value |
+--------------------------+------------------------------+
| admin_tls_version | TLSv1.2 |
| immediate_server_version | 999999 |
| innodb_version | 8.0.30 |
| original_server_version | 999999 |
| protocol_version | 10 |
| replica_type_conversions | |
| slave_type_conversions | |
| tls_version | TLSv1.2 |
| version | 8.0.30 |
| version_comment | MySQL Community Server - GPL |
| version_compile_machine | x86_64 |
| version_compile_os | Linux |
| version_compile_zlib | 1.2.12 |
+--------------------------+------------------------------+
13 rows in set (0.00 sec)
mysql> SELECT VERSION();
+-----------+
| VERSION() |
+-----------+
| 8.0.30 |
+-----------+
1 row in set (0.00 sec)
mysql>
Since Mysql_upgrade is deprecated and unneeded in Version 8.0.16 and later, you can run mysql_check if needed.
[root@localhost mysql_binaries]# mysql_upgrade -uroot -p
The mysql_upgrade client is now deprecated. The actions executed by the upgrade client are now done by the server.
To upgrade, please start the new MySQL binary with the older data directory. Repairing user tables is done automatically. Restart is not required after upgrade.
The upgrade process automatically starts on running a new MySQL binary with an older data directory. To avoid accidental upgrades, please use the --upgrade=NONE option with the MySQL binary. The option --upgrade=FORCE is also provided to run the server upgrade sequence on demand.
It may be possible that the server upgrade fails due to a number of reasons. In that case, the upgrade sequence will run again during the next MySQL server start. If the server upgrade fails repeatedly, the server can be started with the --upgrade=MINIMAL option to start the server without executing the upgrade sequence, thus allowing users to manually rectify the problem.
Option 2: Follow the Below steps to Complete the Upgrade Steps
Take a backup of all the Databases & Parameter /Variable Values assigned.
Stop the Service.
Remove the Installed Old Version RPM by running rpm -qa mysql* and rpm -e <RPM_LIST>
Install the Latest Version
Restore the Backup from above
Add and Apply variable as before as supported
Conclusion : We have successfully completed the MySQL Community Server Version Upgrade on a standalone Server from 5.7 to 8.0.30
One can Install Apache and Nginx using YUM Or DNF in the Selected Unix flavor whereas by default it is a non-secure sub-domain when you access.
Lets encrypt offers free SSL which can be configured to get the SSL for your domain irrespective of Private Or Public Domains. In case of Private Domains , you just need to add a text Entry to Pass the Validations.
For this I am using Oracle Cloud Instance(Always Free).
As its the Initial Login after Instance provision , run the yum update and Install Apache and/or Nginx as per your choice.
Run Yum Update and make sure everything updated without any issues.
Install Apache-httpd using yum repo.
Try Access the IP/Hostname to see the Installed Apache Default Page.
Install Nginx using Yum
Try to Access Nginx from the Browser
Enable EPEL Repo to Configure Snap and Certbot
Enable the Socket and run the below to Install certbot ,
systemctl enable --now snapd.socket
ln -s /var/lib/snapd/snap /snap
snap install certbot --classic
Restart your session to get the Certbot ,You can Configure SSL for Nginx Or Apache as below, Add an Entry in you domain controller for your IP matching with the Host Name Configured.
Adding Domain Entry for the HostName
You can Either Configure SSL and Install Or Choose the certonly Option to Get the Certificates only, you can configure your SSL.conf as per your webserver configuration Also In case , your System is not internet facing, You can choose the Preferred Challenges as either http or DNS You can review the Supported Challenged here https://letsencrypt.org/docs/challenge-types/