Ubuntu 12.04 LTS Install Oracle11gR2
Install Packages
Check your packages
You can search packages on website : http://packages.ubuntu.com/
Here we need this two packages:
libaio
I found here:http://kr.archive.ubuntu.com/ubuntu/pool/main/liba/libaio/libaio1_0.3.109-2ubuntu1_amd64.deb
libstdc++5
I found here:
http://kr.archive.ubuntu.com/ubuntu/pool/universe/g/gcc-3.3/libstdc++5_3.3.6-25ubuntu1_amd64.deb
you show download these packages for your Ubuntu and you can use dpkg –i yourpackage_path
System groups and users
Check your existing setup with:
grep oinstall /etc/group
grep dba /etc/group
grep nobody /etc/group
id oracle
id nobody
Most likely, you should run the following command for create the required system groups and users. Latest Ubuntu already come with user nobody so we don't need to retouch it:
addgroup --system oinstall
addgroup --system dba
useradd -r -g oinstall -G dba -m -s /bin/bash -d /var/lib/oracle oracle
passwd oracle
Configure kernel parameters
Check your existing setup with:
/sbin/sysctl -a | grep sem
/sbin/sysctl -a | grep shm
/sbin/sysctl -a | grep file-max
/sbin/sysctl -a | grep ip_local_port_range
/sbin/sysctl -a | grep rmem_default
/sbin/sysctl -a | grep rmem_max
/sbin/sysctl -a | grep wmem_default
/sbin/sysctl -a | grep wmem_max
Create /etc/sysctl.d/99-oracle.conf and add the following lines:
fs.aio-max-nr = 1048576
fs.file-max = 6815744
kernel.shmall = 2097152
kernel.shmmax = 536870912
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
net.ipv4.ip_local_port_range = 9000 65500
net.core.rmem_default = 262144
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 1048586
Run the following command to reload these kernel parameters:
service procps start
Shell limits for oracle user
Create /etc/security/limits.d/oracle.conf as below:
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536
oracle soft stack 10240
Check (or add) if the following line exits within /etc/pam.d/login:
session required pam_limits.so
Check (or add) if the following line exits within /etc/pam.d/su:
session required pam_limits.so
Create required directories
Create required directory and change permission:
rm -rf /u01 /u02
mkdir -p /u01/app/oracle
mkdir -p /u02/oradata
chown -R oracle:oinstall /u01 /u02
chmod -R 775 /u01 /u02
Configuring the oracle user's environment
Add following line to /var/lib/oracle/.profile (as i will create a AL32UTF8 database; change to US7ASCII if you will create ASCII database). This will also map Oracle's /bin to your $PATH so can run Oracle's binary directly when login as user oracle:
if [ $SHELL = "/bin/ksh" ]; then
ulimit -p 16384
ulimit -n 65536
else
ulimit -u 16384 -n 65536
fi
umask 022
#export ORACLE_HOSTNAME=localhost.localdomain
export ORACLE_BASE=/u01/app/oracle
#export ORACLE_HOME=$ORACLE_BASE/product/11.2.0/dbhome_1
export ORACLE_SID=AL32UTF8
export NLS_LANG=.AL32UTF8
#export ORACLE_UNQNAME=AL32UTF8
unset TNS_ADMIN
if [ -d "$ORACLE_HOME/bin" ]; then
PATH="$ORACLE_HOME/bin:$PATH"
fi
Fake Oracle installer
As mentioned before , Ubuntu is not listed as Oracle officially support platform and so we need to "fake" it. Create symbolic links:
mkdir /usr/lib64
ln -s /etc /etc/rc.d
ln -s /lib/x86_64-linux-gnu/libgcc_s.so.1 /lib64/
ln -s /usr/bin/awk /bin/awk
ln -s /usr/bin/basename /bin/basename
ln -s /usr/bin/rpm /bin/rpm
ln -s /usr/lib/x86_64-linux-gnu/libc_nonshared.a /usr/lib64/
ln -s /usr/lib/x86_64-linux-gnu/libpthread_nonshared.a /usr/lib64/
ln -s /usr/lib/x86_64-linux-gnu/libstdc++.so.6 /lib64/
ln -s /usr/lib/x86_64-linux-gnu/libstdc++.so.6 /usr/lib64/
Also mask ourself as RedHat:
echo 'Red Hat Linux release 5' > /etc/redhat-release
Last step before installation start
First of all, login with your new oracle user, with X enabled.
If you are using PuTTY + Xming, for sure that the X11 forward is enabled.
Copy the file linux_11gR1_database.zip to oracle's home directory, then unzip it:
cp linux.x64_11gR2_database_1of2.zip /var/lib/oracle
cp linux.x64_11gR2_database_2of2.zip /var/lib/oracle
cd /var/lib/oracle
unzip -q linux.x64_11gR2_database_1of2.zip
unzip -q linux.x64_11gR2_database_2of2.zip
chown -Rf oracle:oinstall /var/lib/oracle/
I will STRONGLY suggest for a complete reboot, and double-check ALL pre-installation BEFORE starting the next step.
Recommended installation procedures
First of all login with useraccount "oracle" and start the X11 with startx, then start the installer with:
cd /var/lib/oracle/database && ./runInstaller
Next we go though the installation (I don't have the "Oracle Support Password" so just skip in here):
<!--[if gte vml 1]><v:shapetype id="_x0000_t75" coordsize="21600,21600" o:spt="75" o:preferrelative="t" path="m@4@5l@4@11@9@11@9@5xe" filled="f" stroked="f"> <v:stroke joinstyle="miter"/> <v:formulas> <v:f eqn="if lineDrawn pixelLineWidth 0"/> <v:f eqn="sum @0 1 0"/> <v:f eqn="sum 0 0 @1"/> <v:f eqn="prod @2 1 2"/> <v:f eqn="prod @3 21600 pixelWidth"/> <v:f eqn="prod @3 21600 pixelHeight"/> <v:f eqn="sum @0 0 1"/> <v:f eqn="prod @6 1 2"/> <v:f eqn="prod @7 21600 pixelWidth"/> <v:f eqn="sum @8 21600 0"/> <v:f eqn="prod @7 21600 pixelHeight"/> <v:f eqn="sum @10 21600 0"/> </v:formulas> <v:path o:extrusionok="f" gradientshapeok="t" o:connecttype="rect"/> <o:lock v:ext="edit" aspectratio="t"/> </v:shapetype><v:shape id="图片_x0020_27" o:spid="_x0000_i1051" type="#_x0000_t75" alt="http://edin.no-ip.com/files/linux.x64_11gr2_database024.png" style='width:780pt; height:604.2pt;visibility:visible;mso-wrap-style:square'> <v:imagedata src="file:///C:\Users\Mechrevo\AppData\Local\Temp\msohtmlclip1\01\clip_image001.png" o:title="linux.x64_11gr2_database024"/> </v:shape><![endif]--><!--[if !vml]--><!--[endif]-->
In "Selection Installation Option", choose "Create and configure a database":
<!--[if gte vml 1]><v:shape id="图片_x0020_26" o:spid="_x0000_i1050" type="#_x0000_t75" alt="http://edin.no-ip.com/files/linux.x64_11gr2_database025.png" style='width:780pt;height:604.2pt;visibility:visible;mso-wrap-style:square'> <v:imagedata src="file:///C:\Users\Mechrevo\AppData\Local\Temp\msohtmlclip1\01\clip_image003.png" o:title="linux.x64_11gr2_database025"/> </v:shape><![endif]--><!--[if !vml]--><!--[endif]-->
In "System Class", choose "Server Class" (we hope to give a full control during installation):
<!--[if gte vml 1]><v:shape id="图片_x0020_25" o:spid="_x0000_i1049" type="#_x0000_t75" alt="http://edin.no-ip.com/files/linux.x64_11gr2_database026.png" style='width:780pt;height:604.2pt;visibility:visible;mso-wrap-style:square'> <v:imagedata src="file:///C:\Users\Mechrevo\AppData\Local\Temp\msohtmlclip1\01\clip_image005.png" o:title="linux.x64_11gr2_database026"/> </v:shape><![endif]--><!--[if !vml]--><!--[endif]-->
In "Node Selection", choose "Single instance database installation":
<!--[if gte vml 1]><v:shape id="图片_x0020_24" o:spid="_x0000_i1048" type="#_x0000_t75" alt="http://edin.no-ip.com/files/linux.x64_11gr2_database027.png" style='width:780pt;height:604.2pt;visibility:visible;mso-wrap-style:square'> <v:imagedata src="file:///C:\Users\Mechrevo\AppData\Local\Temp\msohtmlclip1\01\clip_image007.png" o:title="linux.x64_11gr2_database027"/> </v:shape><![endif]--><!--[if !vml]--><!--[endif]-->
In "Select Install Type", choose "Advanced install":
<!--[if gte vml 1]><v:shape id="图片_x0020_23" o:spid="_x0000_i1047" type="#_x0000_t75" alt="http://edin.no-ip.com/files/linux.x64_11gr2_database028.png" style='width:780pt;height:604.2pt;visibility:visible;mso-wrap-style:square'> <v:imagedata src="file:///C:\Users\Mechrevo\AppData\Local\Temp\msohtmlclip1\01\clip_image009.png" o:title="linux.x64_11gr2_database028"/> </v:shape><![endif]--><!--[if !vml]--><!--[endif]-->
In "Select Product Languages", I choose to install all available languages:
<!--[if gte vml 1]><v:shape id="图片_x0020_22" o:spid="_x0000_i1046" type="#_x0000_t75" alt="http://edin.no-ip.com/files/linux.x64_11gr2_database029.png" style='width:780pt;height:604.2pt;visibility:visible;mso-wrap-style:square'> <v:imagedata src="file:///C:\Users\Mechrevo\AppData\Local\Temp\msohtmlclip1\01\clip_image011.png" o:title="linux.x64_11gr2_database029"/> </v:shape><![endif]--><!--[if !vml]--><!--[endif]-->
In "Select Database Edition", I choose "Enterprise Edition":
<!--[if gte vml 1]><v:shape id="图片_x0020_21" o:spid="_x0000_i1045" type="#_x0000_t75" alt="http://edin.no-ip.com/files/linux.x64_11gr2_database030.png" style='width:780pt;height:604.2pt;visibility:visible;mso-wrap-style:square'> <v:imagedata src="file:///C:\Users\Mechrevo\AppData\Local\Temp\msohtmlclip1\01\clip_image013.png" o:title="linux.x64_11gr2_database030"/> </v:shape><![endif]--><!--[if !vml]--><!--[endif]-->
In "Specify Installation Location", it should default as below:
<!--[if !supportLists]-->· <!--[endif]-->Oracle Base: /u01/app/oracle
<!--[if !supportLists]-->· <!--[endif]-->Sofeware Location: /u01/app/oracle/product/11.2.0/dbhome_1
<!--[if gte vml 1]><v:shape id="图片_x0020_20" o:spid="_x0000_i1044" type="#_x0000_t75" alt="http://edin.no-ip.com/files/linux.x64_11gr2_database031.png" style='width:780pt;height:604.2pt;visibility:visible;mso-wrap-style:square'> <v:imagedata src="file:///C:\Users\Mechrevo\AppData\Local\Temp\msohtmlclip1\01\clip_image015.png" o:title="linux.x64_11gr2_database031"/> </v:shape><![endif]--><!--[if !vml]--><!--[endif]-->
In "Create Inventory", it should default as below:
<!--[if !supportLists]-->· <!--[endif]-->Inventory Directory: /u01/app/oraInventory
<!--[if !supportLists]-->· <!--[endif]-->oraInventory Group Name: oinstall
<!--[if gte vml 1]><v:shape id="图片_x0020_19" o:spid="_x0000_i1043" type="#_x0000_t75" alt="http://edin.no-ip.com/files/linux.x64_11gr2_database032.png" style='width:780pt;height:604.2pt;visibility:visible;mso-wrap-style:square'> <v:imagedata src="file:///C:\Users\Mechrevo\AppData\Local\Temp\msohtmlclip1\01\clip_image017.png" o:title="linux.x64_11gr2_database032"/> </v:shape><![endif]--><!--[if !vml]--><!--[endif]-->
In "Select Configure Type", choose "General Purpose / Transaction Processing":
<!--[if gte vml 1]><v:shape id="图片_x0020_18" o:spid="_x0000_i1042" type="#_x0000_t75" alt="http://edin.no-ip.com/files/linux.x64_11gr2_database033.png" style='width:780pt;height:604.2pt;visibility:visible;mso-wrap-style:square'> <v:imagedata src="file:///C:\Users\Mechrevo\AppData\Local\Temp\msohtmlclip1\01\clip_image019.png" o:title="linux.x64_11gr2_database033"/> </v:shape><![endif]--><!--[if !vml]--><!--[endif]-->
(IMPORTANT!) In "Specify Database Identifiers", configure as below:
<!--[if !supportLists]-->· <!--[endif]-->Global database name: orcl
<!--[if !supportLists]-->· <!--[endif]-->Oracle Service Identifier (SID): orcl
<!--[if gte vml 1]><v:shape id="图片_x0020_17" o:spid="_x0000_i1041" type="#_x0000_t75" alt="http://edin.no-ip.com/files/linux.x64_11gr2_database034.png" style='width:780pt;height:604.2pt;visibility:visible;mso-wrap-style:square'> <v:imagedata src="file:///C:\Users\Mechrevo\AppData\Local\Temp\msohtmlclip1\01\clip_image021.png" o:title="linux.x64_11gr2_database034"/> </v:shape><![endif]--><!--[if !vml]--><!--[endif]-->
In "Specify Configuration Options", configure as below:
<!--[if !supportLists]-->· <!--[endif]-->Memory -> Enable Automatic Memory Management: TRUE
<!--[if !supportLists]-->· <!--[endif]-->Character sets: Use Unicode (AL32UTF8)
<!--[if gte vml 1]><v:shape id="图片_x0020_16" o:spid="_x0000_i1040" type="#_x0000_t75" alt="http://edin.no-ip.com/files/linux.x64_11gr2_database035.png" style='width:780pt;height:604.2pt;visibility:visible;mso-wrap-style:square'> <v:imagedata src="file:///C:\Users\Mechrevo\AppData\Local\Temp\msohtmlclip1\01\clip_image023.png" o:title="linux.x64_11gr2_database035"/> </v:shape><![endif]--><!--[if !vml]--><!--[endif]-->
<!--[if gte vml 1]><v:shape id="图片_x0020_15" o:spid="_x0000_i1039" type="#_x0000_t75" alt="http://edin.no-ip.com/files/linux.x64_11gr2_database036.png" style='width:780pt;height:604.2pt;visibility:visible;mso-wrap-style:square'> <v:imagedata src="file:///C:\Users\Mechrevo\AppData\Local\Temp\msohtmlclip1\01\clip_image025.png" o:title="linux.x64_11gr2_database036"/> </v:shape><![endif]--><!--[if !vml]--><!--[endif]-->
In "Specify Management Options", choose "Use Database Control for database management" but keep other else empty:
<!--[if gte vml 1]><v:shape id="图片_x0020_14" o:spid="_x0000_i1038" type="#_x0000_t75" alt="http://edin.no-ip.com/files/linux.x64_11gr2_database037.png" style='width:780pt;height:604.2pt;visibility:visible;mso-wrap-style:square'> <v:imagedata src="file:///C:\Users\Mechrevo\AppData\Local\Temp\msohtmlclip1\01\clip_image027.png" o:title="linux.x64_11gr2_database037"/> </v:shape><![endif]--><!--[if !vml]--><!--[endif]-->
In "Specify Database Storage Options", choose "File System" where:
<!--[if !supportLists]-->· <!--[endif]-->Specify database file location: /u02/oradata
<!--[if gte vml 1]><v:shape id="图片_x0020_13" o:spid="_x0000_i1037" type="#_x0000_t75" alt="http://edin.no-ip.com/files/linux.x64_11gr2_database038.png" style='width:780pt;height:604.2pt;visibility:visible;mso-wrap-style:square'> <v:imagedata src="file:///C:\Users\Mechrevo\AppData\Local\Temp\msohtmlclip1\01\clip_image029.png" o:title="linux.x64_11gr2_database038"/> </v:shape><![endif]--><!--[if !vml]--><!--[endif]-->
In "Specify Recovery Options", choose "Do not enable automated backups":
<!--[if gte vml 1]><v:shape id="图片_x0020_12" o:spid="_x0000_i1036" type="#_x0000_t75" alt="http://edin.no-ip.com/files/linux.x64_11gr2_database039.png" style='width:780pt;height:604.2pt;visibility:visible;mso-wrap-style:square'> <v:imagedata src="file:///C:\Users\Mechrevo\AppData\Local\Temp\msohtmlclip1\01\clip_image031.png" o:title="linux.x64_11gr2_database039"/> </v:shape><![endif]--><!--[if !vml]--><!--[endif]-->
In "Specify Schema Passwords", I am a bit lazy so choose "Use the same password for all accounts" (don't do this in production server!):
<!--[if gte vml 1]><v:shape id="图片_x0020_11" o:spid="_x0000_i1035" type="#_x0000_t75" alt="http://edin.no-ip.com/files/linux.x64_11gr2_database040.png" style='width:780pt;height:604.2pt;visibility:visible;mso-wrap-style:square'> <v:imagedata src="file:///C:\Users\Mechrevo\AppData\Local\Temp\msohtmlclip1\01\clip_image033.png" o:title="linux.x64_11gr2_database040"/> </v:shape><![endif]--><!--[if !vml]--><!--[endif]-->
In "Privileged Operating System Groups", confirm as below:
<!--[if !supportLists]-->· <!--[endif]-->Database Administrator (OSDBA) Group: dba
<!--[if !supportLists]-->· <!--[endif]-->Database Operator (OSOPER) Group: oinstall
<!--[if gte vml 1]><v:shape id="图片_x0020_10" o:spid="_x0000_i1034" type="#_x0000_t75" alt="http://edin.no-ip.com/files/linux.x64_11gr2_database041.png" style='width:780pt;height:604.2pt;visibility:visible;mso-wrap-style:square'> <v:imagedata src="file:///C:\Users\Mechrevo\AppData\Local\Temp\msohtmlclip1\01\clip_image035.png" o:title="linux.x64_11gr2_database041"/> </v:shape><![endif]--><!--[if !vml]--><!--[endif]-->
In "Preform Prerequisite Checks", just simply ignore all warning message (since we are using Debian but not Oracle officially supported OS):
<!--[if gte vml 1]><v:shape id="图片_x0020_9" o:spid="_x0000_i1033" type="#_x0000_t75" alt="http://edin.no-ip.com/files/linux.x64_11gr2_database042.png" style='width:780pt;height:604.2pt;visibility:visible;mso-wrap-style:square'> <v:imagedata src="file:///C:\Users\Mechrevo\AppData\Local\Temp\msohtmlclip1\01\clip_image037.png" o:title="linux.x64_11gr2_database042"/> </v:shape><![endif]--><!--[if !vml]--><!--[endif]-->
So just confirm everything in "Summary":
<!--[if gte vml 1]><v:shape id="图片_x0020_8" o:spid="_x0000_i1032" type="#_x0000_t75" alt="http://edin.no-ip.com/files/linux.x64_11gr2_database043.png" style='width:780pt;height:604.2pt;visibility:visible;mso-wrap-style:square'> <v:imagedata src="file:///C:\Users\Mechrevo\AppData\Local\Temp\msohtmlclip1\01\clip_image039.png" o:title="linux.x64_11gr2_database043"/> </v:shape><![endif]--><!--[if !vml]--><!--[endif]-->
And now let's go for a coffee break ;-)
<!--[if gte vml 1]><v:shape id="图片_x0020_7" o:spid="_x0000_i1031" type="#_x0000_t75" alt="http://edin.no-ip.com/files/linux.x64_11gr2_database044.png" style='width:780pt;height:604.2pt;visibility:visible;mso-wrap-style:square'> <v:imagedata src="file:///C:\Users\Mechrevo\AppData\Local\Temp\msohtmlclip1\01\clip_image041.png" o:title="linux.x64_11gr2_database044"/> </v:shape><![endif]--><!--[if !vml]--><!--[endif]-->
Oh it should that almost done! Special note for Ubuntu 12.04: If you face error during installation so update as below:
export ORACLE_HOME=/u01/app/oracle/product/11.2.0/dbhome_1
sed -i 's/^\(\s*\$(MK_EMAGENT_NMECTL)\)\s*$/\1 -lnnz11/g' $ORACLE_HOME/sysman/lib/ins_emagent.mk
sed -i 's/^\(\$LD \$LD_RUNTIME\) \(\$LD_OPT\)/\1 -Wl,--no-as-needed \2/g' $ORACLE_HOME/bin/genorasdksh
sed -i 's/^\(\s*\)\(\$(OCRLIBS_DEFAULT)\)/\1 -Wl,--no-as-needed \2/g' $ORACLE_HOME/srvm/lib/ins_srvm.mk
sed -i 's/^\(TNSLSNR_LINKLINE.*\$(TNSLSNR_OFILES)\) \(\$(LINKTTLIBS)\)/\1 -Wl,--no-as-needed \2/g' $ORACLE_HOME/network/lib/env_network.mk
sed -i 's/^\(ORACLE_LINKLINE.*\$(ORACLE_LINKER)\) \(\$(PL_FLAGS)\)/\1 -Wl,--no-as-needed \2/g' $ORACLE_HOME/rdbms/lib/env_rdbms.mk
Then keep ongoing for installation ;-)
<!--[if gte vml 1]><v:shape id="图片_x0020_6" o:spid="_x0000_i1030" type="#_x0000_t75" alt="http://edin.no-ip.com/files/linux.x64_11gr2_database045.png" style='width:780pt;height:604.2pt;visibility:visible;mso-wrap-style:square'> <v:imagedata src="file:///C:\Users\Mechrevo\AppData\Local\Temp\msohtmlclip1\01\clip_image043.png" o:title="linux.x64_11gr2_database045"/> </v:shape><![endif]--><!--[if !vml]--><!--[endif]-->
Now following the instructions and run the following commands with "root" user:
/u01/app/oraInventory/orainstRoot.sh
/u01/app/oracle/product/11.2.0/dbhome_1/root.sh
<!--[if gte vml 1]><v:shape id="图片_x0020_5" o:spid="_x0000_i1029" type="#_x0000_t75" alt="http://edin.no-ip.com/files/linux.x64_11gr2_database046.png" style='width:780pt;height:604.2pt;visibility:visible;mso-wrap-style:square'> <v:imagedata src="file:///C:\Users\Mechrevo\AppData\Local\Temp\msohtmlclip1\01\clip_image045.png" o:title="linux.x64_11gr2_database046"/> </v:shape><![endif]--><!--[if !vml]--><!--[endif]-->
Ok you get it!
<!--[if gte vml 1]><v:shape id="图片_x0020_4" o:spid="_x0000_i1028" type="#_x0000_t75" alt="http://edin.no-ip.com/files/linux.x64_11gr2_database047.png" style='width:780pt;height:604.2pt;visibility:visible;mso-wrap-style:square'> <v:imagedata src="file:///C:\Users\Mechrevo\AppData\Local\Temp\msohtmlclip1\01\clip_image047.png" o:title="linux.x64_11gr2_database047"/> </v:shape><![endif]--><!--[if !vml]--><!--[endif]-->
Confirm with installation progress
In previous screen the installer mentioned that we can access "Enterprise Manager Database Control URL - (AL32UTF8)" from https://yourhostname:1158/em, so now let's open the browser and test it with following account:
<!--[if !supportLists]-->· <!--[endif]-->User Name: SYS
<!--[if !supportLists]-->· <!--[endif]-->Password: your_secret_password
<!--[if !supportLists]-->· <!--[endif]-->Connect As: SYSDBA
<!--[if gte vml 1]><v:shape id="图片_x0020_3" o:spid="_x0000_i1027" type="#_x0000_t75" alt="http://edin.no-ip.com/files/linux.x64_11gr2_database048.png" style='width:780pt;height:604.2pt;visibility:visible;mso-wrap-style:square'> <v:imagedata src="file:///C:\Users\Mechrevo\AppData\Local\Temp\msohtmlclip1\01\clip_image049.png" o:title="linux.x64_11gr2_database048"/> </v:shape><![endif]--><!--[if !vml]--><!--[endif]-->
Once login it should show as below:
<!--[if gte vml 1]><v:shape id="图片_x0020_2" o:spid="_x0000_i1026" type="#_x0000_t75" alt="http://edin.no-ip.com/files/linux.x64_11gr2_database049.png" style='width:780pt;height:604.2pt;visibility:visible;mso-wrap-style:square'> <v:imagedata src="file:///C:\Users\Mechrevo\AppData\Local\Temp\msohtmlclip1\01\clip_image051.png" o:title="linux.x64_11gr2_database049"/> </v:shape><![endif]--><!--[if !vml]--><!--[endif]-->
<!--[if gte vml 1]><v:shape id="图片_x0020_1" o:spid="_x0000_i1025" type="#_x0000_t75" alt="http://edin.no-ip.com/files/linux.x64_11gr2_database050.png" style='width:780pt;height:604.2pt;visibility:visible;mso-wrap-style:square'> <v:imagedata src="file:///C:\Users\Mechrevo\AppData\Local\Temp\msohtmlclip1\01\clip_image053.png" o:title="linux.x64_11gr2_database050"/> </v:shape><![endif]--><!--[if !vml]--><!--[endif]-->
Autostart Oracle during system boot
There is almost for sure that you will hope to start your Oracle automatically during system boot. Even you may turn this feature off, but the init.d script is very useful, too.
First of all, specify which database instant will be started together with Oracle. Edit /etc/oratab as below:
AL32UTF8:/u01/app/oracle/product/11.2.0/dbhome_1:Y
Next, create init.d script as /etc/init.d/oracle:
#!/bin/bash
#
# Run-level Startup script for the Oracle Instance and Listener
#
### BEGIN INIT INFO
# Provides: Oracle
# Required-Start: $remote_fs $syslog
# Required-Stop: $remote_fs $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Startup/Shutdown Oracle listener and instance
### END INIT INFO
ORA_HOME="/u01/app/oracle/product/11.2.0/dbhome_1"
ORA_OWNR="oracle"
# if the executables do not exist -- display error
if [ ! -f $ORA_HOME/bin/dbstart -o ! -d $ORA_HOME ]
then
echo "Oracle startup: cannot start"
exit 1
fi
# depending on parameter -- startup, shutdown, restart
# of the instance and listener or usage display
case "$1" in
start)
# Oracle listener and instance startup
echo -n "Starting Oracle: "
su - $ORA_OWNR -c "$ORA_HOME/bin/dbstart $ORA_HOME"
su - $ORA_OWNR -c "$ORA_HOME/bin/lsnrctl start"
#Optional : for Enterprise Manager software only
su - $ORA_OWNR -c "$ORA_HOME/bin/emctl start dbconsole"
touch /var/lock/oracle
echo "OK"
;;
stop)
# Oracle listener and instance shutdown
echo -n "Shutdown Oracle: "
#Optional : for Enterprise Manager software only
su - $ORA_OWNR -c "$ORA_HOME/bin/emctl stop dbconsole"
su - $ORA_OWNR -c "$ORA_HOME/bin/lsnrctl stop"
su - $ORA_OWNR -c "$ORA_HOME/bin/dbshut $ORA_HOME"
rm -f /var/lock/oracle
echo "OK"
;;
reload|restart)
$0 stop
$0 start
;;
*)
echo "Usage: $0 start|stop|restart|reload"
exit 1
esac
exit 0
Permission is very important, too:
chmod 755 /etc/init.d/oracle
Finally, install the script so Oracle will start during system bootup:
update-rc.d-insserv oracle defaults 99 01
NOTE: You may find the following error message during /etc/init.d/oracle/stop:
Shutdown Oracle: ulimit: 25: bad number
You can then update /u01/app/oracle/product/11.2.0/dbhome_1/bin/emctl with #!/bin/bash to solve the problem:
export ORACLE_HOME=/u01/app/oracle/product/11.2.0/dbhome_1
sed -i 's/^#!\/bin\/sh -f\s*/#!\/bin\/bash -f/g' $ORACLE_HOME/bin/emctl
References
<!--[if !supportLists]-->· <!--[endif]-->http://lostinmac.com/2012/01/29/installtion-doracle-11gr2-sur-ubunutu-11-10/
<!--[if !supportLists]-->· <!--[endif]-->https://forums.oracle.com/forums/thread.jspa?threadID=2301639
<!--[if !supportLists]-->· <!--[endif]-->https://forums.oracle.com/forums/thread.jspa?threadID=697814
相关推荐
在Ubuntu 12.04下安装Oracle Express 11g R2的过程需要一系列的步骤来确保软件的顺利安装和运行。Oracle Express Edition(XE)11g R2是一个免费的数据库管理系统,可为学习和开发提供一个功能丰富的平台。在Linux...
使用VirtualBox在Windows系统下安装与配置Ubuntu 12.04 LTS虚拟机
在本场景中,我们关注的是OpenCV 2.4.9版本,特别针对Ubuntu 12.04 LTS(长期支持版)的i386架构进行了编译,并且集成了Java接口。这使得开发者能够在Java环境下利用OpenCV的功能。 OpenCV 2.4.9是该库的一个稳定...
在本文档中,作者分享了如何在Ubuntu 12.04 LTS系统上搭建Qt和Qt-Embedded(Qt Embedded)的开发环境。首先,我们来详细了解这个过程。 Qt是一个流行的跨平台应用程序开发框架,用于创建具有用户友好界面的桌面和...
《Ubuntu 12.04 LTS 视频安装教程详解》 Ubuntu 12.04 LTS(长期支持版)是Ubuntu操作系统的一个重要版本,它以其稳定性和长期的技术支持受到用户的广泛欢迎。对于初次接触Linux或者想要从Windows、Mac OS等其他...
### 在64位 Ubuntu 12.04 Server 上安装 Oracle 11g 及问题解决 #### 一、概述 在 Linux 平台上安装 Oracle 数据库是一项技术性较强的任务,尤其是在服务器版本的操作系统上进行安装。本文档将详细介绍如何在 64 位...
### Ubuntu 12.04 LTS PXE 安装及完全拾遗 #### 一、试验环境 在进行Ubuntu 12.04 LTS的PXE安装实验时,需要准备以下环境: - **Ubuntu 12.04 LTS 32位 ISO文件**:作为安装来源,提供必要的安装包和支持文件。 -...
在Ubuntu 12.04LTS 下搭建Apache web服务器-亲测,解决ADSL关于80端口被封等问题,亲自测试通过。
实战安装,附带详细步骤,还有一些后期需要的小插件
Ubuntu 12.04是一款长期支持(LTS)版本,这意味着它会得到长达五年的官方支持,包括安全更新和bug修复。因此,对于那些需要稳定环境的用户,如服务器管理员,Ubuntu 12.04是一个理想的选择。尽管现在这个版本已经...
Ubuntu 12.04 下安装 Nginx、Python、uWSGI 和 Django 的步骤 在本文中,我们将介绍如何在 Ubuntu 12.04 环境下安装 Nginx、Python、uWSGI 和 Django。这些技术栈组合是非常流行的 Web 应用程序开发环境。 一、...
### 使用VMware 8安装Ubuntu 12.04 LTS的详细步骤 #### 环境准备 - **本机操作系统**: Windows 7 - **虚拟机软件**: VMware Workstation 8 (英文版) - **目标操作系统**: Ubuntu Desktop 12.04 LTS #### 准备工作 ...
在Ubuntu 12.04 LTS中,传统GNOME桌面可以被安装,为用户提供一个经典的桌面体验。 6. GNOME 3与Cinnamon 虽然GNOME 3的Shell与Cinnamon有明显不同,但在文档中并没有提供直接关于安装 GNOME 3 的步骤。但是,通过`...
- 选择NeoGrub引导项,进入Ubuntu安装界面。 - 取消光驱挂载:`sudo umount -l /isodevice` - 选择安装语言和安装类型(自定义)。 - 分区方案参考: - `/`分区:20GB,文件系统类型ext4。 - `swap`分区:3GB...
2. **最小化基础架构变化**:为了保持系统的稳定性和兼容性,Ubuntu 12.04 LTS尽可能减少了对底层架构的改动。 3. **目标驱动的性能优化**:该版本着重于提高系统的整体性能,并针对特定使用场景进行了优化。 4. **...
通过详细阅读提供的"ubuntu安装图解",可以清晰地了解每个步骤,使得新手也能顺利进行安装。然而,随着技术的发展,更现代的版本如Ubuntu 20.04 LTS可能包含更多改进和安全特性,因此在新项目中考虑使用更新的版本是...
Ubuntu 12.04下如何安装MySQL ,我按照这文档,已经成功在ubuntu 12.04安装成功mysql!
《Ubuntu 12.04 使用手册1—4》是一套专为Ubuntu 12.04 LTS(长期支持版)用户编写的详尽指南,旨在帮助初学者和进阶用户掌握这一开源操作系统的基本操作与高级技巧。Ubuntu 12.04,代号“Precise Pangolin”,是...
本文将详细介绍如何在Ubuntu12.04 LTS和Ubuntu14.04 LTS两个版本中安装64位版本的搜狗拼音输入法。 #### 二、Ubuntu14.04 LTS版本安装指南 对于Ubuntu 14.04 LTS版本,安装搜狗拼音输入法的过程相对简单: 1. **...
Ubuntu 12.04 中 Samba 安装和设置指南 Samba 是一款功能强大的共享工具,可以实现与 Windows 的共享,就是我们经常在 Windows 计算机之间使用的网上邻居功能,可以共享文件和打印机等。在 Ubuntu 12.04 中安装和...