Go to the official Oracle Instant Client Downloads site and install basic and SDK RPMs like this:
On Fedora 43, because of required file digests, for version 19 you need:
sudo dnf install -y libnsl
sudo rpm -ivh --nodigest --nofiledigest https://download.oracle.com/otn_software/linux/instantclient/1930000/oracle-instantclient19.30-basic-19.30.0.0.0-1.el9.x86_64.rpm https://download.oracle.com/otn_software/linux/instantclient/1930000/oracle-instantclient19.30-devel-19.30.0.0.0-1.x86_64.rpm
Earlier can do with dnf only:
sudo dnf install https://download.oracle.com/otn_software/linux/instantclient/1930000/oracle-instantclient19.30-basic-19.30.0.0.0-1.el9.x86_64.rpm https://download.oracle.com/otn_software/linux/instantclient/1930000/oracle-instantclient19.30-devel-19.30.0.0.0-1.x86_64.rpm
If you wish, you can also install SQLPLus client from same location as well.
On recent Fedora versions, new users already have that setup.
dnf install -y podman-docker
sudoedit /etc/subuid # add line: myusername:10000:54321
sudoedit /etc/subgid # add line: myusername:10000:54330- Run the script with sudo
$ sudo ./script/oracle/install-instantclient-packages.sh- Add following ENV variables to your system (
~/.profileor~/.zshrc)
LD_LIBRARY_PATH="/opt/oracle/instantclient/:$LD_LIBRARY_PATH"
ORACLE_HOME=/opt/oracle/instantclient/- Go to the official Oracle Instant Client Downloads site and download the following .rpm packages for your operative system:
- Basic
- SQL Plus
- SDK
On Fedora or a Red Hat based distro, you can just install the RPMs. Instructions for Debian based systems follow.
-
Create a folder in
/opt/oracleif it does not exist yet (withmkdir -p /opt/oracle) and save these packages there. -
Install the dependency
libaio1and the packagealien. In Ubuntu that is done withsudo apt-get install libaio1 alien. -
Go to
/opt/oraclethrough the terminal (withcd /opt/oracle) and use alien to convert all those .rpm packages to .deb (withsudo alien --to-deb --scripts *.rpm). -
Execute all those
.debpackages withsudo dpkg -i *.deb. -
Execute the following lines and also add them at the end of
~/.profile. Replace 'X' for the version of the package that you have just installed.
export ORACLE_HOME=/usr/lib/oracle/X/client64
export PATH=$PATH:$ORACLE_HOME/bin
export OCI_LIB_DIR=$ORACLE_HOME/lib
export OCI_INC_DIR=/usr/include/oracle/X/client64
You need to have Docker installed and running. You also need to be able to run containers as a non-root user.
-
From this repository, do
make oracle-databaseand wait a little, or checkpodman logs -f oracle-databaseto see DATABASE IS READY TO USE! message.-
This will create an Oracle database container that has a "rails" user to use for development purposes.
-
If you run oracle in another way, then you can create a development user manually like this:
docker exec -it oracle-database sqlplus system/threescalepass@127.0.0.1:1521/systempdbCREATE USER rails IDENTIFIED BY railspass; GRANT unlimited tablespace TO rails; GRANT create session TO rails; GRANT create table TO rails; GRANT create view TO rails; GRANT create sequence TO rails; GRANT create trigger TO rails; GRANT create procedure TO rails;
-
-
Finally initialize the database with some seed data by running (omit
ORACLE_SYSTEM_PASSWORDif you have already granted the necessary permissions to the user)DATABASE_URL="oracle-enhanced://rails:railspass@127.0.0.1:1521/systempdb" ORACLE_SYSTEM_PASSWORD=threescalepass NLS_LANG=AMERICAN_AMERICA.UTF8 USER_PASSWORD=123456 MASTER_PASSWORD=123456 MASTER_ACCESS_TOKEN=token bundle exec rake db:drop db:create db:setup
Add DISABLE_OOB=ON to sqlnet.ora (github issue). For installation from archive that would be
echo "DISABLE_OOB=ON" >> /opt/oracle/instantclient/network/admin/sqlnet.oraFor RPM installation (update version 21 with whatever you installed locally).
echo "DISABLE_OOB=ON" >> /usr/lib/oracle/21/client64/lib/network/admin/sqlnet.oraFor IntelliJ/RubyMine, go to Database -> Database Source properties -> Drivers -> Oracle -> Advanced -> oracle.net.disableOob -> true