Skip to content

Instantly share code, notes, and snippets.

@dungsaga
Created March 4, 2022 08:34
Show Gist options
  • Save dungsaga/4cbdb21333ec5eb53bf39cb9ab174cc3 to your computer and use it in GitHub Desktop.
Save dungsaga/4cbdb21333ec5eb53bf39cb9ab174cc3 to your computer and use it in GitHub Desktop.
install Oracle XE 18c under WSL2

install Oracle XE 18c under WSL2

  • install package is RPM, it's easier to use CentOS 7 or 8 (from CentOS-WSL or wsldl)
  • if you want to use Debian/Ubuntu, you must convert RPM to DEB (but conversion with alien fails under Debian)
  • first, install oracle-database-preinstall-18c-1.0-1.el7.x86_64.rpm
  • second, install oracle-database-xe-18c-1.0-1.x86_64.rpm
  • see https://mikesmithers.wordpress.com/2019/01/03/installing-and-configuring-oracle-18cxe-on-centos/
  • run as root: /etc/init.d/oracle-xe-18c configure
  • it would fail if host IP is auto-generated to be 127.0.1.1
  • you can update the IP in /etc/hosts and try it again
  • after a while, it claimed around 10GB and finished
  • if you run lsnrctl status, you could see it's listening in the full-qualified host name of the VM in WSL
  • if you want to connect from outside, you may update /opt/oracle/product/18c/dbhomeXE/network/admin/listener.ora and set HOST=0.0.0.0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment