Skip to content

Instantly share code, notes, and snippets.

@davidmaignan
Last active March 28, 2024 18:23
Show Gist options
  • Save davidmaignan/d0d941cbf761678457b865e6de041af0 to your computer and use it in GitHub Desktop.
Save davidmaignan/d0d941cbf761678457b865e6de041af0 to your computer and use it in GitHub Desktop.
Basic installation for oracle-xe on archlinux

Clone git repository

git clone https://aur.archlinux.org/oracle-xe.git
cd oracle-xe

Download oracle-xe-rpm.zip

wget http://download.oracle.com/otn/linux/oracle11g/xe/oracle-xe-11.2.0-1.0.x86_64.rpm.zip

Installation (follow instructions)

makepkg -si

Run configuration

/etc/rc.d/oracle-xe configure

Locate oracle_env.sh - it should be located somewhere in the cloned folder

source oracle_env.sh 

Connect to oracle

sqlplus /nolog

at sql prompt

connect system/password

create a user

create user usename identified by password;

Grant permissions

grant CREATE SESSION, ALTER SESSION, CREATE DATABASE LINK, CREATE MATERIALIZED VIEW, CREATE PROCEDURE, CREATE PUBLIC SYNONYM, CREATE ROLE, CREATE SEQUENCE, CREATE SYNONYM, CREATE TABLE, CREATE TRIGGER, CREATE TYPE, CREATE VIEW, UNLIMITED TABLESPACE  to username;

Swith to the newly created user

connect username/password

Check tables

select table_name from user_tables;

Logout

exit

Login

sqlplus username/password

Start, stop server

/etc/rc.d/oracle-xe {start|stop|restart|force-reload|configure|status|enable|disable}

Ressources

https://aur.archlinux.org/packages/oracle-xe/ https://docs.oracle.com/cd/B25329_01/doc/admin.102/b25107/connecting.htm#CHDJDAJA https://docs.oracle.com/cd/E17781_01/admin.112/e18585/toc.htm#XEGSG111

@SBeausoleil
Copy link

SBeausoleil commented Feb 21, 2019

I get an error when I try to connect to SYS:

ERROR:
ORA-28009: connection as SYS should be as SYSDBA or SYSOPER

What can I do to connec to SYS? What is SYSDBA?

EDIT: I found that you must write
connect SYS/<password here> AS SYSDBA
to connect to SYS

@ReyesEvan
Copy link

This is a gorgeus tutorial. Everyone trying to install Oracle should read this.

@isdin
Copy link

isdin commented Jun 16, 2019

You're the best bro ! trying for 1 full day, now it's working!

@SyedTayyabUlMazhar
Copy link

You can also download oracle-xe-rpm.zip from :
https://www.oracle.com/database/technologies/xe-prior-releases.html

@SyedTayyabUlMazhar
Copy link

@jaalorsa517
You just have to download the linux file from https://www.oracle.com/database/technologies/xe-prior-releases.html

and put it in cloned repo folder. Then just make pkg as shown in gist.

@ak-seyam
Copy link

ak-seyam commented Feb 9, 2020

just a quick note for newbies like myself: Do not use spaces in your mount point folder you will get an error from cd

@nando-dotjs
Copy link

It works, thank you! Great tutorial :)

@jee4nc
Copy link

jee4nc commented Apr 9, 2020

Thanks! im new in Arch distros and i will need oracle 11g for my university classes. greeting from Chile 🇨🇱

@joshuac17
Copy link

Does anybody knows if these steps also works to install Oracle Express 18c on Arch/Manjaro?

@raknos13
Copy link

Great concise guide. Worked like a charm. Needed to install this for college. Thank You!

@raknos13
Copy link

Does anybody knows if these steps also works to install Oracle Express 18c on Arch/Manjaro?

Check out this guide.
https://geraldonit.com/2018/10/23/how-to-install-oracle-database-18c-xe-on-linux/

Also just a google search will give you a couple of other guides.

@ak-seyam
Copy link

ak-seyam commented Oct 19, 2020

Does anybody knows if these steps also works to install Oracle Express 18c on Arch/Manjaro?

Same steps just use oracle-xe and

wget https://download.oracle.com/otn-pub/otn_software/db-express/oracle-database-xe-18c-1.0-1.x86_64.rpm
# instead of 
# wget http://download.oracle.com/otn/linux/oracle11g/xe/oracle-xe-11.2.0-1.0.x86_64.rpm.zip

make sure to at c## before creating a new common user

@ghassenelkamel
Copy link

/etc/rc.d/oracle-xe configure
bash: /etc/rc.d/oracle-xe: No such file or directory
Arch uses systemd not rc.d and init

@SunnyRaj84348
Copy link

/etc/rc.d/oracle-xe configure
bash: /etc/rc.d/oracle-xe: No such file or directory
Arch uses systemd not rc.d and init

Read pinned comment link

@cr105ph1nx
Copy link

I spent more than 3 hours trying to install Oracle Database Express following the ArchWiki doc with no success. Your concise guide saved me a lot of headache!

@TheB3rX
Copy link

TheB3rX commented Jun 10, 2022

Hello, i can't find /rc.d/ folder or anything that seems like it

@sunnyraj-misc
Copy link

Hello, i can't find /rc.d/ folder or anything that seems like it

As per systemd init, use systemd enable --now oracle-xe

@OSITO326
Copy link

OSITO326 commented Sep 7, 2022

Run configuration:

/etc/rc.d/oracle-xe configure

bash: /etc/rc.d/oracle-xe: No such file or directory
Arch uses systemd not rc.d and init

could someone give me a hand please 🙏🏽🙏🏽🙏🏽

@madyardwn
Copy link

madyardwn commented Sep 10, 2022

Run configuration:

/etc/rc.d/oracle-xe configure

bash: /etc/rc.d/oracle-xe: No such file or directory Arch uses systemd not rc.d and init

could someone give me a hand please 🙏🏽🙏🏽🙏🏽

If you've encountered the same issue I did and are looking for a solution, here's a step-by-step guide that worked for me. I hope it resolves your issue as well.

Steps:

  1. Install oracle-database-xe-18c-1.0-1.x86_64.rpm from Oracle's official website, or alternatively, you can clone it from my repository at https://github.com/madyardwn/Config-Addition-OracleXe.git.

    • If you prefer, download and extract the .rpm file.
  2. Copy the folder inside the cloned repository to /etc.

  3. Execute the following command:

    /etc/init.d/oracle-xe-18c

    Note: You may encounter an error at this stage.

  4. To address the error, add some lines of code to the oracle-xe-18 file. You can follow the instructions provided in this video.

  5. After making the necessary modifications, run the following command again:

    /etc/init.d/oracle-xe-18c

    This should resolve the issue.

@SunnyRaj84348
Copy link

Run configuration:

/etc/rc.d/oracle-xe configure

bash: /etc/rc.d/oracle-xe: No such file or directory Arch uses systemd not rc.d and init

could someone give me a hand please 🙏🏽🙏🏽🙏🏽

systemctl enable --now oracle-xe

@arnald275
Copy link

~/oracle-xe on master ?5 ❯ sqlplus /nolog

SQL*Plus: Release 18.0.0.0.0 - Production on Thu Sep 22 17:32:11 2022
Version 18.4.0.0.0

Copyright (c) 1982, 2018, Oracle. All rights reserved.

SQL> connect system/password
ERROR:
ORA-12547: TNS:lost contact

i am new to oracle18c database
i am getting this error

@HJhonatanVR
Copy link

SQL> connect system/password
ERROR:
ORA-12162: TNS:net service name is incorrectly specified

Could anyone help me? pls

@SYN2002
Copy link

SYN2002 commented Apr 1, 2023

/etc/rc.d/oracle-xe configure bash: /etc/rc.d/oracle-xe: No such file or directory Arch uses systemd not rc.d and in

In my case oracle-xe-18c file is present inside "/home/sayan/oracle-xe/src/etc/init.d/" and the conf file in "/home/sayan/oracle-xe/src/etc/sysconfig/" . now do these steps to run your smooth installation-

  1. open(not esecute) the above oracle-xe-18c file and in line no 57 update the path as- CONFIGURATION="/home/sayan/oracle-xe/src/etc/sysconfig/$CONFIG_NAME".
  2. now open terminal and enter as root(i.e. su)
  3. now execute the mention command (/home/sayan/oracle-xe/src/etc/init.d/oracle-xe-18c configure) and do the necessery
  4. cd to the clone folder and do this- "source oracle_env.sh"
  5. sqlplus /nolog
  6. now after that if "connect system/password" will give some error then visit this website- http://www.dadbm.com/how-to-fix-ora-12547-tns-lost-contact-when-try-to-connect-to-oracle/
  7. for user creation follow this - https://www.youtube.com/watch?v=wGmX57PFUzU&ab_channel=DevNami

Tipe: wget https://download.oracle.com/otn-pub/otn_software/db-express/oracle-database-xe-18c-1.0-1.x86_64.rpm
instead of
wget http://download.oracle.com/otn/linux/oracle11g/xe/oracle-xe-11.2.0-1.0.x86_64.rpm.zip

There you go all set:)

@SYN2002
Copy link

SYN2002 commented Apr 1, 2023

SQL> connect system/password ERROR: ORA-12162: TNS:net service name is incorrectly specified

Could anyone help me? pls

visit this website- http://www.dadbm.com/how-to-fix-ora-12547-tns-lost-contact-when-try-to-connect-to-oracle/

@jabedzaman
Copy link

my databse server would be running on which port?

@SunnyRaj84348
Copy link

my databse server would be running on which port?

On default port 1521.

@ajeevsan
Copy link

my databse server would be running on which port?

To find out the port on which Oracle Database XE is running, follow these steps:

  1. Navigate to the installation directory of Oracle Database on your Manjaro KDE system, which is typically located at "/opt/oracle/product/18c/dbhomeXE/network/admin".

  2. Open the terminal in that directory.

  3. Use the "nano listener.ora" command to open the "listener.ora" file.

  4. Inside the file, you'll be able to see the port on which Oracle Database XE is currently running.

@elgs
Copy link

elgs commented Dec 19, 2023

[oracle-xe]$ /etc/rc.d/oracle-xe configure
-bash: /etc/rc.d/oracle-xe: No such file or directory

@YassWrld
Copy link

/etc/rc.d/oracle-xe: No such file or directory any solution for this please ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment