{"id":4181,"date":"2025-06-07T14:00:00","date_gmt":"2025-06-07T14:00:00","guid":{"rendered":"https:\/\/w3buddy.com\/?post_type=cposts&#038;p=4181"},"modified":"2025-06-10T19:25:12","modified_gmt":"2025-06-10T19:25:12","slug":"install-oracle-19c-on-amazon-linux-2-gui-based","status":"publish","type":"cposts","link":"https:\/\/w3buddy.com\/blog\/notes\/oracle-dba-d2d-tasks\/install-oracle-19c-on-amazon-linux-2-gui-based\/","title":{"rendered":"Install Oracle 19c on Amazon Linux 2 (GUI-Based)"},"content":{"rendered":"\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p class=\"wp-block-paragraph\"><strong>Installing Oracle 19c on Amazon Linux 2<\/strong> is now easier than ever with this step-by-step guide designed for a real-world production setup. This tutorial uses the GUI-based Oracle Universal Installer (OUI) and includes verified commands, kernel tuning, X11 support, and optional patching \u2014 all tested and optimized for Amazon EC2 environments.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u2705 <em>What you\u2019ll achieve:<\/em> A fully functional Oracle 19c instance with all OS prerequisites properly configured on Amazon Linux 2 (2025).<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\ud83c\udfa5 <em>Watch this step-by-step tutorial on how to install Oracle 19c on Amazon Linux 2 (2025) before following the written guide.<\/em><\/p>\n<\/blockquote>\n\n\n\n<figure class=\"wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio\"><div class=\"wp-block-embed__wrapper\">\n<iframe loading=\"lazy\" title=\"How to Install Oracle 19c on Amazon Linux 2 (2025)? | AWS EC2 Setup | Step-by-Step Guide for DBAs\" width=\"500\" height=\"281\" src=\"https:\/\/www.youtube.com\/embed\/qJqbvGNymaQ?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" referrerpolicy=\"strict-origin-when-cross-origin\" allowfullscreen><\/iframe>\n<\/div><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u2705 Step 1: Check System Kernel Version<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Run the following command to check system details:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><code>uname -a<\/code><\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">This reveals the kernel version, architecture, and hostname. It&#8217;s crucial to verify that you&#8217;re using <strong>Amazon Linux 2<\/strong>, which is compatible with Oracle 19c.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u2705 Step 2: Install Required Packages<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Run as root:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><code>sudo yum install -y binutils compat-libcap1 compat-libstdc++-33 \\\ngcc gcc-c++ glibc glibc-devel ksh libaio libaio-devel \\\nlibX11 libXau libXi libXtst libXrender libXrender-devel \\\nlibgcc libstdc++ libstdc++-devel libxcb make smartmontools \\\nsysstat<\/code><\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">These packages include development tools, GUI libraries, and system utilities Oracle needs to install and run properly.<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p class=\"wp-block-paragraph\">\ud83d\udca1 <strong>Tip:<\/strong> These are production-tested on Amazon Linux 2 (2025), ensuring smoother installation with fewer missing dependencies.<\/p>\n<\/blockquote>\n\n\n\n<h2 class=\"wp-block-heading\">\u2705 Step 3: Configure System Kernel Parameters<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Edit <code>\/etc\/sysctl.conf<\/code> and add the following:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><code>fs.file-max = 6815744\nkernel.sem = 250 32000 100 128\nkernel.shmmni = 4096\nkernel.shmall = 1073741824\nkernel.shmmax = 4398046511104\nnet.ipv4.ip_local_port_range = 9000 65500\nnet.core.rmem_default = 262144\nnet.core.rmem_max = 4194304\nnet.core.wmem_default = 262144\nnet.core.wmem_max = 1048576<\/code><\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">These values fine-tune memory, semaphore, and networking parameters for Oracle\u2019s heavy workloads.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u2705 Step 4: Verify and Apply Kernel Parameter Changes<\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code><code>cat \/etc\/sysctl.conf\nsudo sysctl -p\nsysctl -a | grep oracle<\/code><\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">This applies the changes and verifies they&#8217;re live \u2014 no reboot required.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u2705 Step 5: Disable SELinux<\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code><code>setenforce 0\nsed -i 's\/^SELINUX=enforcing\/SELINUX=permissive\/g' \/etc\/selinux\/config\ngetenforce<\/code><\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Expected output:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><code>Permissive<\/code><\/code><\/pre>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p class=\"wp-block-paragraph\">\u26a0\ufe0f <strong>Important:<\/strong> Oracle installation fails or behaves unpredictably under SELinux Enforcing mode.<\/p>\n<\/blockquote>\n\n\n\n<h2 class=\"wp-block-heading\">\u2705 Step 6: Set Resource Limits for the Oracle User<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Run as root:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><code>echo \"oracle   soft   nofile   1024\" >> \/etc\/security\/limits.d\/oracle.conf\necho \"oracle   hard   nofile   65536\" >> \/etc\/security\/limits.d\/oracle.conf\necho \"oracle   soft   nproc    16384\" >> \/etc\/security\/limits.d\/oracle.conf\necho \"oracle   hard   nproc    16384\" >> \/etc\/security\/limits.d\/oracle.conf\necho \"oracle   soft   stack    10240\" >> \/etc\/security\/limits.d\/oracle.conf\necho \"oracle   hard   stack    32768\" >> \/etc\/security\/limits.d\/oracle.conf\necho \"oracle   hard   memlock  134217728\" >> \/etc\/security\/limits.d\/oracle.conf\necho \"oracle   soft   memlock  134217728\" >> \/etc\/security\/limits.d\/oracle.conf<\/code><\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Then verify:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><code>su - oracle\nulimit -a<\/code><\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">\u2705 Step 7: Disable Swap<\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code><code>swapoff -a\nsed -i '\/swap\/d' \/etc\/fstab\nfree -m<\/code><\/code><\/pre>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p class=\"wp-block-paragraph\">\ud83e\udde0 <strong>Why?<\/strong> Oracle uses huge pages and locked memory. Swap interferes with performance, especially for production.<\/p>\n<\/blockquote>\n\n\n\n<h2 class=\"wp-block-heading\">\u2705 Step 8: Disable Firewall<\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code><code>systemctl stop firewalld\nsystemctl disable firewalld\nsystemctl status firewalld<\/code><\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">\u2705 Step 9: Create Oracle User and Groups<\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code><code>groupadd -g 54321 oinstall\ngroupadd -g 54322 dba\ngroupadd -g 54323 oper\nuseradd -u 54321 -g oinstall -G dba,oper oracle\nid oracle<\/code><\/code><\/pre>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p class=\"wp-block-paragraph\">\ud83d\udd10 <strong>Note:<\/strong> These groups are required to define roles for installation and DB operations.<\/p>\n<\/blockquote>\n\n\n\n<h2 class=\"wp-block-heading\">\u2705 Step 10: Set Password for the Oracle User<\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code><code>passwd oracle\nsu - oracle<\/code><\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">\u2705 Step 11: Create Required Directories and Set Permissions<\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code><code>mkdir -p \/u01\/app\/oracle\/product\/19c\/db_1\nmkdir -p \/u02\/oracle\/oradata\nmkdir -p \/u02\/oracle\/FRA\nmkdir -p \/backup\/patch\nchown -R oracle:oinstall \/u01 \/u02 \/backup\nchmod -R 750 \/u01 \/u02 \/backup\nls -ld \/u01 \/u02 \/backup<\/code><\/code><\/pre>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p class=\"wp-block-paragraph\">\ud83d\udcc1 These paths are optimized for a clean multi-volume Oracle layout.<\/p>\n<\/blockquote>\n\n\n\n<h2 class=\"wp-block-heading\">\u2705 Step 12: Configure Oracle Environment Variables<\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code><code>su - oracle\nvi ~\/.bash_profile<\/code><\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Add:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><code>export TMP=\/tmp\nexport TMPDIR=$TMP\n\nexport ORACLE_HOSTNAME=ip-172-31-47-65.ap-south-1.compute.internal\nexport ORACLE_UNQNAME=cdb1\nexport ORACLE_BASE=\/u01\/app\/oracle\nexport ORACLE_HOME=\/u01\/app\/oracle\/product\/19c\/db_1\nexport ORACLE_SID=orcl\nexport ORACLE_TERM=xterm\nexport BASE_PATH=\/usr\/sbin:$PATH\nexport PATH=$ORACLE_HOME\/bin:$BASE_PATH\nexport PATH=$ORACLE_HOME\/OPatch:$PATH\nexport LD_LIBRARY_PATH=$ORACLE_HOME\/lib:\/lib:\/usr\/lib\nexport CLASSPATH=$ORACLE_HOME\/JRE:$ORACLE_HOME\/jlib:$ORACLE_HOME\/rdbms\/jlib\n<\/code><\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Reload:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><code>. ~\/.bash_profile\nenv | grep ORA<\/code><\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">\u2705 Step 13: Download, Rename, and Unzip Oracle 19c<\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code><code>cd $ORACLE_HOME\nwget -O LINUX.X64_193000_db_home.zip \"https:\/\/download.oracle.com\/otn\/linux\/oracle19c\/190000\/LINUX.X64_193000_db_home.zip?AuthParam=...\"\nunzip LINUX.X64_193000_db_home.zip -d $ORACLE_HOME\nls -lrt<\/code><\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">\u2705 Step 14: Install X11 for GUI Installer<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Amazon Linux 2:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><code>sudo yum install -y xorg-x11-xauth\nsudo yum install -y xclock xterm<\/code><\/code><\/pre>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p class=\"wp-block-paragraph\">\ud83d\udda5\ufe0f These enable you to launch the Oracle GUI installer over X11 forwarding.<\/p>\n<\/blockquote>\n\n\n\n<h2 class=\"wp-block-heading\">\u2705 Step 15: Export a False Image for Oracle Installation<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Oracle\u2019s installer checks the OS version and may fail on newer or unofficial distributions. To bypass compatibility issues, set the <code>CV_ASSUME_DISTID<\/code> environment variable to mimic a supported OS version.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Use the setting that matches your distribution:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><code># Oracle Linux\nexport CV_ASSUME_DISTID=OL8    # For Oracle Linux 8\nexport CV_ASSUME_DISTID=OL7    # For Oracle Linux 7\n\n# Red Hat Enterprise Linux (RHEL)\nexport CV_ASSUME_DISTID=RHEL8  # For RHEL 8\nexport CV_ASSUME_DISTID=RHEL7  # For RHEL 7\n\n# Amazon Linux\nexport CV_ASSUME_DISTID=OL8    # Assume compatibility with Oracle Linux 8\n\n# Ubuntu (Debian-based)\nexport CV_ASSUME_DISTID=OL8    # Mimic Oracle Linux 8\n\n# SUSE Linux Enterprise Server (SLES)\nexport CV_ASSUME_DISTID=SLES12 # For SLES 12\nexport CV_ASSUME_DISTID=SLES15 # For SLES 15\n\n# Sun Solaris (SPARC or x86)\nexport CV_ASSUME_DISTID=SOLARIS\n\n# CentOS (Now Stream)\nexport CV_ASSUME_DISTID=RHEL8  # Since CentOS is RHEL-based\n\n# Rocky Linux \/ AlmaLinux\nexport CV_ASSUME_DISTID=RHEL8<\/code><\/code><\/pre>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p class=\"wp-block-paragraph\">\u2705 <strong>Tip:<\/strong> Even if you\u2019re using Amazon Linux 2, setting <code>OL8<\/code> ensures compatibility.<\/p>\n<\/blockquote>\n\n\n\n<h3 class=\"wp-block-heading\">\ud83d\udd12 Persist the Setting for the Oracle User<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Edit the Oracle user&#8217;s <code>.bash_profile<\/code> to make this change permanent:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><code>vi ~\/.bash_profile<\/code><\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Add at the end:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><code>export CV_ASSUME_DISTID=OL8<\/code><\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Apply changes:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>. ~\/.bash_profile  # Reload profile\necho $CV_ASSUME_DISTID  # Verify setting<\/code><\/pre>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p class=\"wp-block-paragraph\">\ud83e\udde0 This prevents having to manually re-export the variable every time you log in.<\/p>\n<\/blockquote>\n\n\n\n<p class=\"wp-block-paragraph\">Expected Output:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>OL8  # or your set value<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Step 16: Start Oracle 19c Installer<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Now, switch to the&nbsp;<strong>oracle<\/strong>&nbsp;user and start the Oracle 19c GUI installer.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Switch to the oracle User<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">Run the following command from the&nbsp;<strong>ec2-user<\/strong>:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>su - oracle<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Enter the&nbsp;<strong>oracle user password<\/strong>&nbsp;when prompted.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Verify the Current Directory<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">Ensure you are in the&nbsp;<strong>oracle home directory<\/strong>:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>pwd\n# Expected Output: \/home\/oracle<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\">Set the Compatibility Variable<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">Export the CV_ASSUME_DISTID variable to ensure compatibility:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>export CV_ASSUME_DISTID=OEL7.6<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\">Start Oracle 19c Installer<\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code>cd $ORACLE_HOME\n.\/runInstaller<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">The&nbsp;<strong>Oracle Universal Installer (OUI)<\/strong>&nbsp;GUI will launch. Follow the on-screen steps to complete the installation. \u2705<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><mark>If you want to apply a&nbsp;<strong>patch<\/strong>&nbsp;while installing Oracle 19c, use the following command instead of just&nbsp;<strong>.\/runInstaller<\/strong>:<\/mark><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>.\/runInstaller -applyRU \/backup\/patch\/35943157<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>-applyRU<\/strong>\u00a0applies the\u00a0<strong>Release Update (RU)<\/strong>\u00a0patch\u00a0<strong>before<\/strong>\u00a0installation completes.<\/li>\n\n\n\n<li>Replace\u00a0<strong>35943157<\/strong>\u00a0with the correct patch number if using a different patch.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">This ensures your Oracle database is installed with the latest updates right from the start!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Installing Oracle 19c on Amazon Linux 2 is now easier than ever with this step-by-step guide designed for a real-world production setup. This tutorial uses the GUI-based Oracle Universal Installer (OUI) and includes verified commands, kernel tuning, X11 support, and optional patching \u2014 all tested and optimized for Amazon EC2 environments. \u2705 What you\u2019ll achieve: [&hellip;]<\/p>\n","protected":false},"template":"","meta":{"googlesitekit_rrm_CAowu461DA:productID":""},"categories":[952,984],"class_list":["post-4181","cposts","type-cposts","status-publish","hentry","category-notes","category-oracle-dba-d2d-tasks"],"_links":{"self":[{"href":"https:\/\/w3buddy.com\/blog\/wp-json\/wp\/v2\/cposts\/4181","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/w3buddy.com\/blog\/wp-json\/wp\/v2\/cposts"}],"about":[{"href":"https:\/\/w3buddy.com\/blog\/wp-json\/wp\/v2\/types\/cposts"}],"wp:attachment":[{"href":"https:\/\/w3buddy.com\/blog\/wp-json\/wp\/v2\/media?parent=4181"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/w3buddy.com\/blog\/wp-json\/wp\/v2\/categories?post=4181"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}