Skip to content

Instantly share code, notes, and snippets.

@MashukeAlam
Created November 22, 2023 09:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save MashukeAlam/3d232f1e274fcc5ff241412b743f71f1 to your computer and use it in GitHub Desktop.
Save MashukeAlam/3d232f1e274fcc5ff241412b743f71f1 to your computer and use it in GitHub Desktop.
setup oracle linux for rubyonrils+oracledb project
sudo dnf update
sudo yum groupinstall 'Development Tools'
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.5/install.sh | bash
source .bashrc
nvm install 14.21
npm i -g yarn
git clone https://github.com/rbenv/rbenv.git ~/.rbenv
echo 'eval "$(~/.rbenv/bin/rbenv init - bash)"' >> ~/.bashrc
source .bashrc
git clone https://github.com/rbenv/ruby-build.git "$(rbenv root)"/plugins/ruby-build
rbenv install 2.6.3
cd Downloads/
sudo dnf install -y oracle-database-preinstall*
sudo dnf install -y oracle-database-free*
sudo /etc/init.d/oracle-free-23c configure
sudo dnf install redis
ssh-keygen -t ed25519 -C "your_email@example.com"
cd ~
ssh-keygen -t ed25519 -C "your_email@example.com"
cd .ssh
cat id_ed25519.pub
cd /opt/oracle/product/23c/dbhomeFree/
sudo unzip ~/Downloads/instantclient-basic-linux.x64-23.3.0.0.0.zip
sudo unzip ~/Downloads/instantclient-sdk-linux.x64-23.3.0.0.0.zip
sudo unzip ~/Downloads/instantclient-sqlplus-linux.x64-23.3.0.0.0.zip
nano ~/bashrc
source ~/.bashrc
export ORACLE_SID=FREE
./sqlplus sys@localhost:1521/FREEPDB1 as sysdba
./sqlplus root@localhost:1521/FREEPDB1
sudo dnf install gnome-tweak-tool
git clone git@github.com:fuadomar/vat-mushak.git
cd vat-mushak/
gem install bundler:2.0.2
bundle install
git checkout NahianAlindo/feature/oracle-db
bundle install
git branch
cp .env.sample .env
nano .env
yarn install
source ~/.bashrc
export NLS_LANG=AMERICAN_AMERICA.UTF8
bin/rails db:environment:set RAILS_ENV=test
rails db:schema:load RAILS_ENV=test
rails db:migrate RAILS_ENV=test
nano ~/.bash_profile
rails db:schema:load RAILS_ENV=test
cd db/migrate/
ls
mv 20231023083529_rename_nid_field.rb 20231023083529_rename_nid_field.rb.bak
rails db:migrate RAILS_ENV=test
rails s -e test
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment