/etc/init.d/oracle-xe stop
dpkg --purge oracle-xe
rm -r /u01/app
rm /etc/default/oracle-xe
update-rc.d -f oracle-xe remove
update-rc.d -f oracle-mount remove
update-rc.d -f oracle-shm remove
sudo apt-get install alien libaio1 unixodbc
sudo apt-get install -y net-tools
https://drive.google.com/drive/folders/1UkO_bC8RkDfD5m04F_6ce6c4IuHNLwEJ?usp=sharing
Three files should be extracted namely jdk-17.0.4.1_linux-x64_bin.deb , oracle-xe_11.2.0-2_amd64.deb , sqldeveloper-22.2.0.173.2018-no-jre.zip
a) Open Up your terminal and type the following command followed by your password:
sudo gedit /sbin/chkconfig
After successfully running the command a text editor should open up.
b) Paste the following text in the file and save it.
#!/bin/bash
# Oracle 11gR2 XE installer chkconfig hack for Ubuntu
file=/etc/init.d/oracle-xe
if [[ ! `tail -n1 $file | grep INIT` ]]; then
echo >> $file
echo '### BEGIN INIT INFO' >> $file
echo '# Provides: OracleXE' >> $file
echo '# Required-Start: $remote_fs $syslog' >> $file
echo '# Required-Stop: $remote_fs $syslog' >> $file
echo '# Default-Start: 2 3 4 5' >> $file
echo '# Default-Stop: 0 1 6' >> $file
echo '# Short-Description: Oracle 11g Express Edition' >> $file
echo '### END INIT INFO' >> $file
fi
update-rc.d oracle-xe defaults 80 01
c) Change privilege by executing the following command:
sudo chmod 755 /sbin/chkconfig
d) Setting up kernal parameters:
sudo gedit /etc/sysctl.d/60-oracle.conf
Again text editor should open up and you have to enter the following text in the file :
# Oracle 11g XE kernel parameters
fs.file-max=6815744
net.ipv4.ip_local_port_range=9000 65000
kernel.sem=250 32000 100 128
kernel.shmmax=536870912
e) Load new kernal parameters by entering :
sudo service procps start
f) Some more changes :
ln -s /usr/bin/awk /bin/awk
mkdir /var/lock/subsys
sudo touch /var/lock/subsys/listener
sudo dpkg --install oracle-xe_11.2.0-2_amd64.deb
a)
sudo mount -t tmpfs shmfs -o size=2048m /dev/shm
b) Create a file at the required location by:
sudo gedit /etc/rc2.d/S01shm_load
c) Now copy and paste following lines into the file :
#!/bin/sh
case "$1" in
start) mkdir /var/lock/subsys 2>/dev/null
touch /var/lock/subsys/listener
rm /dev/shm 2>/dev/null
mkdir /dev/shm 2>/dev/null
mount -t tmpfs shmfs -o size=2048m /dev/shm ;;
*) echo error
exit 1 ;;
esac
d) Save the file and provide execute permissions :
sudo chmod 755 /etc/rc2.d/S01shm_load
sudo /etc/init.d/oracle-xe configure
NOTE: PORTS SHOULLD BE SET TO DEFAULT NO CHANGES SHOULD BE MADE AND FOR THE MACHINES OWNED BY COLLEGE PASSWORD SHOULD BE SET TO '1234' only
cd /home
sudo gedit ~/.bashrc
A FILE SHOULD OPEN WITH SOME TEXT ALREADY WRITTEN IN IT PASTE THE FOLLOWING TEXT :
export ORACLE_HOME=/u01/app/oracle/product/11.2.0/xe
export ORACLE_SID=XE
export NLS_LANG=`$ORACLE_HOME/bin/nls_lang.sh`
export ORACLE_BASE=/u01/app/oracle
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:$LD_LIBRARY_PATH
export PATH=$ORACLE_HOME/bin:$PATH
echo $PATH
source ~/.profile
sudo service oracle-xe start
sqlplus
sqlplus sys as sysdba
ENTER PASSWORD
CREATE USER username_of_choice IDENTIFIED BY password;
GRANT ALL PRIVILEGES TO username_of_choice;
https://github.com/Aryansh1520/all_mongodb.git