{"id":29458345,"url":"https://github.com/nmdra/oracle-database-xe-vagrant-setup","last_synced_at":"2025-09-22T17:09:14.880Z","repository":{"id":301295346,"uuid":"1008225103","full_name":"nmdra/Oracle-Database-XE-Vagrant-Setup","owner":"nmdra","description":"This guide provides a complete setup for installing and configuring Oracle Database 21c Express Edition (XE) on Oracle Linux 8 using Vagrant.","archived":false,"fork":false,"pushed_at":"2025-07-28T00:02:51.000Z","size":15,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-07-28T01:19:00.119Z","etag":null,"topics":["oracle","oracle-database","ordbms","shell-script","vagrantfile"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"wtfpl","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nmdra.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-06-25T08:09:51.000Z","updated_at":"2025-07-28T00:02:55.000Z","dependencies_parsed_at":"2025-06-26T06:26:37.580Z","dependency_job_id":null,"html_url":"https://github.com/nmdra/Oracle-Database-XE-Vagrant-Setup","commit_stats":null,"previous_names":["nmdra/oracle-database-xe-vagrant-setup"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/nmdra/Oracle-Database-XE-Vagrant-Setup","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nmdra%2FOracle-Database-XE-Vagrant-Setup","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nmdra%2FOracle-Database-XE-Vagrant-Setup/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nmdra%2FOracle-Database-XE-Vagrant-Setup/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nmdra%2FOracle-Database-XE-Vagrant-Setup/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nmdra","download_url":"https://codeload.github.com/nmdra/Oracle-Database-XE-Vagrant-Setup/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nmdra%2FOracle-Database-XE-Vagrant-Setup/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":276439797,"owners_count":25642752,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-22T02:00:08.972Z","response_time":79,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["oracle","oracle-database","ordbms","shell-script","vagrantfile"],"created_at":"2025-07-13T23:37:16.222Z","updated_at":"2025-09-22T17:09:14.875Z","avatar_url":"https://github.com/nmdra.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Oracle XE 21c on Oracle Linux 8 with Vagrant\n\nThis guide provides a complete setup for installing and configuring Oracle Database 21c Express Edition (XE) on Oracle Linux 8 using Vagrant. It includes database installation, verification, listener configuration, remote access setup, and troubleshooting steps.\n\n\u003e [!NOTE]\n\u003e If you have questions, issues, or suggestions related to this setup, feel free to start a [discussion](https://github.com/nmdra/Oracle-Database-XE-Vagrant-Setup/discussions) or open an [issue](https://github.com/nmdra/Oracle-Database-XE-Vagrant-Setup/issues) in this repository.\n\n## Prerequisites\n\n1. **Download the required RPMs** and place them in the same folder as your `Vagrantfile`:\n\n   - [oracle-database-xe-21c-1.0-1.ol8.x86_64.rpm](https://download.oracle.com/otn-pub/otn_software/db-express/oracle-database-xe-21c-1.0-1.ol8.x86_64.rpm)\n   - [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)\n\n## Vagrant Setup\n\nLaunch the VM:\n\n```bash\nvagrant up\nvagrant ssh\n````\n## Post-Installation\n\n### Oracle XE Default Credentials\n\n* **Username:** `system`\n* **Password:** `Oracle123`\n\n## Verify Database Connection\n\n1. SSH into the VM and switch to the `oracle` user:\n\n   ```bash\n   vagrant ssh\n   sudo su - oracle\n   ```\n\n2. Start SQL\\*Plus:\n\n   ```bash\n   sqlplus\n   ```\n\n3. Login:\n\n   ```\n   Enter user-name: system\n   Enter password: Oracle123\n   ```\n\n4. Run a test query:\n\n   ```sql\n   SELECT 'Hello, Oracle!' AS test_message FROM dual;\n   ```\n\n   Expected output:\n\n   ```\n   TEST_MESSAGE\n   --------------\n   Hello, Oracle!\n   ```\n## Troubleshooting: ORA-12514\n\n### Error\n\n```\nORA-12514: TNS:listener does not currently know of service requested in connect descriptor\n```\n\nThis error indicates that the service (e.g., `XE`) is not registered with the Oracle listener.\n\n### Step-by-Step Fix\n\n1. **Switch to the Oracle user:**\n\n   ```bash\n   vagrant ssh\n   sudo su - oracle\n   ```\n\n2. **Login as SYSDBA:**\n\n   ```bash\n   sqlplus / as sysdba\n   ```\n\n3. **Check database status:**\n\n   ```sql\n   SELECT status FROM v$instance;\n   ```\n\n   If the result is not `OPEN`, start the database:\n\n   ```sql\n   STARTUP;\n   ```\n\n4. **Register the service:**\n\n   ```sql\n   ALTER SYSTEM REGISTER;\n   ```\n\n5. **Verify listener status:**\n\n   Exit SQL\\*Plus:\n\n   ```bash\n   exit\n   ```\n\n   Then run:\n\n   ```bash\n   lsnrctl status\n   ```\n\n   Look for:\n\n   ```\n   Service \"XE\" has 1 instance(s).\n   Instance \"XE\", status READY, has 1 handler(s) for this service...\n   ```\n## Remote Access Configuration (Advanced)\n\n\u003e [!CAUTION]\n\u003e This section is intended for advanced users. Modifying Oracle listener and network configurations without understanding the implications can result in service unavailability or connectivity issues. Only proceed if you understand what you're doing.\n\n### File Locations\n\n| File           | Purpose         | Location                                                      |\n| -------------- | --------------- | ------------------------------------------------------------- |\n| `listener.ora` | Listener config | `/opt/oracle/homes/OraDBHome21cXE/network/admin/listener.ora` |\n| `tnsnames.ora` | Client config   | `~/.oracle/network/admin/tnsnames.ora` or `/etc/tnsnames.ora` |\n\n### Server Configuration: `listener.ora`\n\nEdit the file:\n\n```bash\nsudo vi /opt/oracle/homes/OraDBHome21cXE/network/admin/listener.ora\n```\n\nUpdate contents to:\n\n```ini\nLISTENER =\n  (DESCRIPTION_LIST =\n    (DESCRIPTION =\n      (ADDRESS = (PROTOCOL = TCP)(HOST = 0.0.0.0)(PORT = 1521))\n    )\n  )\n\nDEFAULT_SERVICE_LISTENER = XE\n```\n\nRestart the listener:\n\n```bash\nlsnrctl stop\nlsnrctl start\nlsnrctl status\n```\n\nEnsure `XE` service appears in the output.\n\n---\n\n### Client Configuration: `tnsnames.ora`\n\nOn the client machine (or host system), create or edit `tnsnames.ora`:\n\n```ini\nXE =\n  (DESCRIPTION =\n    (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.56.38)(PORT = 1521))\n    (CONNECT_DATA =\n      (SERVICE_NAME = XE)\n    )\n  )\n```\n\nReplace `192.168.56.38` with the actual IP address of the Oracle VM.\n\n---\n\n## Test Remote Connection\n\nFrom a system with Oracle tools installed:\n\n```bash\nsqlplus system/Oracle123@XE\n```\nOr connect directly using the full descriptor:\n\n```bash\nsqlplus system/Oracle123@//192.168.56.38:1521/XE\n```\n## Resources\n\n- Vagrant Documentation:\n   - https://developer.hashicorp.com/vagrant/docs\n- Oracle XE 21c Documentation:\n   - https://docs.oracle.com/en/database/oracle/oracle-database/21/xeinl/\n \n---\n\u003cdiv align=\"center\"\u003e\n  \u003ca href=\"https://blog.nimendra.xyz\"\u003e 🌎 nmdra.xyz\u003c/a\u003e |\n  \u003ca href=\"https://github.com/nmdra\"\u003e 👨‍💻 Github\u003c/a\u003e |\n  \u003ca href=\"https://twitter.com/nimendra_\"\u003e 🐦 Twitter\u003c/a\u003e\n\u003c/div\u003e\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnmdra%2Foracle-database-xe-vagrant-setup","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnmdra%2Foracle-database-xe-vagrant-setup","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnmdra%2Foracle-database-xe-vagrant-setup/lists"}