Skip to content

Instantly share code, notes, and snippets.

@tonywang0122
Created February 14, 2022 12:45
Show Gist options
  • Save tonywang0122/b6dffae572f9534f0ca419c367f01ce0 to your computer and use it in GitHub Desktop.
Save tonywang0122/b6dffae572f9534f0ca419c367f01ce0 to your computer and use it in GitHub Desktop.
#!/bin/bash
#
# Install Dev & Tool package
#
apt update
apt install wget git libaio1 g++ make python unzip -y
apt clean
#
# Install Oracle Instant Client
#
rm -rf /opt/oracle
mkdir -p /opt/oracle
OCI=/tmp/instantclient-basic-linux.x64-19.14.0.0.0dbru.zip
OCI_SDK=/tmp/instantclient-sdk-linux.x64-19.14.0.0.0dbru.zip
if [ ! -f "$OCI" ]; then
wget --output-document=/tmp/instantclient-basic-linux.x64-19.14.0.0.0dbru.zip https://download.oracle.com/otn_software/linux/instantclient/1914000/instantclient-basic-linux.x64-19.14.0.0.0dbru.zip
fi
if [ ! -f "$OCI_SDK" ]; then
wget --output-document=/tmp/instantclient-sdk-linux.x64-19.14.0.0.0dbru.zip https://download.oracle.com/otn_software/linux/instantclient/1914000/instantclient-sdk-linux.x64-19.14.0.0.0dbru.zip
fi
unzip $OCI -d /opt/oracle
unzip $OCI_SDK -d /opt/oracle
sh -c "echo /opt/oracle/instantclient_19_14 > /etc/ld.so.conf.d/oracle-instantclient.conf" && ldconfig
#
# Install nvm / nodejs / yarn
#
#rm -rf ~/.nvm
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion
nvm install 14.18.1
nvm use 14.18.1
npm config set registry https://dev.webhotel.net.tw/repository/npm-public/
# yarn
npm i -g corepack
#git clone ssh://git@192.168.168.46:8122/bacchus/frontend/pms_v2.0.git --recurse-submodules
#git clone ssh://git@192.168.168.46:8122/bacchus/frontend/MainFramework.git --recurse-submodules
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment