﻿<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/"><channel><title>BlogJava-狼爱上狸-随笔分类-ORACLE</title><link>http://www.blogjava.net/waterjava/category/9753.html</link><description>我胡汉山又回来了!</description><language>zh-cn</language><lastBuildDate>Fri, 02 May 2008 21:58:52 GMT</lastBuildDate><pubDate>Fri, 02 May 2008 21:58:52 GMT</pubDate><ttl>60</ttl><item><title>dbstart&amp;dbshut脚本中的错误</title><link>http://www.blogjava.net/waterjava/archive/2008/05/02/197758.html</link><dc:creator>狼爱上狸</dc:creator><author>狼爱上狸</author><pubDate>Fri, 02 May 2008 09:30:00 GMT</pubDate><guid>http://www.blogjava.net/waterjava/archive/2008/05/02/197758.html</guid><wfw:comment>http://www.blogjava.net/waterjava/comments/197758.html</wfw:comment><comments>http://www.blogjava.net/waterjava/archive/2008/05/02/197758.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/waterjava/comments/commentRss/197758.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/waterjava/services/trackbacks/197758.html</trackback:ping><description><![CDATA[<p><font size="2">Oracle提供了两个脚本dbstart和dbshut用来启动和关闭数据库.<br />
这两个脚本首先读取oratab(/etc/oratab)文件来决定哪个数据库是需要自动启动和关闭,然后启动和关闭那些数据库,<br />
oratab文件通过root.sh创建.</font><br />
</p>
<p><font size="2">[oracle@chicago oracle]$ cat /etc/oratab <br />
#</font></p>
<p><font size="2"># This file is used by ORACLE utilities.  It is created by root.sh<br />
# and updated by the Database Configuration Assistant when creating<br />
# a database.</font></p>
<p><font size="2"># A colon, ':', is used as the field terminator.  A new line terminates<br />
# the entry.  Lines beginning with a pound sign, '#', are comments.<br />
#<br />
# Entries are of the form:<br />
#   $ORACLE_SID:$ORACLE_HOME:&lt;N|Y&gt;:<br />
#<br />
# The first and second fields are the system identifier and home<br />
# directory of the database respectively.  The third filed indicates<br />
# to the dbstart utility that the database should , "Y", or should not,<br />
# "N", be brought up at system boot time.<br />
#<br />
# Multiple entries with the same $ORACLE_SID are not allowed.<br />
#<br />
#<br />
orcl:/u01/app/oracle/oracle/product/10.2.0/db_1:Y</font></p>
<p><font size="2">不过,dbstart/dbshut脚本中都包含有错误.<br />
需要修改ORACLE_HOME_LISTNER=$ORACLE_HOME<br />
[oracle@chicago oracle]$ dbstart<br />
ORACLE_HOME_LISTNER is not SET, unable to auto-start Oracle Net Listener<br />
Usage: /u01/app/oracle/oracle/product/10.2.0/db_1/bin/dbstart ORACLE_HOME</font></p>
<p><font size="2">[oracle@chicago oracle]$ vi $ORACLE_HOME/bin/dbstart</font></p>
<p><font size="2">:<br />
#<br />
# $Id: dbstart.sh.pp 25-may-2005.14:52:00 vikrkuma Exp $<br />
# Copyright (c) 1991, 2005, Oracle. All rights reserved.<br />
#</font></p>
<p><font size="2">###################################<br />
#<br />
# usage: dbstart $ORACLE_HOME<br />
#<br />
# This script is used to start ORACLE from /etc/rc(.local).<br />
# It should ONLY be executed as part of the system boot procedure.<br />
#<br />
# This script will start all databases listed in the oratab file<br />
# whose third field is a "Y".  If the third field is set to "Y" and<br />
# there is no ORACLE_SID for an entry (the first field is a *),<br />
# then this script will ignore that entry.<br />
#<br />
# This script requires that ASM ORACLE_SID's start with a +, and<br />
# that non-ASM instance ORACLE_SID's do not start with a +.<br />
#<br />
# If ASM instances are to be started with this script, it cannot<br />
# be used inside an rc*.d directory, and should be invoked from<br />
# rc.local only. Otherwise, the CSS service may not be available<br />
# yet, and this script will block init from completing the boot<br />
# cycle.<br />
#<br />
# If you want dbstart to auto-start a single-instance database that uses<br />
# an ASM server that is auto-started by CRS (this is the default behavior<br />
# for an ASM cluster), you must change the database's ORATAB entry to use<br />
# a third field of "W" and the ASM's ORATAB entry to use a third field of "N".<br />
# These values specify that dbstart auto-starts the database only after<br />
# the ASM instance is up and running.<br />
#<br />
# Note:<br />
# Use ORACLE_TRACE=T for tracing this script.<br />
#<br />
# The progress log for each instance bringup plus Error and Warning message[s]<br />
# are logged in file $ORACLE_HOME/startup.log. The error messages related to<br />
# instance bringup are also logged to syslog (system log module).<br />
# The Listener log is located at $ORACLE_HOME_LISTNER/listener.log<br />
#<br />
# To configure:<br />
# 1) Set ORATAB:<br />
#    On Solaris<br />
#      ORATAB=/var/opt/oracle/oratab<br />
#    All other UNIX platforms<br />
#      ORATAB=/etc/oratab<br />
#<br />
# 2) Update $ORATAB/oratab with Database Instances that need to be started up.<br />
#    Entries are of the form:<br />
#    $ORACLE_SID:$ORACLE_HOME:&lt;N|Y|W&gt;:<br />
#    An example entry:<br />
#    main:/usr/lib/oracle/emagent_10g:Y<br />
#<br />
# Overall algorithm:<br />
# 1) Bring up all ASM instances with 'Y' entry in status field in oratab entry<br />
# 2) Bring up all Database instances with 'Y' entry in status field in<br />
#    oratab entry<br />
# 3) If there are Database instances with 'W' entry in status field<br />
#    then<br />
#      iterate over all ASM instances (irrespective of 'Y' or 'N') AND<br />
#      wait for all of them to be started<br />
#    fi<br />
# 4) Bring up all Database instances with 'W' entry in status field in<br />
#    oratab entry<br />
#<br />
#####################################</font></p>
<p><font size="2">LOGMSG="logger -puser.alert -s "</font></p>
<p><font size="2">trap 'exit' 1 2 3</font></p>
<p><font size="2"># for script tracing<br />
case $ORACLE_TRACE in<br />
T) set -x ;;<br />
esac</font></p>
<p><font size="2"># Set path if path not set (if called from /etc/rc)<br />
case $PATH in<br />
"") PATH=/bin:/usr/bin:/etc<br />
export PATH ;;<br />
esac<br />
# Save LD_LIBRARY_PATH<br />
SAVE_LLP=$LD_LIBRARY_PATH</font></p>
<p><font size="2"># First argument is used to bring up Oracle Net Listener<br />
<strong>ORACLE_HOME_LISTNER=$ORACLE_HOME</strong><br />
if [ ! $ORACLE_HOME_LISTNER ] ; then<br />
echo "ORACLE_HOME_LISTNER is not SET, unable to auto-start Oracle Net Listener"<br />
echo "Usage: $0 ORACLE_HOME"<br />
else<br />
LOG=$ORACLE_HOME_LISTNER/listener.log</font></p>
<p><font size="2">  # Start Oracle Net Listener<br />
if [ -x $ORACLE_HOME_LISTNER/bin/tnslsnr ] ; then<br />
echo "$0: Starting Oracle Net Listener" &gt;&gt; $LOG 2&gt;&amp;1<br />
"/u01/app/oracle/oracle/product/10.2.0/db_1/bin/dbstart" 461L, 13926C written          <br />
[oracle@chicago oracle]$ dbstart<br />
Processing Database instance "orcl": log file /u01/app/oracle/oracle/product/10.2.0/db_1/startup.log<br />
[oracle@chicago oracle]$ dbshut<br />
ORACLE_HOME_LISTNER is not SET, unable to auto-stop Oracle Net Listener<br />
Usage: /u01/app/oracle/oracle/product/10.2.0/db_1/bin/dbshut ORACLE_HOME<br />
Processing Database instance "orcl": log file /u01/app/oracle/oracle/product/10.2.0/db_1/shutdown.log<br />
[oracle@chicago oracle]$ vi $ORACLE_HOME/bin/dbshut</font></p>
<p><font size="2">:<br />
#<br />
# $Id: dbshut.sh.pp 11-may-2005.19:37:00 vikrkuma Exp $<br />
# Copyright (c) 1991, 2005, Oracle. All rights reserved.<br />
#</font></p>
<p><font size="2">###################################<br />
#<br />
# usage: dbshut $ORACLE_HOME<br />
#<br />
# This script is used to shutdown ORACLE from /etc/rc(.local).<br />
# It should ONLY be executed as part of the system boot procedure.<br />
#<br />
# This script will shutdown all databases listed in the oratab file<br />
# whose third field is a "Y" or "W".  If the third field is set to "Y" and<br />
# there is no ORACLE_SID for an entry (the first field is a *),<br />
# then this script will ignore that entry.<br />
#<br />
# This script requires that ASM ORACLE_SID's start with a +, and<br />
# that non-ASM instance ORACLE_SID's do not start with a +.<br />
#<br />
# Note:<br />
# Use ORACLE_TRACE=T for tracing this script.<br />
# Oracle Net Listener is also shutdown using this script.<br />
#<br />
# The progress log for each instance shutdown is logged in file<br />
# $ORACLE_HOME/shutdown.log.<br />
#<br />
# To configure:<br />
# 1) Set ORATAB:<br />
#    On Solaris<br />
#      ORATAB=/var/opt/oracle/oratab<br />
#    All other UNIX platforms<br />
#      ORATAB=/etc/oratab<br />
#<br />
# 2) Update $ORATAB/oratab with Database Instances that need to be shutdown.<br />
#    Entries are of the form:<br />
#    $ORACLE_SID:$ORACLE_HOME:&lt;N|Y&gt;:<br />
#    An example entry:<br />
#    main:/usr/lib/oracle/emagent_10g:Y<br />
#<br />
# Note:<br />
# Use ORACLE_TRACE=T for tracing this script.<br />
# Oracle Net Listener is NOT shutdown using this script.<br />
#<br />
# The progress log for each instance shutdown is logged in file<br />
# $ORACLE_HOME/shutdown.log.<br />
#<br />
# To configure:<br />
# 1) Set ORATAB:<br />
#    On Solaris<br />
#      ORATAB=/var/opt/oracle/oratab<br />
#    All other UNIX platforms<br />
#      ORATAB=/etc/oratab<br />
#<br />
# 2) Update $ORATAB/oratab with Database Instances that need to be shutdown.<br />
#    Entries are of the form:<br />
#    $ORACLE_SID:$ORACLE_HOME:&lt;N|Y&gt;:<br />
#    An example entry:<br />
#    main:/usr/lib/oracle/emagent_10g:Y<br />
#<br />
#####################################</font></p>
<p><font size="2">trap 'exit' 1 2 3<br />
case $ORACLE_TRACE in<br />
T) set -x ;;<br />
esac<br />
# Set path if path not set (if called from /etc/rc)<br />
case $PATH in<br />
"") PATH=/bin:/usr/bin:/etc<br />
export PATH ;;<br />
esac<br />
# Save LD_LIBRARY_PATH<br />
SAVE_LLP=$LD_LIBRARY_PATH</font></p>
<p><font size="2"># The  this to bring down Oracle Net Listener<br />
<strong>ORACLE_HOME_LISTNER=$ORACLE_HOME</strong><br />
if [ ! $ORACLE_HOME_LISTNER ] ; then<br />
echo "ORACLE_HOME_LISTNER is not SET, unable to auto-stop Oracle Net Listener"<br />
echo "Usage: $0 ORACLE_HOME"<br />
else<br />
LOG=$ORACLE_HOME_LISTNER/listener.log</font></p>
<p><font size="2">  # Stop Oracle Net Listener<br />
if [ -f $ORACLE_HOME_LISTNER/bin/tnslsnr ] ; then<br />
"/u01/app/oracle/oracle/product/10.2.0/db_1/bin/dbshut" 246L, 6592C written<br />
[oracle@chicago oracle]$ dbstart<br />
Processing Database instance "orcl": log file /u01/app/oracle/oracle/product/10.2.0/db_1/startup.log<br />
[oracle@chicago oracle]$ dbshut<br />
Processing Database instance "orcl": log file /u01/app/oracle/oracle/product/10.2.0/db_1/shutdown.log<br />
[oracle@chicago oracle]$</font></p>
来自：http://benbo.itpub.net/post/26034/311306
<img src ="http://www.blogjava.net/waterjava/aggbug/197758.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/waterjava/" target="_blank">狼爱上狸</a> 2008-05-02 17:30 <a href="http://www.blogjava.net/waterjava/archive/2008/05/02/197758.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Installing Oracle 11g on Ubuntu Linux 7.04</title><link>http://www.blogjava.net/waterjava/archive/2008/04/27/196628.html</link><dc:creator>狼爱上狸</dc:creator><author>狼爱上狸</author><pubDate>Sun, 27 Apr 2008 12:55:00 GMT</pubDate><guid>http://www.blogjava.net/waterjava/archive/2008/04/27/196628.html</guid><wfw:comment>http://www.blogjava.net/waterjava/comments/196628.html</wfw:comment><comments>http://www.blogjava.net/waterjava/archive/2008/04/27/196628.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/waterjava/comments/commentRss/196628.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/waterjava/services/trackbacks/196628.html</trackback:ping><description><![CDATA[<p>I come from a MySQL background, and I have been given the challenge
of learning Oracle. I can&#8217;t just play around with our customers&#8217;
databases, but I remembered that <a href="http://www.pythian.com/blogs/author/pvallee/">Paul Vall&#233;e</a>
said that there is nothing wrong with learning on company time. So I
decided to install my own Oracle database, which I&#8217;ll be free to
destroy in every way I can think of&#8230; and of course, free to bring it
back to life. Recovering from crashes will probably be the most
difficult part of my adventures in the Oracle world, but let&#8217;s take one
step at a time, shall we? </p>
<p>Now, onto Oracle 11g (beta 5) on <a href="http://releases.ubuntu.com/7.04/">Ubuntu 7.04 (Feisty Fawn)</a>.
One little issue is that Ubuntu is unsupported by Oracle. So, through
this text, we will trick the Oracle installer into thinking it&#8217;s
actually running on a Red Hat box.</p>
<h3>Step Zero</h3>
<p>This tutorial was based on a document which can be found <a href="https://help.ubuntu.com/community/Oracle10gBreezy">here</a>.  I have adapted it for Oracle 11g.</p>
<p>Get a copy of Ubuntu 7.04 and install on a machine. I&#8217;m using the
32-bit version here (as well as for Oracle). Next, make sure your
system is up-to-date. A simple <code>apt-get update</code> followed by a <code>apt-get upgrade</code>
will do the trick, although you may prefer using the GUI Synaptic
Package Manager — it&#8217;s entirely up to you what method you choose.
However, I much prefer to use the command line. </p>
<p>As you go through updates, sometimes a reboot will be needed
(usually to boot from a newer, recently-updated kernel). Sometimes
it&#8217;ll just ask you to restart your web browser or some other program as
a new version is installed. </p>
<p>It&#8217;s important to have a few gigabytes of free disk space and a
total of 1 GB of memory before starting this. This 1 GB of memory can
be RAM alone or the combination of RAM and swap space. Of course, since
everything runs faster when in RAM, the more of it, the better. </p>
<p>Very important: get Java running before trying to move on. My guess
is that almost any JRE (java runtime) or JDK (java development kit)
will work. I&#8217;m not sure which is the minimum version required: I used
Sun JDK 1.5. </p>
<h3>Step One</h3>
<p>Install some system requirements. There are a few packages that I
had to install on this box (it was a recently installed system which
didn&#8217;t have all these packages). After several attempts of installing
Oracle, the equivalent command-line for installing all the necessary
packages at once was something like this:</p>
<pre># apt-get install gcc make binutils lesstif2 libc6 libc6-dev rpm libmotif3 libaio libstdc++5 gawk alien libg++2.8.1.3-glibc2.2 ksh gcc-3.3 g++-3.3 libstdc++5<br />
</pre>
<p>It&#8217;s possible that when installing the packages mentioned above, the
installer will install some other prerequisites as well, as these
packages themselves may have prerequisites.</p>
<h3>Step Two</h3>
<p>Choose where you are going to install your Oracle 11g server and create the <code>ORACLE_BASE</code> directory. This is the place where Oracle will be installed. Make sure there is <em>at least</em>
3 GB on the partition/mount point before moving to the next step. After
installed, my basic installation took about 3.4 GB on disk (without the
starter database!). As your database grows, it will need more space.
Reserve a total of at least 6 GB for the unpacked installer and the
basic installation. You can get rid of the installer files afterwards.</p>
<pre># mkdir -p /u01/app/oracle<br />
</pre>
<h3>Step Three</h3>
<p>Add a few users and change groups to make the installer more
comfortable. Remember, we are tricking the installer to think it&#8217;s
installing on a Red Hat box.</p>
<pre># addgroup oinstall<br />
# addgroup dba<br />
# addgroup nobody<br />
# useradd -g oinstall -G dba -p password -d /home/oracle -s /bin/bash oracle<br />
# usermod -g nobody nobody<br />
</pre>
<p>The <code>usermod</code> command is needed since because when running, the installer looks for a user called <code>nobody</code> which is part of a group named <code>nobody</code> (in Ubuntu, the user <code>nobody</code> it&#8217;s assigned to <code>nogroup</code> by default).</p>
<h3>Step Four</h3>
<p>Make some symlinks. Apparently, the installer uses absolute paths, so it must find the binaries in the right places.</p>
<pre># ln -s /usr/bin/awk /bin/awk<br />
# ln -s /usr/bin/rpm /bin/rpm<br />
# ln -s /usr/bin/basename /bin/basename<br />
</pre>
<h3>Step Five</h3>
<p>We need to mimic the <code>/etc/rc.d</code> directory structure of a Red Hat box. We do this with more symlinks:</p>
<pre># mkdir /etc/rc.d<br />
# ln -s /etc/rc0.d /etc/rc.d/rc0.d<br />
# ln -s /etc/rc2.d /etc/rc.d/rc2.d<br />
# ln -s /etc/rc3.d /etc/rc.d/rc3.d<br />
# ln -s /etc/rc4.d /etc/rc.d/rc4.d<br />
# ln -s /etc/rc5.d /etc/rc.d/rc5.d<br />
# ln -s /etc/rc6.d /etc/rc.d/rc6.d<br />
# ln -s /etc/init.d /etc/rc.d/init.d<br />
</pre>
<h3>Step Six</h3>
<p>I&#8217;ve created a file called <code>/etc/redhat-release</code> and put only one line on it. The same can be achieved by issuing the following as root:</p>
<pre>echo "Red Hat Linux release 4" &gt; /etc/redhat-release<br />
</pre>
<h3>Step Seven</h3>
<p>We tweak the system default limits on a few items. The shared-memory
are specially important, since Oracle relies on shared memory for
process communications. There is a file called <code>/etc/sysctl.conf</code> and it should have these lines on it:</p>
<pre>fs.file-max = 65535<br />
kernel.shmall = 2097152<br />
kernel.shmmax = 2147483648<br />
kernel.shmmni = 4096<br />
kernel.sem = 250 32000 100 128<br />
net.ipv4.ip_local_port_range = 1024 65000<br />
net.core.rmem_default = 1048576<br />
net.core.rmem_max = 1048576<br />
net.core.wmem_default = 262144<br />
net.core.wmem_max = 262144<br />
</pre>
<p>Now that they are in a config file, these limits will be issued
automatically at the next boot sequence. For now, we need to make the
system re-read the config file:</p>
<pre># sysctl -p<br />
</pre>
<p>Now, what do those parameters and values actually mean?</p>
<ul>
    <li><code>fs.file-max</code> sets the maximum number of open files that can be handled by the Linux kernel.</li>
    <li><code>kernel.shmall</code> determines the total amount of shared
    memory to be allocated in pages. In this example, I&#8217;ve set it to 8GB,
    which is way above the amount of memory I can handle in my box, even
    with swap.</li>
    <li><code>kernel.shmmax</code> controls the maximum amount of memory to be allocated for shared memory which in this example is 2GB.</li>
    <li><code>kernel.shmmni</code> defines the maximum number of segments system-wide.</li>
    <li><code>net.core.rmem_default</code> and <code>net.core.rmem_max</code> define the default and maximum read buffer queue for network operations (1 MB in this example)</li>
    <li><code>net.core.wmem_default</code> and <code>net.core.wmem_max</code> define the default and maximum write buffer queue for network operations (256 KB in this example)</li>
    <li><code>net.ipv4.ip_local_port_range</code> tells the kernel the port ranges that will be used for outbound connections.</li>
    <li><code>kernel.sem</code> has four parameters:
    <ol>
        <li><code>SEMMSL</code> - semaphores per array</li>
        <li><code>SEMMNS</code> - max semaphores system-wide (<code>SEMMNI*SEMMSL</code>)</li>
        <li><code>SEMOPM</code> - max operations per semop call</li>
        <li><code>SEMMNI</code> - max number of semaphore arrays</li>
    </ol>
    </li>
</ul>
<p>To check your current semaphores configuration, you can run <code>cat /proc/sys/kernel/sem</code> or <code>ipcs -ls</code>. On my machine, after the modifications on <code>sysctl.conf</code>, these commands output:</p>
<pre># cat /proc/sys/kernel/sem<br />
250     32000   100     128<br />
<br />
# ipcs -ls<br />
<br />
------ Semaphore Limits --------<br />
max number of arrays = 128<br />
max semaphores per array = 250<br />
max semaphores system wide = 32000<br />
max ops per semop call = 100<br />
semaphore max value = 32767<br />
</pre>
<p>(I really don&#8217;t know if these are enough or too much, but I&#8217;ll keep you posted.)</p>
<p>For a better understanding of these kernel-tweaking settings, I&#8217;d recommend these resources:
</p>
<ul>
    <li><a href="http://schogini.us/wordpress/index.php/2005/11/01/setting-semaphores/">schogini.us/wordpress/index.php/2005/11/01/setting-semaphores/</a></li>
    <li><a href="http://www.performancewiki.com/linux-tuning.html">performancewiki.com/linux-tuning.html</a></li>
    <li><a href="http://www.pythian.com/blogs/245/the-mysterious-world-of-shmmax-and-shmall">pythian.com/blogs/245/the-mysterious-world-of-shmmax-and-shmall</a></li>
</ul>
<h3>Step Eight</h3>
<p>Add these lines to <code>/etc/security/limits.conf</code>, letting the <code>oracle</code>
user use more resources than the defaults allowed. You may notice that
all these values are a power of 2 minus one. When soft limits are
exceeded, you&#8217;ll get a warning; the hard limits can&#8217;t be exceeded in
any situation: you&#8217;ll get an error. I&#8217;m not completely sure, but I
think these limits apply to each session/login (and since Oracle
doesn&#8217;t exactly log in to the machine, my best guess is these limits
apply per instance running).</p>
<pre>oracle soft nproc 2047<br />
oracle hard nproc 16383<br />
oracle soft nofile 1023<br />
oracle hard nofile 65535<br />
</pre>
<h3>Step Nine</h3>
<p>Make sure the <code>limits.conf</code> is being interpreted as the <code>oracle</code> user logs in by adding these lines to <code>/etc/pam.d/login</code>. You will want to make sure that is actually happening, since the defaults are way lower and you may get all sorts of problems.</p>
<pre>session required /lib/security/pam_limits.so<br />
session required pam_limits.so<br />
</pre>
<h3>Step Ten</h3>
<p>Unpack and prepare the installation.</p>
<pre># cd /path/to/zipfile<br />
# unzip linux_11gR1b5_database.zip<br />
</pre>
<p> (And wait&#8230; wait a bit more&#8230;  go get a cup of coffee&#8230;) </p>
<p>After your second cup of coffee, you should have a multi-gigabyte set of files; this  is our installer. </p>
<pre># chown -R oracle:oinstall database<br />
# chown -R oracle:oinstall /u01/app/oracle<br />
</pre>
<h3>Step Eleven</h3>
<p>Fire up the installer as the <code>oracle</code> user itself. This is what you will probably see on the output window:</p>
<pre># su - oracle<br />
$ cd /path/to/extracted/zip/file<br />
$ ./runInstaller<br />
Starting Oracle Universal Installer...<br />
<br />
Checking Temp space: must be greater than 80 MB. Actual 58633 MB Passed<br />
Checking swap space: must be greater than 150 MB. Actual 2900 MB Passed<br />
Checking monitor: must be configured to display at least 256 colors. Actual 16777216 Passed<br />
Preparing to launch Oracle Universal Installer from /tmp/OraInstall2007-07-11_04-38-56PM. Please wait ...<br />
Oracle Universal Installer, Version 11.1.0.2.0 Production<br />
Copyright (C) 1999, 2007, Oracle. All rights reserved.<br />
<br />
ulimit: 1: Illegal option -u<br />
ulimit: 1: Illegal option -u<br />
rpm: To install rpm packages on Debian systems, use alien. See README.Debian.<br />
error: cannot open Packages index using db3 - No such file or directory (2)<br />
error: cannot open Packages database in /var/lib/rpm<br />
rpm: To install rpm packages on Debian systems, use alien. See README.Debian.<br />
error: cannot open Packages index using db3 - No such file or directory (2)<br />
error: cannot open Packages database in /var/lib/rpm<br />
</pre>
<p>There are a few errors that can be safely ignored: the <code>ulimit</code>
and the RPM-related errors, since the limits don&#8217;t restrict the
installer and since we actually don&#8217;t have a RPM database on the
machine — we are running on Ubuntu, remember? </p>
<p>After a few moments, you will be prompted to choose where to install
the Oracle server. You&#8217;ll notice that I asked the installer to not
create a starter database — I did that later. Choose the Oracle Base
and correct the group if needed. I personally recommend sticking with
the defaults if you are a newbie like me.</p>
<p><a href="http://www.pythian.com/blogs/wp-content/uploads/o11g_011.png" title="sm_o11g_011.png"><img src="http://www.pythian.com/blogs/wp-content/uploads/sm_o11g_011.png" alt="sm_o11g_011.png" /></a></p>
<p>As you press the <strong>Next</strong> button, you will be prompted where to install the Inventory — <strong>leave it that way</strong>
unless you know what you are doing (if this were the case, you wouldn&#8217;t
be reading this text anyways). Also correct the OS group name if needed
and hit <strong>Next</strong>.</p>
<p><a href="http://www.pythian.com/blogs/wp-content/uploads/o11g_02.png" title="sm_o11g_021.png"><img src="http://www.pythian.com/blogs/wp-content/uploads/sm_o11g_021.png" alt="sm_o11g_021.png" /></a></p>
<p>Since I&#8217;ve chosen to install the server in the same directory as the <code>oracle</code> user&#8217;s <code>HOME</code> directory, the installer will issue a warning. I simply ignored it and continued with the installation.</p>
<p><a href="http://www.pythian.com/blogs/wp-content/uploads/o11g_03.png" title="sm_o11g_03.png"><img src="http://www.pythian.com/blogs/wp-content/uploads/sm_o11g_03.png" alt="sm_o11g_03.png" /></a></p>
<p>After that warning, I tried to perform some prerequisite tests, and yes — some will fail. Just mark the failed boxes and hit <strong>Next</strong> (after trying a few times to fix those issues, I&#8217;ve decided to call the installer&#8217;s bluff and&#8230; it worked!)</p>
<p><a href="http://www.pythian.com/blogs/wp-content/uploads/o11g_04.png" title="sm_o11g_04.png"><img src="http://www.pythian.com/blogs/wp-content/uploads/sm_o11g_04.png" alt="sm_o11g_04.png" /></a></p>
<p>After all this warning stuff, it&#8217;ll ask you to check the list of
products to be installed. I was amazed when I read that 122 different
products would be installed on my box. Hit <strong>Next</strong>.</p>
<p>Go get some coffee.</p>
<p><a href="http://www.pythian.com/blogs/wp-content/uploads/o11g_06.png" title="sm_o11g_06.png"><img src="http://www.pythian.com/blogs/wp-content/uploads/sm_o11g_06.png" alt="sm_o11g_06.png" /></a></p>
<p>And some more coffee.</p>
<p><a href="http://www.pythian.com/blogs/wp-content/uploads/o11g_07.png" title="sm_o11g_07.png"><img src="http://www.pythian.com/blogs/wp-content/uploads/sm_o11g_07.png" alt="sm_o11g_07.png" /></a></p>
<p>And even more coffee.</p>
<p><a href="http://www.pythian.com/blogs/wp-content/uploads/o11g_08.png" title="sm_o11g_08.png"><img src="http://www.pythian.com/blogs/wp-content/uploads/sm_o11g_08.png" alt="sm_o11g_08.png" /></a></p>
<p>You may like to go to the washroom after so much time drinking
coffee. Remember: I was installing on a 3 GHz machine with 1 GiB of RAM
with SATA2 disks — this box is supposed be blazing fast.</p>
<p><a href="http://www.pythian.com/blogs/wp-content/uploads/o11g_09.png" title="sm_o11g_09.png"><img src="http://www.pythian.com/blogs/wp-content/uploads/sm_o11g_09.png" alt="sm_o11g_09.png" /></a></p>
<p>At some point, it will ask you to run some commands as <code>root</code>. Do that when it asks, since the install depends on a few modifications on the base system (like creating the <code>/etc/oratab</code> file).</p>
<pre>$ sudo -s<br />
Password:<br />
<br />
# /u01/app/oracle/oraInventory/orainstRoot.sh<br />
Changing permissions of /u01/app/oracle/oraInventory to 770.<br />
Changing groupname of /u01/app/oracle/oraInventory to oinstall.<br />
The execution of the script is complete<br />
<br />
# /u01/app/oracle/product/11.1.0/db_1/root.sh<br />
Running Oracle 11g root.sh script...<br />
<br />
The following environment variables are set as:<br />
ORACLE_OWNER= oracle<br />
ORACLE_HOME= /u01/app/oracle/product/11.1.0/db_1<br />
[: 185: ==: unexpected operator<br />
[: 189: ==: unexpected operator<br />
Copying dbhome to /usr/local/bin ...<br />
Copying oraenv to /usr/local/bin ...<br />
Copying coraenv to /usr/local/bin ...<br />
<br />
Creating /etc/oratab file...<br />
Entries will be added to the /etc/oratab file as needed by<br />
Database Configuration Assistant when a database is created<br />
Finished running generic part of root.sh script.<br />
Now product-specific root actions will be performed.<br />
Finished product-specific root actions.<br />
</pre>
<p>After these scripts finish their execution (the errors seem to be
ignorable), hit the OK button and you&#8217;ll have a window that (probably)
will look like this one:</p>
<p><a href="http://www.pythian.com/blogs/wp-content/uploads/o11g_10.png" title="sm_o11g_10.png"><img src="http://www.pythian.com/blogs/wp-content/uploads/sm_o11g_10.png" alt="sm_o11g_10.png" /></a></p>
<p>Just hit OK to get out the installer.   The basic installation is&#8230; not over yet.</p>
<p><a href="http://www.pythian.com/blogs/wp-content/uploads/o11g_11.png" title="sm_o11g_11.png"><img src="http://www.pythian.com/blogs/wp-content/uploads/sm_o11g_11.png" alt="sm_o11g_11.png" /></a></p>
<p>To allow Oracle start on boot-up, create a file called <code>oracledb</code> (or whatever name you want to call it) and put it in <code>/etc/init.d</code> with the contents below. This script was copied and pasted from <a href="http://linux.togaware.com/survivor/Oracle_10g.html">a tutorial by Graham Williams</a>. It will read the <code>/etc/oratab</code> and fire up any instances it finds.</p>
<pre>#!/bin/bash<br />
#<br />
# /etc/init.d/oracledb<br />
#<br />
# Run-level Startup script for the Oracle Instance, Listener, and Web Interface<br />
<br />
export ORACLE_HOME=/u01/app/oracle<br />
export PATH=$PATH:$ORACLE_HOME/bin<br />
<br />
ORA_OWNR="oracle"<br />
<br />
# if the executables do not exist -- display error<br />
<br />
if [ ! -f $ORACLE_HOME/bin/dbstart -o ! -d $ORACLE_HOME ]<br />
then<br />
echo "Oracle startup: cannot start"<br />
exit 1<br />
fi<br />
<br />
# depending on parameter -- startup, shutdown, restart<br />
# of the instance and listener or usage display<br />
<br />
case "$1" in<br />
start)<br />
# Oracle listener and instance startup<br />
echo -n "Starting Oracle: "<br />
su $ORA_OWNR -c "$ORACLE_HOME/bin/lsnrctl start"<br />
su $ORA_OWNR -c $ORACLE_HOME/bin/dbstart<br />
touch /var/lock/oracle<br />
<br />
su $ORA_OWNR -c "$ORACLE_HOME/bin/emctl start dbconsole"<br />
echo "OK"<br />
;;<br />
stop)<br />
# Oracle listener and instance shutdown<br />
echo -n "Shutdown Oracle: "<br />
su $ORA_OWNR -c "$ORACLE_HOME/bin/lsnrctl stop"<br />
su $ORA_OWNR -c $ORACLE_HOME/bin/dbshut<br />
rm -f /var/lock/oracle<br />
<br />
su $ORA_OWNR -c "$ORACLE_HOME/bin/emctl stop dbconsole"<br />
echo "OK"<br />
;;<br />
reload|restart)<br />
$0 stop<br />
$0 start<br />
;;<br />
*)<br />
echo "Usage: `basename $0` start|stop|restart|reload"<br />
exit 1<br />
esac<br />
<br />
exit 0<br />
</pre>
<p>After saving the file, make it executable</p>
<pre># chmod a+x /etc/init.d/oracledb<br />
</pre>
<p>and if you want, make it run at every boot:</p>
<pre># update-rc.d oracledb defaults 99<br />
Adding system startup for /etc/init.d/oracledb ...<br />
/etc/rc0.d/K99oracledb -&gt; ../init.d/oracledb<br />
/etc/rc1.d/K99oracledb -&gt; ../init.d/oracledb<br />
/etc/rc6.d/K99oracledb -&gt; ../init.d/oracledb<br />
/etc/rc2.d/S99oracledb -&gt; ../init.d/oracledb<br />
/etc/rc3.d/S99oracledb -&gt; ../init.d/oracledb<br />
/etc/rc4.d/S99oracledb -&gt; ../init.d/oracledb<br />
/etc/rc5.d/S99oracledb -&gt; ../init.d/oracledb<br />
</pre>
<p>Before finishing, add the following lines to your <code>/etc/profile</code>
. Be careful, since these values are valid system-wide. So make sure
the paths are set according to your particular setup (if you have been
doing everything according to this text, you should be fine).</p>
<pre>export ORACLE_BASE=/u01/app/oracle<br />
export ORACLE_HOME=/u01/app/oracle/product/11.1.0/db_1<br />
export ORACLE_SID=ORCL<br />
export PATH=$PATH:/u01/app/oracle/product/11.1.0/db_1/bin<br />
</pre>
<p>Last operation: add yourself to the <code>dba</code> group. You can use <code>usermod</code> or just edit the <code>/etc/groups</code> file and add your username at the end of the line that starts with <code>dba</code> (my username is &#8216;bott&#8217;):</p>
<pre>dba:x:1002:oracle,bott<br />
</pre>
<p>If you chose to not create a starter database during your install,
you&#8217;ll have to do two extra steps. You should create a listener (with <code>netca</code>) and after that, create the starter database (also with <code>netca</code>).
If you chose to have the installer create a database for you, then you
should be fine, since when doing that, it asks for a password for the
default accounts (<code>SYS</code>, <code>SYSTEM</code>, and <code>DBSNMP</code>, <code>SYSMAN</code> if you choose to install it with the enterprise manager option selected).</p>
<p>If everything has gone well, open a terminal window and, as the <code>oracle</code> user, type:</p>
<pre>$ sqlplus <br />
<br />
SQL*Plus: Release 11.1.0.5.0 - Beta on Wed Jul 11 17:11:53 2007<br />
<br />
Copyright (c) 1982, 2007, Oracle. All rights reserved.<br />
<br />
Enter user-name:<br />
</pre>
<p>If you see these messages (and I sincerely hope you do) you&#8217;re all
set! That means that you have finished a quite long install of Oracle
11g and you are ready to begin destroying it, just as I plan to as I
take my first steps with Oracle. Some might say that going from Oracle
to MySQL would make for an easier transition — I really don&#8217;t know, but
I will post further entries on my experiences as I go. </p>
<p>Anyway, I would greatly appreciate your feedback, especially if we
can improve this tutorial so that more people can benefit from it.</p>
<p>Augusto Bott.</p>
<p><br />
</p>
comefrom:http://www.phpchina.com/batch.viewlink.php?itemid=14789
<img src ="http://www.blogjava.net/waterjava/aggbug/196628.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/waterjava/" target="_blank">狼爱上狸</a> 2008-04-27 20:55 <a href="http://www.blogjava.net/waterjava/archive/2008/04/27/196628.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Ubuntu 下使用Orcale Express Edition</title><link>http://www.blogjava.net/waterjava/archive/2008/04/08/191581.html</link><dc:creator>狼爱上狸</dc:creator><author>狼爱上狸</author><pubDate>Tue, 08 Apr 2008 15:16:00 GMT</pubDate><guid>http://www.blogjava.net/waterjava/archive/2008/04/08/191581.html</guid><wfw:comment>http://www.blogjava.net/waterjava/comments/191581.html</wfw:comment><comments>http://www.blogjava.net/waterjava/archive/2008/04/08/191581.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/waterjava/comments/commentRss/191581.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/waterjava/services/trackbacks/191581.html</trackback:ping><description><![CDATA[目前Oracle10对Ubuntu的支持不好，据说是可以安装，但是需要很麻烦的配置，而且我的老爷机也很难撑住Oracle企业版这种大东西，于是在
自己家里的机子上就安装了Oracle-xe
10，由于对Oracle数据库管理并不是很了解，所以难免碰壁，用下来一段时间发现Oracle-xe在功能上还是能实现很多常见的Oracle应用
（而这些对我一个Developer来说就足够），而使用上则更是大同小异，所以学学Oracle-xe也满不错的。<br />
&nbsp;&nbsp;&nbsp; 一、安装Oracle-xe<br />
&nbsp;&nbsp;&nbsp;
由于新项目采用的是Oracle10i，所以一直想在家里搞个模拟环境，但是在Ubuntu下Oracle就成了我最大的阻碍，先是最开始的PL/SQL
代替品，然后是Oracle的代替品。下载了好久才把Oracle企业版搞下来，但是无法安装，郁闷之下下载了Oracle-xe，下载地址：http:
//www.oracle.com/technology/software/products/database/oracle10g/index.html，
注意选择下载适用于Express Edition z/Linux的版本，
也用了很长时间，但是值得庆幸的是安装还是相当的简单，一个deb包，安装好以后根据它的提示设定初始化配置：http:
//wlx.westgis.ac.cn/260/介绍了Oracle-xe的具体安装设置方法，但是我这里使用ssh方法链接一直报错：
<div>
<div>&nbsp;</div>
<ol start="1" class="dp-j">
    <li>ssh&nbsp;-L&nbsp;8084:localhost:8084&nbsp;oracle@127.0.0.1&nbsp;&nbsp;</li>
    <li>ssh:&nbsp;connect&nbsp;to&nbsp;host&nbsp;127.0.0.1&nbsp;port&nbsp;22:&nbsp;Connection&nbsp;refused&nbsp;&nbsp;</li>
</ol>
</div>
这个错误问了一些人、也搜索了很多，但是没有答案，索性不去搞它，还有SQL PLUS 和Oracle SQL Developer可用。<br />
&nbsp;&nbsp;&nbsp; 二、安装Oracle SQL Developer<br />
&nbsp;&nbsp;&nbsp;
这个是Oracle退出的免费Oracle管理工具，提供多种语言和多个操作系统的实现，由于Ubuntu上没有独立实现，所以下载了Java版本，由于
是使用Swing实现，所以使用起来非常的慢，简直和PL/SQL不是一个档次的东西，但是无奈有这个东西也还算好了。使用Ubuntu的人需要具有更多
的人耐力。<br />
&nbsp;&nbsp;&nbsp; 安装方法很简单，去Oracle的官方网站下载安装即可。 <br />
&nbsp;&nbsp;&nbsp; 三、简单使用Oracle-xe<br />
&nbsp;&nbsp;&nbsp;
首先了解了一下其自带的Sample，是通过Oracle自带的Web管理工具，在Oracle-xe启动以后，访问http://localhost:
&lt;port&gt;/apex就可以了，然后使用SYS或者SYSTEM帐户登录，密码是初始化设定的。包含一个默认的HR帐户，但是需要解除锁
定，在这里面提供了几本的系统管理、表管理等功能，还有一个应用程序管理，这个由Oracle提供的get
started就是一个报表管理程序，按照它的步骤做下来，还是很容易的。<br />
&nbsp;&nbsp;&nbsp; 四、继续学习<br />
&nbsp;&nbsp;&nbsp; http://www.oracle.com/technology/getting-started/xe.html
访问这个地址有更多有关Oracle-xe的文档，接下来学习Oracle&#174; Database Express Edition 2 Day
DBA，讲述了很基础的东西和平时使用Oracle就很像了，Oracle-xe默认的SID是xe，在刚才的Web管理界面里面直接创建一个用户，然后
就可以使用SQL PLUS或者Oracle SQL Developer登录进行Oracle的操作。<br />
<br />
<br />
<br />
来自：http://yueguangyuan.javaeye.com/blog/97027<br />
<img src ="http://www.blogjava.net/waterjava/aggbug/191581.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/waterjava/" target="_blank">狼爱上狸</a> 2008-04-08 23:16 <a href="http://www.blogjava.net/waterjava/archive/2008/04/08/191581.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>在debian上安装oracle 10g express</title><link>http://www.blogjava.net/waterjava/archive/2008/04/08/191579.html</link><dc:creator>狼爱上狸</dc:creator><author>狼爱上狸</author><pubDate>Tue, 08 Apr 2008 15:11:00 GMT</pubDate><guid>http://www.blogjava.net/waterjava/archive/2008/04/08/191579.html</guid><wfw:comment>http://www.blogjava.net/waterjava/comments/191579.html</wfw:comment><comments>http://www.blogjava.net/waterjava/archive/2008/04/08/191579.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/waterjava/comments/commentRss/191579.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/waterjava/services/trackbacks/191579.html</trackback:ping><description><![CDATA[若是要安装oracle10G，可能要麻烦些，但若是安装oracle 10g express的话，那就很简单：<br />
1、修改/etc/apt/source.list，添加oracle的源：<br />
deb http://oss.oracle.com/debian unstable main non-free<br />
2、进行更新和安装<br />
aptitude update<br />
aptitude install oracle-xe-universal<br />
3、进行初始的密码设置<br />
/etc/init.d/oracle-xe configure<br />
若服务器无GUI，可以这样远程管理<br />
ssh -L 8080:localhost:8080 user@IP_of_your_server<br />
firefox http://localhost:8080/apex/<br />
<br />
<br />
<br />
来自:http://wlx.westgis.ac.cn/260/<br />
<img src ="http://www.blogjava.net/waterjava/aggbug/191579.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/waterjava/" target="_blank">狼爱上狸</a> 2008-04-08 23:11 <a href="http://www.blogjava.net/waterjava/archive/2008/04/08/191579.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>在 Ubuntu7.04 上安装 Oracle 10g</title><link>http://www.blogjava.net/waterjava/archive/2007/11/03/157871.html</link><dc:creator>狼爱上狸</dc:creator><author>狼爱上狸</author><pubDate>Sat, 03 Nov 2007 00:24:00 GMT</pubDate><guid>http://www.blogjava.net/waterjava/archive/2007/11/03/157871.html</guid><wfw:comment>http://www.blogjava.net/waterjava/comments/157871.html</wfw:comment><comments>http://www.blogjava.net/waterjava/archive/2007/11/03/157871.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/waterjava/comments/commentRss/157871.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/waterjava/services/trackbacks/157871.html</trackback:ping><description><![CDATA[<span>在 Ubuntu7.04 上安装 Oracle 10g
<br />
<br />
written by flexitime, 2007-10-15〔<a href="http://flexitime.blog.sohu.com/" target="_blank" class="postlink">http://flexitime.blog.sohu.com/</a>）
<br />
<br />
今天终于在Ubuntu7.04上成功安装Oracle10g。为了安装Oracle，花了不少时间到网上查资料，不过更多的时间用于自己的真正实践，当
中走了不少的弯路，现在把安装过程记下来。（我一共在两台机器上安装了三次，这篇文章是在安装第三次的时候一边操作一边在另外的电脑上写的）
<br />
在网上有不少Oracle的安装教程，但这些教程更多的只是针对较低版本的Ubuntu（如6.X，5.X等等），而且安装Oracle的过程中也有些问
题是没有描述和解决的。因此，我觉得有必要自己写一下安装我的实践过程，当然，我主要还是参考了孙高勇先生的《Oracle 10g for
Ubuntu安装指南》的内容。
<br />
现在开始吧！
<br />
<br />
第一步，我们需要一个Ubuntu。当然在网上可以免费下载得到，我用的是桌面版，而不是网站上提供的服务器版，很多刚由Windows转过来的
朋友可能会认为服务器版总会比桌面版多些功能，为此而下载了服务版来用。其实Ubuntu网上提供的下载却不然，服务器版只不过比桌面版多了amp的软件
（a-apache, m-mysql,
p-php)，但却没有图形用户界面（可以另外再安装，但比较麻烦）。为此，我使用了桌面版的Ubuntu来完成这次的安装。安装的时候虽然有中文可以选
择，但我还是选用了英文，这不是我的英文特别好（再好也好不过母语）的缘故，而是因为Ubuntu的汉化未如理想，汉字的支持也不怎么样（特别是在纯
CUI模式下）。所以还是用英文会更好（不必担心，在英文版Ubuntu下一样可以用中文的输入法，同样也可以让Oracle支持中文），要安装
ubuntu，可以参考网上的其它教程。
<br />
<br />
第二步，安装必需的包
<br />
apt-get install gcc make binutils lesstif2 libc6 libc6-dev rpm libmotif3 libaio libstdc++5 alien
<br />
<br />
第三步，创建用户
<br />
在很多教程中都用命令去创建用户。但我发现用命令去创建的用户，在图形界面下用得不甚理想，所以用图形界面的用户管理器增加一下新组叫dba，然后再增加一个普通桌面的用户叫oracle（按默认的设置即可），接着用命令增加一个组及用户
<br />
<br />
addgroup nobody
<br />
usermod -g nobody nobody
<br />
<br />
第三步，复制文件及设置安装目录
<br />
我是用以CD作介质来安装Oracle的，所以安装之前要先将安装文件复制到机器当中（不复制也是可以的，但复制到机器中会比较稳当），我在
/ 上创建一个目录ora_ins_disk，然后将文件都复制进去。复制后，为了确保能顺利进行安装，要查看一下runInstaller及
unzip 两个文件属性，确保其具有x属性（我就在unzip这个地方倒了大霉，试着安装的时候老是报Permission
Denied，我开始的时候一直以为是tmp空间不足，其实是 unzip 中没有运行的权限），如果没有那么要改动一下文件的属性：
<br />
<br />
cd /ora_ins_disk
<br />
chmod 755 runInstaller
<br />
cd install
<br />
chomd 755 unzip
<br />
<br />
我准备把oracle安装到/opt/ora10中，而数据文件也放在这个目录的下层子目录中:
<br />
<br />
cd /opt
<br />
mkdir ora10
<br />
chown -R oracle:dba ora10
<br />
<br />
第四步，修改设置
<br />
A.设置swap区
<br />
Oracle10g至少需要500M的内存和400M的交换空间，要查看swap区是否足够大小，用 fdisk -l 命令去查，如果小于400M的空间，那么就要增加swap的大小
<br />
重设交换分区可以使用如下操作:
<br />
<br />
dd if=/dev/zero of=tmp_swap bs=1k count=900000
<br />
chmod 600 tmp_swap
<br />
mkswap tmp_swap
<br />
swapon tmp_swap
<br />
完成安装以后,可以释放这个空间:
<br />
swapoff tmp_swap
<br />
rm tmp_swap
<br />
count 值是根据你需要调整的交换分区大小而定。
<br />
<br />
B.修改 sysctl.conf
<br />
添加如下的行到/etc/sysctl.conf 中:
<br />
kernel.shmmax = 3147483648
<br />
kernel.shmmni = 4096
<br />
kernel.shmall = 2097152
<br />
kernel.sem    = 250 32000 100 128
<br />
fs.file-max = 65536
<br />
net.ipv4.ip_local_port_range = 1024 65000
<br />
<br />
C.修改 limits.conf
<br />
添加如下的行到/etc/security/limits.conf中：
<br />
<br />
*    soft    nproc    2407
<br />
*    hard    nproc    16384
<br />
*    soft    nofile   1024
<br />
*    hard    nofile   65536
<br />
<br />
D.让修改生效
<br />
修改了以上文件后,必须让其生效,或重启系统,或切换到 root 用户下用以下的方式改变内核运行参数:
<br />
sysctl -p
<br />
<br />
E.产生相应的软连接
<br />
创建一个文件如 kk，内容如下：
<br />
<br />
#!/bin/bash
<br />
ln -s /usr/bin/awk /bin/awk
<br />
ln -s /usr/bin/rpm /bin/rpm
<br />
ln -s /usr/bin/basename /bin/basename
<br />
mkdir /etc/rc.d
<br />
ln -s /etc/rc0.d /etc/rc.d/rc0.d
<br />
ln -s /etc/rc2.d /etc/rc.d/rc2.d
<br />
ln -s /etc/rc3.d /etc/rc.d/rc3.d
<br />
ln -s /etc/rc4.d /etc/rc.d/rc4.d
<br />
ln -s /etc/rc5.d /etc/rc.d/rc5.d
<br />
ln -s /etc/rc6.d /etc/rc.d/rc6.d
<br />
ln -s /etc/init.d /etc/rc.d/init.d
<br />
<br />
<br />
创建后，切换到 root 用户去执行一下。
<br />
<br />
F.创建RedHat的版本声明文件
<br />
在/etc/redhat-release中添加以下语句，以使安装程序认为正在一个RedHat的系统上安装：
<br />
<br />
Red Hat Linux release 3.1 (drupal)
<br />
<br />
G.修改环境变量
<br />
编辑 /home/oracle/.bashrc，增加以下export 的内容。
<br />
(注意，在Ubnutu 7.04中用户的profile文件已改名为~/.profile，有很多安装教程都是用 ~/.bash_profile，在7.04中不行的)
<br />
<br />
export ORACLE_HOME=/opt/ora10
<br />
export ORACLE_OWNER=oracle
<br />
export ORACLE_SID=ora1
<br />
export ORACLE_TERM=xterm
<br />
export PATH=$ORACLE_HOME/bin:$ORACLE_HOME/Apache/Apache/bin:$PATH
<br />
<br />
第五步，开始安装
<br />
注销原来的用户，改用oracle用户登录。用env查看一下环境变量是否生效。
<br />
然后进行/ora_ins_disk中进行安装
<br />
<br />
cd/ora_ins_disk
<br />
./runInstaller
<br />
<br />
在安装过程中，请使用 Advanced Installation，然后一路按默认的设置进行往下设置，到窗单名为 &#8220;Specify Database Configuration Options&#8221;的时候，要修改以下设置：
<br />
Database Character Set 中选择 Simplified Chinese ZHS16GBK
<br />
在安装的后期，系统提示需要用 root
用户去运行两个脚本文件orainstRoot.sh和root.sh，安装完毕后，Oracle是正常启动着的，你可以试一下连接数据库，同时也可以使
用浏览器去设置一下Oracle，（url:http: //localhost:1158/em/）（Oracle
10g与之前的版本都不一样，使用WEB页的企业管理器来代替以前的C/S版JAVA企业管理器）
<br />
<br />
第六步，设置自启动
<br />
<br />
创建自启动脚本
<br />
创建 oracledb 脚本到/etc/init.d/oracledb,内容如下
<br />
<br />
#!/bin/bash
<br />
#
<br />
# /etc/init.d/oracledb
<br />
#
<br />
# Run-level Startup script for the Oracle Instance, Listener, and
<br />
# Web Interface
<br />
<br />
export ORACLE_HOME=/opt/ora10
<br />
export ORACLE_SID=ora1
<br />
export PATH=$ORACLE_HOME/bin:$ORACLE_HOME/Apache/Apache/bin:$PATH
<br />
<br />
ORA_OWNR="oracle"
<br />
# if the executables do not exist -- display error
<br />
if [ ! -f $ORACLE_HOME/bin/dbstart -o ! -d $ORACLE_HOME ]
<br />
then
<br />
echo "Oracle startup: cannot start"
<br />
exit 1
<br />
fi
<br />
# depending on parameter -- startup, shutdown, restart
<br />
# of the instance and listener or usage display
<br />
case "$1" in
<br />
start)
<br />
# Oracle listener and instance startup
<br />
echo -n "Starting Oracle: "
<br />
su $ORA_OWNR -c "$ORACLE_HOME/bin/lsnrctl start"
<br />
su $ORA_OWNR -c "$ORACLE_HOME/bin/dbstart"
<br />
touch /var/lock/oracle
<br />
su $ORA_OWNR -c "$ORACLE_HOME/bin/emctl start dbconsole"
<br />
echo "OK"
<br />
;;
<br />
stop)
<br />
# Oracle listener and instance shutdown
<br />
echo -n "Shutdown Oracle: "
<br />
su $ORA_OWNR -c "$ORACLE_HOME/bin/lsnrctl stop"
<br />
su $ORA_OWNR -c "$ORACLE_HOME/bin/dbshut"
<br />
rm -f /var/lock/oracle
<br />
su $ORA_OWNR -c "$ORACLE_HOME/bin/emctl stop dbconsole"
<br />
echo "OK"
<br />
;;
<br />
reload|restart)
<br />
$0 stop
<br />
$0 start
<br />
;;
<br />
*)
<br />
echo "Usage: `basename $0` start|stop|restart|reload"
<br />
exit 1
<br />
esac
<br />
exit 0
<br />
<br />
设置权限,放到启动脚本中去
<br />
chmod 755 /etc/init.d/oracledb
<br />
update-rc.d oracledb defaults 99
<br />
我的 oralce 的安装盘中可能有些问题，所以如果只用上述的脚本是不能启动 listener的，要修改一下：
<br />
修改 /opt/ora10/bin/dbstart文件
<br />
查找：
<br />
# Set this to bring up Oracle Net Listener
<br />
ORACLE_HOME_LISTNER=/ade/vikrkuma_new/oracle
<br />
将其改为：
<br />
# Set this to bring up Oracle Net Listener
<br />
ORACLE_HOME_LISTNER=$ORACLE_HOME
<br />
<br />
设置后，测试一下
<br />
<br />
/etc/init.d/./oracledb reload
<br />
<br />
如果一切正常的话，会关闭一次Oracle又再重新打开。
<br />
<br />
至此就安装完毕，但这里有个小问题一直未能解决：
<br />
如果我用中文WinXP的IE去登录管理那台Oracle服务器的话，页面中的文字会随之变为中文（在英文的浏览器下，会看到是纯英文的页面），
但会有部份的字会变成&#8220;口口&#8221;字符，不知如何解决。我觉得这应该是Java问题，因为之前用tomcat写 jsp 的时候，如果character
encoding没写好的话，也会出现这样的问题，但在Oracle中我还不知如何解决。</span><br />
<br />
上一次由flexitime于2007-10-24 周三, 17:43修改，总共修改了1次<br />
<br />
<span>写的好，我这几天也正好搞这个，关于这个中文的问题，我已经解决了，就是你可以不使用Oracle自带的
JDK，而是可以使用自己安装的JDK，我就是用的自己安装的，至于如何设置JAVA中文，你可以看下http:
//forum.ubuntu.org.cn/viewtopic.php?t=71848这篇帖子，设置好JAVA中文环境之后，你就可以将
Oracle中的JDK删掉，然后做一个符号连接，连接到你自己的JDK上就好了。呵呵。我也是先用命令行创建用户和组，但是创建出来之后，没有
oracle的目录，所以就使用系统管理中的创建，然后就没什么问题了。我还没有设置自启动，看了你的文章可以试一试。</span><br />
<br />
来自：http://forum.ubuntu.org.cn/viewtopic.php?p=481122<br />
<img src ="http://www.blogjava.net/waterjava/aggbug/157871.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/waterjava/" target="_blank">狼爱上狸</a> 2007-11-03 08:24 <a href="http://www.blogjava.net/waterjava/archive/2007/11/03/157871.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Install Oracle 10g Express Edition on Debian</title><link>http://www.blogjava.net/waterjava/archive/2007/09/24/147874.html</link><dc:creator>狼爱上狸</dc:creator><author>狼爱上狸</author><pubDate>Mon, 24 Sep 2007 11:03:00 GMT</pubDate><guid>http://www.blogjava.net/waterjava/archive/2007/09/24/147874.html</guid><wfw:comment>http://www.blogjava.net/waterjava/comments/147874.html</wfw:comment><comments>http://www.blogjava.net/waterjava/archive/2007/09/24/147874.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/waterjava/comments/commentRss/147874.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/waterjava/services/trackbacks/147874.html</trackback:ping><description><![CDATA[<p>Oracle Database Express Edition Installation Guide
</p>
<p>10g Release 2 (10.2) for Linux
</p>
<p><a href="http://download.huihoo.com/database/oracle/" class="external free" title="http://download.huihoo.com/database/oracle/" rel="nofollow">http://download.huihoo.com/database/oracle/</a>
</p>
<p>下载 Oracle Database 10g Express Edition for Linux x86
</p>
<p>- Available for Debian, Mandriva, Novell, Red Hat and Ubuntu
</p>
<p>文件
Oracle Database 10g Express Edition (Universal)
</p>
<p>oracle-xe-universal_10.2.0.1-1.0_i386.deb (262,440,214 bytes) (cksum 3404538446) *Debian package
</p>
<p>安装
debian:/home/huihoo/database/oracle# dpkg -i oracle-xe-universal_10.2.0.1-1.0_i3 86.deb
</p>
<p>(Reading database ... 76128 files and directories currently installed.)
</p>
<p>Unpacking oracle-xe-universal (from oracle-xe-universal_10.2.0.1-1.0_i386.deb) . ..
</p>
<p>This system does not meet the minimum requirements for swap space. Based on
</p>
<p>the amount of physical memory available on the system, Oracle Database 10g
</p>
<p>Express Edition requires 1006 MB of swap space. This system has 818 MB
</p>
<p>of swap space. Configure more swap space on the system and retry the installati on.
</p>
<p>dpkg: error processing oracle-xe-universal_10.2.0.1-1.0_i386.deb (--install):
</p>
<p>subprocess pre-installation script returned error exit status 1
</p>
<p>Errors were encountered while processing:
</p>
<p>oracle-xe-universal_10.2.0.1-1.0_i386.deb
</p>
<p>Create 1GB swap file if needed.
</p>
<p>dd if=/dev/zero of=/tmp/tmpswap bs=1k count=1024000
</p>
<pre>chmod 600 /tmp/tmpswap<br />
</pre>
<pre>/sbin/mkswap /tmp/tmpswap<br />
</pre>
<p>su
</p>
<pre># /sbin/swapon -v /tmp/tmpswap<br />
</pre>
<p>若要卸出,可运行
</p>
<pre>swapoff /tmp/tmpswap<br />
rm /tmp/tmpswap<br />
</pre>
<p>再次安装
</p>
<p>debian:/home/huihoo/database/oracle# dpkg -i oracle-xe-universal_10.2.0.1-1.0_i3 86.deb
</p>
<p>dpkg: dependency problems prevent configuration of oracle-xe-universal:
</p>
<p>oracle-xe-universal depends on libaio (&gt;= 0.3.96) | libaio1 (&gt;= 0.3.96); however:
</p>
<p>Package libaio is not installed.
</p>
<p>Package libaio1 is not installed.
</p>
<p>dpkg: error processing oracle-xe-universal (--install):
</p>
<p>dependency problems - leaving unconfigured
</p>
<p>Errors were encountered while processing:
</p>
<p>oracle-xe-universal
</p>
<p>安装 package libaio libaio1
</p>
<pre>从 <a href="http://packages.debian.org/unstable/libs/libaio" class="external free" title="http://packages.debian.org/unstable/libs/libaio" rel="nofollow">http://packages.debian.org/unstable/libs/libaio</a> 获得libaio debian package<br />
如: <a href="http://ftp.hk.debian.org/debian/pool/main/liba/libaio/libaio_0.3.104-1_i386.deb" class="external free" title="http://ftp.hk.debian.org/debian/pool/main/liba/libaio/libaio_0.3.104-1_i386.deb" rel="nofollow">http://ftp.hk.debian.org/debian/pool/main/liba/libaio/libaio_0.3.104-1_i386.deb</a>
</pre>
<pre># dpkg -i libaio_0.3.104-1_i386.deb<br />
</pre>
<p>接着
</p>
<pre># dpkg -i oracle-xe-universal_10.2.0.1-1.0_i3 86.deb<br />
</pre>
<pre># /etc/init.d/oracle-xe configure<br />
</pre>
<ul>
    <li> A valid HTTP port for the Oracle Database XE graphical user interface (the default is 8080)
    </li>
    <li> A valid port for the Oracle database listener (the default is 1521)
    </li>
    <li> A password for the SYS and SYSTEM administrative user accounts
    </li>
    <li> Whether you want the database to start automatically when the computer starts
    </li>
</ul>
<p>If you enter Yes, then the database starts immediately
</p>
<p>To start the database manually, run this command:
</p>
<pre>$ /etc/init.d/oracle-xe start<br />
</pre>
<p>To stop the database manually, use the following command:
</p>
<pre>$ /etc/init.d/oracle-xe stop<br />
</pre>
<p>这时可看见后台启动了很多oracle 进程
</p>
<pre>oracle 7357 0.0 1.8 224664 9664&nbsp;? Ss 06:25 0:00 xe_pmon_XE<br />
oracle 7359 0.0 1.6 224048 8300&nbsp;? Ss 06:25 0:00 xe_psp0_XE<br />
oracle 7361 0.0 4.4 224048 23084&nbsp;? Ss 06:25 0:00 xe_mman_XE<br />
oracle 7363 0.0 2.1 226116 11248&nbsp;? Ss 06:25 0:00 xe_dbw0_XE<br />
oracle 7365 0.0 2.4 239608 12508&nbsp;? Ss 06:25 0:00 xe_lgwr_XE<br />
oracle 7367 0.0 2.6 224108 13764&nbsp;? Ss 06:25 0:00 xe_ckpt_XE<br />
oracle 7369 0.0 8.1 224648 42268&nbsp;? Ss 06:25 0:00 xe_smon_XE<br />
oracle 7371 0.0 2.6 224108 13896&nbsp;? Ss 06:25 0:00 xe_reco_XE<br />
oracle 7373 0.0 4.1 225716 21332&nbsp;? Ss 06:25 0:00 xe_cjq0_XE<br />
oracle 7375 0.0 7.9 226864 40820&nbsp;? Ss 06:25 0:00 xe_mmon_XE<br />
oracle 7377 0.0 2.0 224052 10560&nbsp;? Ss 06:25 0:00 xe_mmnl_XE<br />
oracle 7379 0.0 1.6 224712 8280&nbsp;? Ss 06:25 0:00 xe_d000_XE<br />
oracle 7381 0.0 1.5 224668 8036&nbsp;? Ss 06:25 0:00 xe_s000_XE<br />
oracle 7383 0.0 1.5 224668 8040&nbsp;? Ss 06:25 0:00 xe_s001_XE<br />
oracle 7385 0.0 1.5 224668 8044&nbsp;? Ss 06:25 0:00 xe_s002_XE<br />
oracle 7387 0.0 1.5 224668 8048&nbsp;? Ss 06:25 0:00 xe_s003_XE<br />
oracle 7414 0.0 2.5 224108 13000&nbsp;? Ss 06:25 0:00 xe_qmnc_XE<br />
oracle 7424 0.0 1.7 224076 8784&nbsp;? Ss 06:25 0:00 xe_q000_XE<br />
oracle 7426 0.0 2.0 224076 10596&nbsp;? Ss 06:25 0:00 xe_q001_XE<br />
</pre>
<pre><a href="http://localhost:8080/" class="external free" title="http://localhost:8080/" rel="nofollow">http://localhost:8080/</a><br />
<a href="http://localhost:8080/apex" class="external free" title="http://localhost:8080/apex" rel="nofollow">http://localhost:8080/apex</a>
</pre>
<p>设置环境变量
</p>
<pre>#cd /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/bin<br />
# source oracle_env.csh (for C or tcsh shell)<br />
</pre>
<p>或
</p>
<pre># ./oracle_env.sh (for Bourne, Bash, or Korn shell)<br />
</pre>
<p>Making Oracle Database XE Server Available to Remote Clients
</p>
<p>1 Click the Application menu (on Gnome) or the K menu (on KDE),
then point to Oracle Database 10g Express Edition, and then Go To
Database Home Page.
</p>
<p>2 In the Database Login page, log in as SYSTEM, enter the password, and then click Login.
</p>
<p>3 In the Oracle Database XE home page, click Administration.
</p>
<p>4 Under Tasks, click Manage HTTP Access.
</p>
<p>5 Under Manage HTTP Access, select Available from local server and remove clients.
</p>
<p>6 Click Apply Changes.
</p>
<pre>export ORACLE_HOME=/usr/lib/oracle/xe/app/oracle/product/10.2.0/server<br />
</pre>
<pre>bin/sqlplus system<br />
Enter password:<br />
</pre>
<p>ERROR:
ORA-12162: TNS:net service name is incorrectly specified
</p>
<p>./sqlplus system@localhost
</p>
<div style="float: right; margin-left: 5px;">[<a href="http://wiki.huihoo.com/index.php?title=Install_Oracle_10g_Express_Edition_on_Debian&amp;action=edit&amp;section=1" title="Edit section: 参考资料">编辑</a>]</div>
<h2>参考资料</h2>
<ul>
    <li>Getting Started Guide - <a href="http://download-west.oracle.com/docs/cd/B25329_01/doc/admin.102/b25610/toc.htm" class="external free" title="http://download-west.oracle.com/docs/cd/B25329_01/doc/admin.102/b25610/toc.htm" rel="nofollow">http://download-west.oracle.com/docs/cd/B25329_01/doc/admin.102/b25610/toc.htm</a>
    </li>
    <li>Oracle Database Express Edition 10g Release 2 (10.2) - <a href="http://www.oracle.com/technology/xe/documentation" class="external free" title="http://www.oracle.com/technology/xe/documentation" rel="nofollow">http://www.oracle.com/technology/xe/documentation</a></li>
</ul>
来源：http://wiki.huihoo.com/index.php?title=Install_Oracle_10g_Express_Edition_on_Debian<br />
<img src ="http://www.blogjava.net/waterjava/aggbug/147874.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/waterjava/" target="_blank">狼爱上狸</a> 2007-09-24 19:03 <a href="http://www.blogjava.net/waterjava/archive/2007/09/24/147874.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>oracle10g_linux_install_config</title><link>http://www.blogjava.net/waterjava/archive/2007/07/10/129183.html</link><dc:creator>狼爱上狸</dc:creator><author>狼爱上狸</author><pubDate>Mon, 09 Jul 2007 23:00:00 GMT</pubDate><guid>http://www.blogjava.net/waterjava/archive/2007/07/10/129183.html</guid><wfw:comment>http://www.blogjava.net/waterjava/comments/129183.html</wfw:comment><comments>http://www.blogjava.net/waterjava/archive/2007/07/10/129183.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/waterjava/comments/commentRss/129183.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/waterjava/services/trackbacks/129183.html</trackback:ping><description><![CDATA[<div>/usr/sbin/groupadd oinstall<br>/usr/sbin/groupadd dba</div>
<div>/usr/sbin/useradd -g oinstall -G dba oracle<br>passwd oracle</div>
<div>mkdir /opt/oracle <br>mkdir /opt/oracle/product <br>mkdir /opt/oracle/product/10.1.0 <br>chown -R oracle.oinstall /opt/oracle</div>
<div>mkdir /opt/oracle/oradata<br>chown -R oracle.oinstall /opt/oracle/oradata</div>
<div>mkdir /var/opt/oracle <br>chown oracle.dba /var/opt/oracle <br>chmod 755 /var/opt/oracle</div>
<div>vi /etc/sysctl.conf<br>kernel.shmall = 2097152 <br>kernel.shmmax = 2147483648 <br>kernel.shmmni = 4096 <br>kernel.sem = 250 32000 100 128 <br>fs.file-max = 65536 <br>net.ipv4.ip_local_port_range = 1024 65000</div>
<div><br>vi /etc/security/limits.conf <br>* soft nproc 2047<br>* hard nproc 16384<br>* soft nofile 1024<br>* hard nofile 65536</div>
<div><br>vi /etc/profile<br>if [ $USER = "oracle" ]; then<br>if [ $SHELL = "/bin/ksh" ]; then<br>ulimit -p 16384<br>ulimit -n 65536<br>else<br>ulimit -u 16384 -n 65536<br>fi<br>fi </div>
<div><br>vi .bach_profile <br>export ORACLE_BASE=/opt/oracle<br>export ORACLE_HOME=/opt/oracle/product/10.1.0<br>export PATH=$ORACLE_HOME/bin:$ORACLE_HOME/Apache/Apache/bin:$PATH<br>export ORACLE_OWNER=oracle<br>export ORACLE_SID=URPDB<br>export ORACLE_TERM=vt100<br>export LD_ASSUME_KERNEL=2.4.1<br>export THREADS_FLAG=native<br>LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib <br>LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib <br>export LD_LIBRARY_PATH<br>export PATH=$PATH:$ORACLE_HOME/bin <br>export NLS_LANG=AMERICAN_AMERICA.UTF8<br>export LANG=en_US<br>export ORA_NLS33=$ORACLE_HOME/ocommon/nls/admin/data<br>CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib <br>CLASSPATH=$CLASSPATH:$ORACLE_HOME/network/jlib <br>export CLASSPATH</div>
<div>确认并是修改生效<br>$ source .bash_profile</div>
<br>来自：http://www.cngr.cn/article/63/390/2006/2006071919228.shtml<br><br><img src ="http://www.blogjava.net/waterjava/aggbug/129183.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/waterjava/" target="_blank">狼爱上狸</a> 2007-07-10 07:00 <a href="http://www.blogjava.net/waterjava/archive/2007/07/10/129183.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>oracle9i for linux安装</title><link>http://www.blogjava.net/waterjava/archive/2007/07/10/129182.html</link><dc:creator>狼爱上狸</dc:creator><author>狼爱上狸</author><pubDate>Mon, 09 Jul 2007 22:58:00 GMT</pubDate><guid>http://www.blogjava.net/waterjava/archive/2007/07/10/129182.html</guid><wfw:comment>http://www.blogjava.net/waterjava/comments/129182.html</wfw:comment><comments>http://www.blogjava.net/waterjava/archive/2007/07/10/129182.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/waterjava/comments/commentRss/129182.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/waterjava/services/trackbacks/129182.html</trackback:ping><description><![CDATA[1.硬件标准最低要求(指不警告的)<br>物理内存: 1G<br>交换空间: 1.5 GB或者2倍内存大小<br>/tmp 空间: 1 G<br>软件所需空间: 3 GB<br>数据库文件: 1.5 GB<br><br>2.linux参数标准最低要求(指不警告的)<br>#注释:#表示使用root用户操作,$表示使用oracle 用户进行操作<br><br>2.1 核心参数配置<br>#vi /etc/sysctl.conf<br>加入以下内容:<br>kernel.shmall = 2097152<br>kernel.shmmax = 2147483648 <br>kernel.shmmni = 4096<br>kernel.sem = 250 32000 100 128<br>fs.file-max = 65536 <br>net.ipv4.ip_local_port_range = 1024 65000<br>net.core.rmem_default = 262144<br>net.core.rmem_max = 262144<br>net.core.wmem_default = 262144<br>net.core.wmem_max = 262144<br><br>编辑完之后,保存,执行<br># /sbin/sysctl -p<br>然后,应该检查一下上面的操作是否正确:<br># /sbin/sysctl -a | grep sem <br># /sbin/sysctl -a | grep shm <br># /sbin/sysctl -a | grep file-max <br># /sbin/sysctl -a | grep ip_local_port_range<br><br>2.2 为Oracle用户设定Shell的限制<br># vi /etc/security/limits.conf<br># 添加如下的行<br>* soft nproc 2047<br>* hard nproc 16384<br>* soft nofile 1024<br>* hard nofile 65536<br>添加如下的行到/etc/pam.d/login 文件：<br>session required /lib/security/pam_limits.so<br>编辑 /etc/profile 文件,添加如下部分：<br>if [ $USER = "oracle" ]; then<br>if [ $SHELL = "/bin/ksh" ]; then<br>ulimit -p 16384<br>ulimit -n 65536<br>else<br>ulimit -u 16384 -n 65536<br>fi<br>fi<br><br>2.3 此外，最好验证一下 gcc和glibc的版本(要求是gcc-3.2.3-2 或者更高)<br>#gcc -v<br><br>2.4 创建用户和相关的组<br># /usr/sbin/groupadd oinstall<br># /usr/sbin/groupadd dba<br># /usr/sbin/useradd -g oinstall -G dba oracle<br>如果只是测试目的的话，不创建oinstall组也没什么. 不过还是规范一点比较好.如果oracle 用户和dba组等已经存在，作适当的调整即可.<br><br>2.5 检查并调整环境变量<br>登录为oracle用户<br># su &#8211; oracle <br>$ vi .bash_profile<br>#添加如下内容,你的具体值应该不会和这个完全相同.<br>export ORACLE_BASE=/opt/oracle<br>export ORACLE_HOME=$ORACLE_BASE/product/10.2.0/db_1 <br>export ORACLE_SID=orcl<br>export PATH=$PATH:$HOME/bin:$ORACLE_HOME/bin<br>export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/usr/lib<br>export LC_CTYPE=zh_CN.UTF-8<br>然后执行<br>$ source .bash_profile<br>使环境变量生效/opt/oracle 等目录应该建立好并做合适的授权<br>#chown -R oracle /opt/oracle<br><br>3 开始安装10g<br>执行 /install/runInstaller<br>按照界面提示安装即可<br>最好按照高级安装<br>高级安装的好处:<br>a.字符设为utf-8(默认是iso-8859-1);<br>b.检查配置;<br>c.设定系统用户(默认是关闭的)<br>等等...<br><br>4 运行oracle10g<br><br>启动监听: lsnrctl start<br>关闭监听: lsnrctl stop<br><br>进入sql命令环境<br>sqlplus<br>/as sysdba<br><br>启动 startup<br>关闭 shutdown immediate<br><br>来自：http://fsz521job.itpub.net/post/5606/68404<br>
<br><img src ="http://www.blogjava.net/waterjava/aggbug/129182.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/waterjava/" target="_blank">狼爱上狸</a> 2007-07-10 06:58 <a href="http://www.blogjava.net/waterjava/archive/2007/07/10/129182.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item></channel></rss>