Install the User Mode Linux utilities, for the tunctl application.
$ sudo apt-get install uml-utilities
ensure your /dev/net/tun interface has the appropriate permissions for the vboxusers group.
$ sudo chown root.vboxusers /dev/net/tun
$ sudo chmod g+rw /dev/net/tun
Add the following line of code to /etc/udev/rules.d/20-names.rules
----------------------------------
KERNEL=="tun", NAME="net/%k", GROUP="vboxusers", MODE="0660"
----------------------------------
create tap-setup.sh
----------------------------------
#!/bin/bash
# tap-setup.sh
# Change username accordingly
USER="laomie"
tap_up(){
tunctl -u $USER
sysctl net.ipv4.ip_forward=1
sysctl net.ipv4.conf.wlan0.proxy_arp=1
sysctl net.ipv4.conf.tap0.proxy_arp=1
ip link set tap0 up
route add -host 192.168.1.21 dev tap0
}
tap_down(){
sysctl net.ipv4.ip_forward=0
sysctl net.ipv4.conf.wlan0.proxy_arp=0
sysctl net.ipv4.conf.tap0.proxy_arp=0
tunctl -d tap0
}
if [[ $EUID -ne 0 ]]; then
echo "This script must be run as root" 1>&2
exit 1
else
case "$1" in
start)
tap_up
;;
stop)
tap_down
;;
*)
echo "Usage: $0 {start|stop}"
;;
esac
fi
exit 0
----------------------------------
Add the following section at the end of the file /etc/samba/smb.conf
--------------------------------------------
[share]
comment = Samba Share
path = /srv/samba/share
browsable = yes
guest ok = yes
read only = no
create mask = 0755
--------------------------------------------
uncommented this line in the file /etc/samba/smb.conf
--------------------------------------------
SO_RCVBUF=8192 SO_SNDBUF=8192
--------------------------------------------
below should all be placed at the end of the file /etc/sysctl.conf
--------------------------------------------
fs.file-max = 6815744
kernel.shmall = 2097152
kernel.shmmax = 2147483648
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
net.core.rmem_default = 4194304
net.core.rmem_max = 4194304
net.core.wmem_default = 1048576
net.core.wmem_max = 1048576
net.ipv4.ip_local_port_range = 9000 65535
fs.aio-max-nr = 1048576
--------------------------------------------
below should all be placed at the end of the file /etc/security/limits.conf
--------------------------------------------
oracle soft nproc 2047
oracle hard nproc 16384
oracle hard nofile 65536
oracle soft nofile 1024
--------------------------------------------
below should all be placed at the end of the file /etc/pam.d/login
--------------------------------------------
session required /lib/security/pam_limits.so
--------------------------------------------
Tunneling X over SSH
# apt-get install xserver-xorg xserver-xorg-core openbox x11-apps x11-xserver-utils
uncomment the allow forwarding parameter in /etc/ssh/sshconfig and set it to yes
--------------------------------------------
ForwardX11 yes
--------------------------------------------
reboot ubuntu (virtual client) and test X windows session via ssh on host terminal
$ ssh -X username@192.168.1.21
$ xclock
========================== Installing Oracle 11gR2 ==========================
copy oracle zip files from host to client via samba and unzip the files
$ sudo mv /srv/samba/share/linux_11gR2*.zip /home/oracle
$ cd /home/oracle
$ sudo chown oracleinstall linux_11gR2*.zip
$ unzip linux_11gR2_database_1of2.zip -d .
$ unzip linux_11gR2_database_2of2.zip -d .
$ rm -fr linux_11gR2*.zip
open X windows session via ssh on host terminal
$ ssh -X oracle@192.168.1.21
$ cd /home/oracle/database
$ ./runInstaller -ignoreSysPrereqs
follow below steps to install oracle
1 of 11. unchecked "i wish to ..." then next
2 of 11. select "install database software only" then next
3 of 11. next
4 of 11. add "japanese" and "simplified chinese" then next
5 of 11. next
6 of 11. next
7 of 11. next
8 of 11. next
9 of 11. "Fix & Check Again" then checked "ignore All" then next
10 of 11. finish
reboot client and open X windows session via ssh on host terminal
$ ssh -X oracle@192.168.1.21
Creating a database using Database Configuration Assistant
$ dbca
3 of 12. Global Database Namercl SIDrcl
4 of 12. Uncheck the "Configure Enterprise Manager" box
8 of 12. check the "sample schemas" box
11 of 12. check the "generate database creation scripts" box
Edit /etc/oratab and change the line
sid:/u01/app/oracle/product/11.2.0/dbhome_1:N
to
sid:/u01/app/oracle/product/11.2.0/dbhome_1:Y
create a script /etc/init.d/oracledb to execute on startup to start the database and the listener
--------------------------------------------
#!/bin/bash
#
# Run-level Startup script for the Oracle Listener and Instances
# It relies on the information on /etc/oratab
# Based on script listing at
# http://www.pythian.com/news/1355 ... -810-intrepid-ibex/
# Mike 7/3/10
#
export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=/u01/app/oracle/product/11.2.0/dbhome_1
export ORACLE_OWNR=oracle
export PATH=$PATHORACLE_HOME/bin
if [ ! -f $ORACLE_HOME/bin/dbstart -o ! -d $ORACLE_HOME ]
then
echo "Oracle startup: cannot start"
exit 1
fi
case "$1" in
start)
# Oracle listener and instance startup
echo -n "Starting Oracle: "
su $ORACLE_OWNR -c "$ORACLE_HOME/bin/lsnrctl start"
su $ORACLE_OWNR -c "$ORACLE_HOME/bin/dbstart $ORACLE_HOME"
touch /var/lock/oracle
echo "OK"
;;
stop)
# Oracle listener and instance shutdown
echo -n "Shutdown Oracle: "
su $ORACLE_OWNR -c "$ORACLE_HOME/bin/lsnrctl stop"
su $ORACLE_OWNR -c "$ORACLE_HOME/bin/dbshut $ORACLE_HOME"
rm -f /var/lock/oracle
echo "OK"
;;
reload|restart)
$0 stop
$0 start
;;
*)
echo "Usage: `basename $0` start|stop|restart|reload"
exit 1
esac
exit 0
--------------------------------------------
make the script executable and set it to run at boot time
$ sudo chmod a+x /etc/init.d/oracledb
$ sudo update-rc.d oracledb defaults 99
reboot client and testing server changes
$ ssh oracle@192.168.1.21
$ sqlplus / as sysdba
SQL> shutdown immediate
SQL> quit
$ ssh laomie@192.168.1.21
$ sudo /etc/init.d/oracledb start
$ lsnrctl status
$ ssh oracle@192.168.1.21
$ lsnrctl status
$ sqlplus system/password
SQL> select status from v$instance;