??xml version="1.0" encoding="utf-8" standalone="yes"?>九色视频在线播放,亚洲第一精品在线,日韩视频免费直播http://www.aygfsteel.com/waterjava/category/9753.html我胡汉山又回来了!zh-cnFri, 02 May 2008 21:58:52 GMTFri, 02 May 2008 21:58:52 GMT60dbstart&dbshut脚本中的错误http://www.aygfsteel.com/waterjava/archive/2008/05/02/197758.html狼爱上狸狼爱上狸Fri, 02 May 2008 09:30:00 GMThttp://www.aygfsteel.com/waterjava/archive/2008/05/02/197758.htmlhttp://www.aygfsteel.com/waterjava/comments/197758.htmlhttp://www.aygfsteel.com/waterjava/archive/2008/05/02/197758.html#Feedback0http://www.aygfsteel.com/waterjava/comments/commentRss/197758.htmlhttp://www.aygfsteel.com/waterjava/services/trackbacks/197758.htmlOracle提供了两个脚本dbstart和dbshut用来启动和关闭数据库.
q两个脚本首先读取oratab(/etc/oratab)文g来决定哪个数据库是需要自动启动和关闭,然后启动和关闭那些数据库,
oratab文g通过root.sh创徏.

[oracle@chicago oracle]$ cat /etc/oratab
#

# This file is used by ORACLE utilities. It is created by root.sh
# and updated by the Database Configuration Assistant when creating
# a database.

# A colon, ':', is used as the field terminator. A new line terminates
# the entry. Lines beginning with a pound sign, '#', are comments.
#
# Entries are of the form:
# $ORACLE_SID:$ORACLE_HOME:<N|Y>:
#
# The first and second fields are the system identifier and home
# directory of the database respectively. The third filed indicates
# to the dbstart utility that the database should , "Y", or should not,
# "N", be brought up at system boot time.
#
# Multiple entries with the same $ORACLE_SID are not allowed.
#
#
orcl:/u01/app/oracle/oracle/product/10.2.0/db_1:Y

不过,dbstart/dbshut脚本中都包含有错?
需要修改ORACLE_HOME_LISTNER=$ORACLE_HOME
[oracle@chicago oracle]$ dbstart
ORACLE_HOME_LISTNER is not SET, unable to auto-start Oracle Net Listener
Usage: /u01/app/oracle/oracle/product/10.2.0/db_1/bin/dbstart ORACLE_HOME

[oracle@chicago oracle]$ vi $ORACLE_HOME/bin/dbstart

:
#
# $Id: dbstart.sh.pp 25-may-2005.14:52:00 vikrkuma Exp $
# Copyright (c) 1991, 2005, Oracle. All rights reserved.
#

###################################
#
# usage: dbstart $ORACLE_HOME
#
# This script is used to start ORACLE from /etc/rc(.local).
# It should ONLY be executed as part of the system boot procedure.
#
# This script will start all databases listed in the oratab file
# whose third field is a "Y". If the third field is set to "Y" and
# there is no ORACLE_SID for an entry (the first field is a *),
# then this script will ignore that entry.
#
# This script requires that ASM ORACLE_SID's start with a +, and
# that non-ASM instance ORACLE_SID's do not start with a +.
#
# If ASM instances are to be started with this script, it cannot
# be used inside an rc*.d directory, and should be invoked from
# rc.local only. Otherwise, the CSS service may not be available
# yet, and this script will block init from completing the boot
# cycle.
#
# If you want dbstart to auto-start a single-instance database that uses
# an ASM server that is auto-started by CRS (this is the default behavior
# for an ASM cluster), you must change the database's ORATAB entry to use
# a third field of "W" and the ASM's ORATAB entry to use a third field of "N".
# These values specify that dbstart auto-starts the database only after
# the ASM instance is up and running.
#
# Note:
# Use ORACLE_TRACE=T for tracing this script.
#
# The progress log for each instance bringup plus Error and Warning message[s]
# are logged in file $ORACLE_HOME/startup.log. The error messages related to
# instance bringup are also logged to syslog (system log module).
# The Listener log is located at $ORACLE_HOME_LISTNER/listener.log
#
# To configure:
# 1) Set ORATAB:
# On Solaris
# ORATAB=/var/opt/oracle/oratab
# All other UNIX platforms
# ORATAB=/etc/oratab
#
# 2) Update $ORATAB/oratab with Database Instances that need to be started up.
# Entries are of the form:
# $ORACLE_SID:$ORACLE_HOME:<N|Y|W>:
# An example entry:
# main:/usr/lib/oracle/emagent_10g:Y
#
# Overall algorithm:
# 1) Bring up all ASM instances with 'Y' entry in status field in oratab entry
# 2) Bring up all Database instances with 'Y' entry in status field in
# oratab entry
# 3) If there are Database instances with 'W' entry in status field
# then
# iterate over all ASM instances (irrespective of 'Y' or 'N') AND
# wait for all of them to be started
# fi
# 4) Bring up all Database instances with 'W' entry in status field in
# oratab entry
#
#####################################

LOGMSG="logger -puser.alert -s "

trap 'exit' 1 2 3

# for script tracing
case $ORACLE_TRACE in
T) set -x ;;
esac

# Set path if path not set (if called from /etc/rc)
case $PATH in
"") PATH=/bin:/usr/bin:/etc
export PATH ;;
esac
# Save LD_LIBRARY_PATH
SAVE_LLP=$LD_LIBRARY_PATH

# First argument is used to bring up Oracle Net Listener
ORACLE_HOME_LISTNER=$ORACLE_HOME
if [ ! $ORACLE_HOME_LISTNER ] ; then
echo "ORACLE_HOME_LISTNER is not SET, unable to auto-start Oracle Net Listener"
echo "Usage: $0 ORACLE_HOME"
else
LOG=$ORACLE_HOME_LISTNER/listener.log

# Start Oracle Net Listener
if [ -x $ORACLE_HOME_LISTNER/bin/tnslsnr ] ; then
echo "$0: Starting Oracle Net Listener" >> $LOG 2>&1
"/u01/app/oracle/oracle/product/10.2.0/db_1/bin/dbstart" 461L, 13926C written
[oracle@chicago oracle]$ dbstart
Processing Database instance "orcl": log file /u01/app/oracle/oracle/product/10.2.0/db_1/startup.log
[oracle@chicago oracle]$ dbshut
ORACLE_HOME_LISTNER is not SET, unable to auto-stop Oracle Net Listener
Usage: /u01/app/oracle/oracle/product/10.2.0/db_1/bin/dbshut ORACLE_HOME
Processing Database instance "orcl": log file /u01/app/oracle/oracle/product/10.2.0/db_1/shutdown.log
[oracle@chicago oracle]$ vi $ORACLE_HOME/bin/dbshut

:
#
# $Id: dbshut.sh.pp 11-may-2005.19:37:00 vikrkuma Exp $
# Copyright (c) 1991, 2005, Oracle. All rights reserved.
#

###################################
#
# usage: dbshut $ORACLE_HOME
#
# This script is used to shutdown ORACLE from /etc/rc(.local).
# It should ONLY be executed as part of the system boot procedure.
#
# This script will shutdown all databases listed in the oratab file
# whose third field is a "Y" or "W". If the third field is set to "Y" and
# there is no ORACLE_SID for an entry (the first field is a *),
# then this script will ignore that entry.
#
# This script requires that ASM ORACLE_SID's start with a +, and
# that non-ASM instance ORACLE_SID's do not start with a +.
#
# Note:
# Use ORACLE_TRACE=T for tracing this script.
# Oracle Net Listener is also shutdown using this script.
#
# The progress log for each instance shutdown is logged in file
# $ORACLE_HOME/shutdown.log.
#
# To configure:
# 1) Set ORATAB:
# On Solaris
# ORATAB=/var/opt/oracle/oratab
# All other UNIX platforms
# ORATAB=/etc/oratab
#
# 2) Update $ORATAB/oratab with Database Instances that need to be shutdown.
# Entries are of the form:
# $ORACLE_SID:$ORACLE_HOME:<N|Y>:
# An example entry:
# main:/usr/lib/oracle/emagent_10g:Y
#
# Note:
# Use ORACLE_TRACE=T for tracing this script.
# Oracle Net Listener is NOT shutdown using this script.
#
# The progress log for each instance shutdown is logged in file
# $ORACLE_HOME/shutdown.log.
#
# To configure:
# 1) Set ORATAB:
# On Solaris
# ORATAB=/var/opt/oracle/oratab
# All other UNIX platforms
# ORATAB=/etc/oratab
#
# 2) Update $ORATAB/oratab with Database Instances that need to be shutdown.
# Entries are of the form:
# $ORACLE_SID:$ORACLE_HOME:<N|Y>:
# An example entry:
# main:/usr/lib/oracle/emagent_10g:Y
#
#####################################

trap 'exit' 1 2 3
case $ORACLE_TRACE in
T) set -x ;;
esac
# Set path if path not set (if called from /etc/rc)
case $PATH in
"") PATH=/bin:/usr/bin:/etc
export PATH ;;
esac
# Save LD_LIBRARY_PATH
SAVE_LLP=$LD_LIBRARY_PATH

# The this to bring down Oracle Net Listener
ORACLE_HOME_LISTNER=$ORACLE_HOME
if [ ! $ORACLE_HOME_LISTNER ] ; then
echo "ORACLE_HOME_LISTNER is not SET, unable to auto-stop Oracle Net Listener"
echo "Usage: $0 ORACLE_HOME"
else
LOG=$ORACLE_HOME_LISTNER/listener.log

# Stop Oracle Net Listener
if [ -f $ORACLE_HOME_LISTNER/bin/tnslsnr ] ; then
"/u01/app/oracle/oracle/product/10.2.0/db_1/bin/dbshut" 246L, 6592C written
[oracle@chicago oracle]$ dbstart
Processing Database instance "orcl": log file /u01/app/oracle/oracle/product/10.2.0/db_1/startup.log
[oracle@chicago oracle]$ dbshut
Processing Database instance "orcl": log file /u01/app/oracle/oracle/product/10.2.0/db_1/shutdown.log
[oracle@chicago oracle]$

来自Qhttp://benbo.itpub.net/post/26034/311306

狼爱上狸 2008-05-02 17:30 发表评论
]]>
Installing Oracle 11g on Ubuntu Linux 7.04http://www.aygfsteel.com/waterjava/archive/2008/04/27/196628.html狼爱上狸狼爱上狸Sun, 27 Apr 2008 12:55:00 GMThttp://www.aygfsteel.com/waterjava/archive/2008/04/27/196628.htmlhttp://www.aygfsteel.com/waterjava/comments/196628.htmlhttp://www.aygfsteel.com/waterjava/archive/2008/04/27/196628.html#Feedback0http://www.aygfsteel.com/waterjava/comments/commentRss/196628.htmlhttp://www.aygfsteel.com/waterjava/services/trackbacks/196628.htmlI come from a MySQL background, and I have been given the challenge of learning Oracle. I can’t just play around with our customers’ databases, but I remembered that Paul Vallée said that there is nothing wrong with learning on company time. So I decided to install my own Oracle database, which I’ll be free to destroy in every way I can think of… 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’s take one step at a time, shall we?

Now, onto Oracle 11g (beta 5) on Ubuntu 7.04 (Feisty Fawn). One little issue is that Ubuntu is unsupported by Oracle. So, through this text, we will trick the Oracle installer into thinking it’s actually running on a Red Hat box.

Step Zero

This tutorial was based on a document which can be found here. I have adapted it for Oracle 11g.

Get a copy of Ubuntu 7.04 and install on a machine. I’m using the 32-bit version here (as well as for Oracle). Next, make sure your system is up-to-date. A simple apt-get update followed by a apt-get upgrade will do the trick, although you may prefer using the GUI Synaptic Package Manager ?it’s entirely up to you what method you choose. However, I much prefer to use the command line.

As you go through updates, sometimes a reboot will be needed (usually to boot from a newer, recently-updated kernel). Sometimes it’ll just ask you to restart your web browser or some other program as a new version is installed.

It’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.

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’m not sure which is the minimum version required: I used Sun JDK 1.5.

Step One

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’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:

# 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

It’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.

Step Two

Choose where you are going to install your Oracle 11g server and create the ORACLE_BASE directory. This is the place where Oracle will be installed. Make sure there is at least 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.

# mkdir -p /u01/app/oracle

Step Three

Add a few users and change groups to make the installer more comfortable. Remember, we are tricking the installer to think it’s installing on a Red Hat box.

# addgroup oinstall
# addgroup dba
# addgroup nobody
# useradd -g oinstall -G dba -p password -d /home/oracle -s /bin/bash oracle
# usermod -g nobody nobody

The usermod command is needed since because when running, the installer looks for a user called nobody which is part of a group named nobody (in Ubuntu, the user nobody it’s assigned to nogroup by default).

Step Four

Make some symlinks. Apparently, the installer uses absolute paths, so it must find the binaries in the right places.

# ln -s /usr/bin/awk /bin/awk
# ln -s /usr/bin/rpm /bin/rpm
# ln -s /usr/bin/basename /bin/basename

Step Five

We need to mimic the /etc/rc.d directory structure of a Red Hat box. We do this with more symlinks:

# mkdir /etc/rc.d
# ln -s /etc/rc0.d /etc/rc.d/rc0.d
# ln -s /etc/rc2.d /etc/rc.d/rc2.d
# ln -s /etc/rc3.d /etc/rc.d/rc3.d
# ln -s /etc/rc4.d /etc/rc.d/rc4.d
# ln -s /etc/rc5.d /etc/rc.d/rc5.d
# ln -s /etc/rc6.d /etc/rc.d/rc6.d
# ln -s /etc/init.d /etc/rc.d/init.d

Step Six

I’ve created a file called /etc/redhat-release and put only one line on it. The same can be achieved by issuing the following as root:

echo "Red Hat Linux release 4" > /etc/redhat-release

Step Seven

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 /etc/sysctl.conf and it should have these lines on it:

fs.file-max = 65535
kernel.shmall = 2097152
kernel.shmmax = 2147483648
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
net.ipv4.ip_local_port_range = 1024 65000
net.core.rmem_default = 1048576
net.core.rmem_max = 1048576
net.core.wmem_default = 262144
net.core.wmem_max = 262144

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:

# sysctl -p

Now, what do those parameters and values actually mean?

  • fs.file-max sets the maximum number of open files that can be handled by the Linux kernel.
  • kernel.shmall determines the total amount of shared memory to be allocated in pages. In this example, I’ve set it to 8GB, which is way above the amount of memory I can handle in my box, even with swap.
  • kernel.shmmax controls the maximum amount of memory to be allocated for shared memory which in this example is 2GB.
  • kernel.shmmni defines the maximum number of segments system-wide.
  • net.core.rmem_default and net.core.rmem_max define the default and maximum read buffer queue for network operations (1 MB in this example)
  • net.core.wmem_default and net.core.wmem_max define the default and maximum write buffer queue for network operations (256 KB in this example)
  • net.ipv4.ip_local_port_range tells the kernel the port ranges that will be used for outbound connections.
  • kernel.sem has four parameters:
    1. SEMMSL - semaphores per array
    2. SEMMNS - max semaphores system-wide (SEMMNI*SEMMSL)
    3. SEMOPM - max operations per semop call
    4. SEMMNI - max number of semaphore arrays

To check your current semaphores configuration, you can run cat /proc/sys/kernel/sem or ipcs -ls. On my machine, after the modifications on sysctl.conf, these commands output:

# cat /proc/sys/kernel/sem
250 32000 100 128

# ipcs -ls

------ Semaphore Limits --------
max number of arrays = 128
max semaphores per array = 250
max semaphores system wide = 32000
max ops per semop call = 100
semaphore max value = 32767

(I really don’t know if these are enough or too much, but I’ll keep you posted.)

For a better understanding of these kernel-tweaking settings, I’d recommend these resources:

Step Eight

Add these lines to /etc/security/limits.conf, letting the oracle 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’ll get a warning; the hard limits can’t be exceeded in any situation: you’ll get an error. I’m not completely sure, but I think these limits apply to each session/login (and since Oracle doesn’t exactly log in to the machine, my best guess is these limits apply per instance running).

oracle soft nproc 2047
oracle hard nproc 16383
oracle soft nofile 1023
oracle hard nofile 65535

Step Nine

Make sure the limits.conf is being interpreted as the oracle user logs in by adding these lines to /etc/pam.d/login. You will want to make sure that is actually happening, since the defaults are way lower and you may get all sorts of problems.

session required /lib/security/pam_limits.so
session required pam_limits.so

Step Ten

Unpack and prepare the installation.

# cd /path/to/zipfile
# unzip linux_11gR1b5_database.zip

(And wait… wait a bit more… go get a cup of coffee…)

After your second cup of coffee, you should have a multi-gigabyte set of files; this is our installer.

# chown -R oracle:oinstall database
# chown -R oracle:oinstall /u01/app/oracle

Step Eleven

Fire up the installer as the oracle user itself. This is what you will probably see on the output window:

# su - oracle
$ cd /path/to/extracted/zip/file
$ ./runInstaller
Starting Oracle Universal Installer...

Checking Temp space: must be greater than 80 MB. Actual 58633 MB Passed
Checking swap space: must be greater than 150 MB. Actual 2900 MB Passed
Checking monitor: must be configured to display at least 256 colors. Actual 16777216 Passed
Preparing to launch Oracle Universal Installer from /tmp/OraInstall2007-07-11_04-38-56PM. Please wait ...
Oracle Universal Installer, Version 11.1.0.2.0 Production
Copyright (C) 1999, 2007, Oracle. All rights reserved.

ulimit: 1: Illegal option -u
ulimit: 1: Illegal option -u
rpm: To install rpm packages on Debian systems, use alien. See README.Debian.
error: cannot open Packages index using db3 - No such file or directory (2)
error: cannot open Packages database in /var/lib/rpm
rpm: To install rpm packages on Debian systems, use alien. See README.Debian.
error: cannot open Packages index using db3 - No such file or directory (2)
error: cannot open Packages database in /var/lib/rpm

There are a few errors that can be safely ignored: the ulimit and the RPM-related errors, since the limits don’t restrict the installer and since we actually don’t have a RPM database on the machine ?we are running on Ubuntu, remember?

After a few moments, you will be prompted to choose where to install the Oracle server. You’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.

sm_o11g_011.png

As you press the Next button, you will be prompted where to install the Inventory ?leave it that way unless you know what you are doing (if this were the case, you wouldn’t be reading this text anyways). Also correct the OS group name if needed and hit Next.

sm_o11g_021.png

Since I’ve chosen to install the server in the same directory as the oracle user’s HOME directory, the installer will issue a warning. I simply ignored it and continued with the installation.

sm_o11g_03.png

After that warning, I tried to perform some prerequisite tests, and yes ?some will fail. Just mark the failed boxes and hit Next (after trying a few times to fix those issues, I’ve decided to call the installer’s bluff and… it worked!)

sm_o11g_04.png

After all this warning stuff, it’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 Next.

Go get some coffee.

sm_o11g_06.png

And some more coffee.

sm_o11g_07.png

And even more coffee.

sm_o11g_08.png

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.

sm_o11g_09.png

At some point, it will ask you to run some commands as root. Do that when it asks, since the install depends on a few modifications on the base system (like creating the /etc/oratab file).

$ sudo -s
Password:

# /u01/app/oracle/oraInventory/orainstRoot.sh
Changing permissions of /u01/app/oracle/oraInventory to 770.
Changing groupname of /u01/app/oracle/oraInventory to oinstall.
The execution of the script is complete

# /u01/app/oracle/product/11.1.0/db_1/root.sh
Running Oracle 11g root.sh script...

The following environment variables are set as:
ORACLE_OWNER= oracle
ORACLE_HOME= /u01/app/oracle/product/11.1.0/db_1
[: 185: ==: unexpected operator
[: 189: ==: unexpected operator
Copying dbhome to /usr/local/bin ...
Copying oraenv to /usr/local/bin ...
Copying coraenv to /usr/local/bin ...

Creating /etc/oratab file...
Entries will be added to the /etc/oratab file as needed by
Database Configuration Assistant when a database is created
Finished running generic part of root.sh script.
Now product-specific root actions will be performed.
Finished product-specific root actions.

After these scripts finish their execution (the errors seem to be ignorable), hit the OK button and you’ll have a window that (probably) will look like this one:

sm_o11g_10.png

Just hit OK to get out the installer. The basic installation is… not over yet.

sm_o11g_11.png

To allow Oracle start on boot-up, create a file called oracledb (or whatever name you want to call it) and put it in /etc/init.d with the contents below. This script was copied and pasted from a tutorial by Graham Williams. It will read the /etc/oratab and fire up any instances it finds.

#!/bin/bash
#
# /etc/init.d/oracledb
#
# Run-level Startup script for the Oracle Instance, Listener, and Web Interface

export ORACLE_HOME=/u01/app/oracle
export PATH=$PATH:$ORACLE_HOME/bin

ORA_OWNR="oracle"

# if the executables do not exist -- display error

if [ ! -f $ORACLE_HOME/bin/dbstart -o ! -d $ORACLE_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 "$ORACLE_HOME/bin/lsnrctl start"
su $ORA_OWNR -c $ORACLE_HOME/bin/dbstart
touch /var/lock/oracle

su $ORA_OWNR -c "$ORACLE_HOME/bin/emctl start dbconsole"
echo "OK"
;;
stop)
# Oracle listener and instance shutdown
echo -n "Shutdown Oracle: "
su $ORA_OWNR -c "$ORACLE_HOME/bin/lsnrctl stop"
su $ORA_OWNR -c $ORACLE_HOME/bin/dbshut
rm -f /var/lock/oracle

su $ORA_OWNR -c "$ORACLE_HOME/bin/emctl stop dbconsole"
echo "OK"
;;
reload|restart)
$0 stop
$0 start
;;
*)
echo "Usage: `basename $0` start|stop|restart|reload"
exit 1
esac

exit 0

After saving the file, make it executable

# chmod a+x /etc/init.d/oracledb

and if you want, make it run at every boot:

# update-rc.d oracledb defaults 99
Adding system startup for /etc/init.d/oracledb ...
/etc/rc0.d/K99oracledb -> ../init.d/oracledb
/etc/rc1.d/K99oracledb -> ../init.d/oracledb
/etc/rc6.d/K99oracledb -> ../init.d/oracledb
/etc/rc2.d/S99oracledb -> ../init.d/oracledb
/etc/rc3.d/S99oracledb -> ../init.d/oracledb
/etc/rc4.d/S99oracledb -> ../init.d/oracledb
/etc/rc5.d/S99oracledb -> ../init.d/oracledb

Before finishing, add the following lines to your /etc/profile . 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).

export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=/u01/app/oracle/product/11.1.0/db_1
export ORACLE_SID=ORCL
export PATH=$PATH:/u01/app/oracle/product/11.1.0/db_1/bin

Last operation: add yourself to the dba group. You can use usermod or just edit the /etc/groups file and add your username at the end of the line that starts with dba (my username is ‘bott’):

dba:x:1002:oracle,bott

If you chose to not create a starter database during your install, you’ll have to do two extra steps. You should create a listener (with netca) and after that, create the starter database (also with netca). 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 (SYS, SYSTEM, and DBSNMP, SYSMAN if you choose to install it with the enterprise manager option selected).

If everything has gone well, open a terminal window and, as the oracle user, type:

$ sqlplus 

SQL*Plus: Release 11.1.0.5.0 - Beta on Wed Jul 11 17:11:53 2007

Copyright (c) 1982, 2007, Oracle. All rights reserved.

Enter user-name:

If you see these messages (and I sincerely hope you do) you’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’t know, but I will post further entries on my experiences as I go.

Anyway, I would greatly appreciate your feedback, especially if we can improve this tutorial so that more people can benefit from it.

Augusto Bott.


comefrom:http://www.phpchina.com/batch.viewlink.php?itemid=14789

狼爱上狸 2008-04-27 20:55 发表评论
]]>
Ubuntu 下用Orcale Express Editionhttp://www.aygfsteel.com/waterjava/archive/2008/04/08/191581.html狼爱上狸狼爱上狸Tue, 08 Apr 2008 15:16:00 GMThttp://www.aygfsteel.com/waterjava/archive/2008/04/08/191581.htmlhttp://www.aygfsteel.com/waterjava/comments/191581.htmlhttp://www.aygfsteel.com/waterjava/archive/2008/04/08/191581.html#Feedback0http://www.aygfsteel.com/waterjava/comments/commentRss/191581.htmlhttp://www.aygfsteel.com/waterjava/services/trackbacks/191581.html     一、安装Oracle-xe
    ׃新项目采用的是Oracle10iQ所以一直想在家里搞个模拟环境,但是在Ubuntu下Oracle成了我最大的ȝQ先是最开始的PL/SQL 代替品,然后是Oracle的代替品。下载了好久才把Oracle企业版搞下来Q但是无法安装,郁闷之下下蝲了Oracle-xeQ下载地址Qhttp: //www.oracle.com/technology/software/products/database/oracle10g/index.htmlQ? 注意选择下蝲适用于Express Edition z/Linux的版本, 也用了很长时_但是值得庆幸的是安装q是相当的简单,一个deb包,安装好以后根据它的提C定初始化配置Qhttp: //wlx.westgis.ac.cn/260/介绍了Oracle-xe的具体安装设|方法,但是我这里用sshҎ(gu)链接一直报错:
 
  1. ssh -L 8084:localhost:8084 oracle@127.0.0.1  
  2. ssh: connect to host 127.0.0.1 port 22: Connection refused  
q个错误问了一些h、也搜烦了很多,但是没有{案Q烦性不L它,q有SQL PLUS 和Oracle SQL Developer可用?br />     二、安装Oracle SQL Developer
    q个是Oracle退出的免费Oracle理工具Q提供多U语a和多个操作系l的实现Q由于Ubuntu上没有独立实玎ͼ所以下载了Java版本Q由? 是用Swing实现Q所以用v来非常的慢,直和PL/SQL不是一个档ơ的东西Q但是无奈有q个东西也还好了。用Ubuntu的h需要具有更? 的h耐力?br />     安装Ҏ(gu)很简单,去Oracle的官方网站下载安装即可?
    三、简单用Oracle-xe
    首先了解了一下其自带的SampleQ是通过Oracle自带的Web理工具Q在Oracle-xe启动以后Q访问http://localhost: <port>/apex可以了Q然后用SYS或者SYSTEM帐户dQ密码是初始化设定的。包含一个默认的HR帐户Q但是需要解除锁 定,在这里面提供了几本的pȝ理、表理{功能,q有一个应用程序管理,q个由O(jin)racle提供的get started是一个报表管理程序,按照它的步骤做下来,q是很容易的?br />     四、l学?br />     http://www.oracle.com/technology/getting-started/xe.html 讉Kq个地址有更多有关Oracle-xe的文档,接下来学习Oracle® Database Express Edition 2 Day DBAQ讲qC很基的东西和qx使用Oracle很像了QOracle-xe默认的SID是xeQ在刚才的Web理界面里面直接创徏一个用P然后 可以用SQL PLUS或者Oracle SQL Developerdq行Oracle的操作?br />


来自Qhttp://yueguangyuan.javaeye.com/blog/97027


狼爱上狸 2008-04-08 23:16 发表评论
]]>
在debian上安装oracle 10g expresshttp://www.aygfsteel.com/waterjava/archive/2008/04/08/191579.html狼爱上狸狼爱上狸Tue, 08 Apr 2008 15:11:00 GMThttp://www.aygfsteel.com/waterjava/archive/2008/04/08/191579.htmlhttp://www.aygfsteel.com/waterjava/comments/191579.htmlhttp://www.aygfsteel.com/waterjava/archive/2008/04/08/191579.html#Feedback0http://www.aygfsteel.com/waterjava/comments/commentRss/191579.htmlhttp://www.aygfsteel.com/waterjava/services/trackbacks/191579.html 1、修?etc/apt/source.listQ添加oracle的源Q?br /> deb http://oss.oracle.com/debian unstable main non-free
2、进行更新和安装
aptitude update
aptitude install oracle-xe-universal
3、进行初始的密码讄
/etc/init.d/oracle-xe configure
若服务器无GUIQ可以这栯E管?br /> ssh -L 8080:localhost:8080 user@IP_of_your_server
firefox http://localhost:8080/apex/



来自:http://wlx.westgis.ac.cn/260/


狼爱上狸 2008-04-08 23:11 发表评论
]]>
?Ubuntu7.04 上安?Oracle 10ghttp://www.aygfsteel.com/waterjava/archive/2007/11/03/157871.html狼爱上狸狼爱上狸Sat, 03 Nov 2007 00:24:00 GMThttp://www.aygfsteel.com/waterjava/archive/2007/11/03/157871.htmlhttp://www.aygfsteel.com/waterjava/comments/157871.htmlhttp://www.aygfsteel.com/waterjava/archive/2007/11/03/157871.html#Feedback0http://www.aygfsteel.com/waterjava/comments/commentRss/157871.htmlhttp://www.aygfsteel.com/waterjava/services/trackbacks/157871.html?Ubuntu7.04 上安?Oracle 10g

written by flexitime, 2007-10-15?a target="_blank" class="postlink">http://flexitime.blog.sohu.com/Q?

今天l于在Ubuntu7.04上成功安装Oracle10g。ؓ了安装OracleQ花了不时间到|上查资料,不过更多的时间用于自q真正实践Q当 中走了不的弯\Q现在把安装q程C来。(我一共在两台机器上安装了三次Q这文章是在安装第三次的时候一Ҏ(gu)作一边在另外的电(sh)脑上写的Q?
在网上有不少Oracle的安装教E,但这些教E更多的只是针对较低版本的UbuntuQ如6.XQ?.X{等Q,而且安装Oracle的过E中也有些问 题是没有描述和解决的。因此,我觉得有必要自己写一下安装我的实践过E,当然Q我主要q是参考了孙高勇先生的《Oracle 10g for Ubuntu安装指南》的内容?
现在开始吧Q?

W一步,我们需要一个Ubuntu。当然在|上可以免费下蝲得到Q我用的是桌面版Q而不是网站上提供的服务器版,很多刚由Windows转过来的 朋友可能会认为服务器版M比桌面版多些功能Qؓ此而下载了服务版来用。其实Ubuntu|上提供的下载却不然Q服务器版只不过比桌面版多了amp的Y? Qa-apache, m-mysql, p-php)Q但却没有图形用L面(可以另外再安装,但比较麻烦)。ؓ此,我用了桌面版的Ubuntu来完成这ơ的安装。安装的时候虽然有中文可以? 择,但我q是选用了英文,q不是我的英文特别好Q再好也好不q母语)的缘故,而是因ؓUbuntu的汉化未如理惻I汉字的支持也不怎么P特别是在U? CUI模式下)。所以还是用英文会更好(不必担心Q在英文版Ubuntu下一样可以用中文的输入法Q同样也可以让Oracle支持中文Q,要安? ubuntuQ可以参考网上的其它教程?

W二步,安装必需的包
apt-get install gcc make binutils lesstif2 libc6 libc6-dev rpm libmotif3 libaio libstdc++5 alien

W三步,创徏用户
在很多教E中都用命od建用戗但我发现用命od建的用户Q在囑Ş界面下用得不甚理惻I所以用囑Ş界面的用L理器增加一下新l叫dbaQ然后再增加一个普通桌面的用户叫oracleQ按默认的设|即可)Q接着用命令增加一个组及用?

addgroup nobody
usermod -g nobody nobody

W三步,复制文g及设|安装目?
我是用以CD作介质来安装Oracle的,所以安装之前要先将安装文g复制到机器当中(不复制也是可以的Q但复制到机器中会比较稳当)Q我? / 上创Z个目录ora_ins_diskQ然后将文g都复制进厅R复制后Qؓ了确保能利q行安装Q要查看一下runInstaller? unzip 两个文g属性,保其具有x属性(我就在unzipq个地方倒了大霉Q试着安装的时候老是报Permission DeniedQ我开始的时候一直以为是tmpI间不Q其实是 unzip 中没有运行的权限Q,如果没有那么要改动一下文件的属性:

cd /ora_ins_disk
chmod 755 runInstaller
cd install
chomd 755 unzip

我准备把oracle安装?opt/ora10中,而数据文件也攑֜q个目录的下层子目录?

cd /opt
mkdir ora10
chown -R oracle:dba ora10

W四步,修改讄
A.讄swap?
Oracle10g臛_需?00M的内存和400M的交换空_要查看swap区是否够大,?fdisk -l 命oLQ如果小?00M的空_那么p增加swap的大?
重设交换分区可以使用如下操作:

dd if=/dev/zero of=tmp_swap bs=1k count=900000
chmod 600 tmp_swap
mkswap tmp_swap
swapon tmp_swap
完成安装以后,可以释放q个I间:
swapoff tmp_swap
rm tmp_swap
count 值是Ҏ(gu)你需要调整的交换分区大小而定?

B.修改 sysctl.conf
d如下的行?etc/sysctl.conf ?
kernel.shmmax = 3147483648
kernel.shmmni = 4096
kernel.shmall = 2097152
kernel.sem = 250 32000 100 128
fs.file-max = 65536
net.ipv4.ip_local_port_range = 1024 65000

C.修改 limits.conf
d如下的行?etc/security/limits.conf中:

* soft nproc 2407
* hard nproc 16384
* soft nofile 1024
* hard nofile 65536

D.让修改生?
修改了以上文件后,必须让其生效,或重启系l?或切换到 root 用户下用以下的方式改变内核运行参?
sysctl -p

E.产生相应的Yq接
创徏一个文件如 kkQ内容如下:

#!/bin/bash
ln -s /usr/bin/awk /bin/awk
ln -s /usr/bin/rpm /bin/rpm
ln -s /usr/bin/basename /bin/basename
mkdir /etc/rc.d
ln -s /etc/rc0.d /etc/rc.d/rc0.d
ln -s /etc/rc2.d /etc/rc.d/rc2.d
ln -s /etc/rc3.d /etc/rc.d/rc3.d
ln -s /etc/rc4.d /etc/rc.d/rc4.d
ln -s /etc/rc5.d /etc/rc.d/rc5.d
ln -s /etc/rc6.d /etc/rc.d/rc6.d
ln -s /etc/init.d /etc/rc.d/init.d


创徏后,切换?root 用户L行一下?

F.创徏RedHat的版本声明文?
?etc/redhat-release中添加以下语句,以安装E序认ؓ正在一个RedHat的系l上安装Q?

Red Hat Linux release 3.1 (drupal)

G.修改环境变量
~辑 /home/oracle/.bashrcQ增加以下export 的内宏V?
(注意Q在Ubnutu 7.04中用Lprofile文g已改名ؓ~/.profileQ有很多安装教程都是?~/.bash_profileQ在7.04中不行的)

export ORACLE_HOME=/opt/ora10
export ORACLE_OWNER=oracle
export ORACLE_SID=ora1
export ORACLE_TERM=xterm
export PATH=$ORACLE_HOME/bin:$ORACLE_HOME/Apache/Apache/bin:$PATH

W五步,开始安?
注销原来的用P改用oracle用户d。用env查看一下环境变量是否生效?
然后q行/ora_ins_disk中进行安?

cd/ora_ins_disk
./runInstaller

在安装过E中Q请使用 Advanced InstallationQ然后一路按默认的设|进行往下设|,到窗单名?“Specify Database Configuration Options”的时候,要修改以下设|:
Database Character Set 中选择 Simplified Chinese ZHS16GBK
在安装的后期Q系l提C需要用 root 用户去运行两个脚本文件orainstRoot.sh和root.shQ安装完毕后QOracle是正常启动着的,你可以试一下连接数据库Q同时也可以? 用浏览器去设|一下OracleQ(url:http: //localhost:1158/em/Q(Oracle 10g与之前的版本都不一P使用WEB늚企业理器来代替以前的C/S版JAVA企业理器)

W六步,讄自启?

创徏自启动脚?
创徏 oracledb 脚本?etc/init.d/oracledb,内容如下

#!/bin/bash
#
# /etc/init.d/oracledb
#
# Run-level Startup script for the Oracle Instance, Listener, and
# Web Interface

export ORACLE_HOME=/opt/ora10
export ORACLE_SID=ora1
export PATH=$ORACLE_HOME/bin:$ORACLE_HOME/Apache/Apache/bin:$PATH

ORA_OWNR="oracle"
# if the executables do not exist -- display error
if [ ! -f $ORACLE_HOME/bin/dbstart -o ! -d $ORACLE_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 "$ORACLE_HOME/bin/lsnrctl start"
su $ORA_OWNR -c "$ORACLE_HOME/bin/dbstart"
touch /var/lock/oracle
su $ORA_OWNR -c "$ORACLE_HOME/bin/emctl start dbconsole"
echo "OK"
;;
stop)
# Oracle listener and instance shutdown
echo -n "Shutdown Oracle: "
su $ORA_OWNR -c "$ORACLE_HOME/bin/lsnrctl stop"
su $ORA_OWNR -c "$ORACLE_HOME/bin/dbshut"
rm -f /var/lock/oracle
su $ORA_OWNR -c "$ORACLE_HOME/bin/emctl stop dbconsole"
echo "OK"
;;
reload|restart)
$0 stop
$0 start
;;
*)
echo "Usage: `basename $0` start|stop|restart|reload"
exit 1
esac
exit 0

讄权限,攑ֈ启动脚本中去
chmod 755 /etc/init.d/oracledb
update-rc.d oracledb defaults 99
我的 oralce 的安装盘中可能有些问题,所以如果只用上q的脚本是不能启?listener的,要修改一下:
修改 /opt/ora10/bin/dbstart文g
查找Q?
# Set this to bring up Oracle Net Listener
ORACLE_HOME_LISTNER=/ade/vikrkuma_new/oracle
其改ؓQ?
# Set this to bring up Oracle Net Listener
ORACLE_HOME_LISTNER=$ORACLE_HOME

讄后,试一?

/etc/init.d/./oracledb reload

如果一切正常的话,会关闭一ơOracle又再重新打开?

x安装完毕,但这里有个小问题一直未能解冻I
如果我用中文WinXP的IEȝ录管理那台Oracle服务器的话,面中的文字会随之变Z文(在英文的览器下Q会看到是纯英文的页面)Q? 但会有部份的字会变成“口口”字符Q不知如何解冟뀂我觉得q应该是Java问题Q因Z前用tomcat?jsp 的时候,如果character encoding没写好的话,也会出现q样的问题,但在Oracle中我q不知如何解冟?/span>

上一ơ由flexitime?007-10-24 周三, 17:43修改Qd修改??br />
写的好,我这几天也正好搞q个Q关于这个中文的问题Q我已经解决了,是你可以不使用Oracle自带? JDKQ而是可以使用自己安装的JDKQ我是用的自己安装的,至于如何讄JAVA中文Q你可以看下http: //forum.ubuntu.org.cn/viewtopic.php?t=71848q篇帖子Q设|好JAVA中文环境之后Q你可以将 Oracle中的JDK删掉Q然后做一个符可接,q接C自己的JDK上就好了。呵c我也是先用命o行创建用户和l,但是创徏出来之后Q没? oracle的目录,所以就使用pȝ理中的创徏Q然后就没什么问题了。我q没有设|自启动Q看了你的文章可以试一试?/span>

来自Qhttp://forum.ubuntu.org.cn/viewtopic.php?p=481122


狼爱上狸 2007-11-03 08:24 发表评论
]]>
Install Oracle 10g Express Edition on Debianhttp://www.aygfsteel.com/waterjava/archive/2007/09/24/147874.html狼爱上狸狼爱上狸Mon, 24 Sep 2007 11:03:00 GMThttp://www.aygfsteel.com/waterjava/archive/2007/09/24/147874.htmlhttp://www.aygfsteel.com/waterjava/comments/147874.htmlhttp://www.aygfsteel.com/waterjava/archive/2007/09/24/147874.html#Feedback0http://www.aygfsteel.com/waterjava/comments/commentRss/147874.htmlhttp://www.aygfsteel.com/waterjava/services/trackbacks/147874.htmlOracle Database Express Edition Installation Guide

10g Release 2 (10.2) for Linux

http://download.huihoo.com/database/oracle/

下蝲 Oracle Database 10g Express Edition for Linux x86

- Available for Debian, Mandriva, Novell, Red Hat and Ubuntu

文g Oracle Database 10g Express Edition (Universal)

oracle-xe-universal_10.2.0.1-1.0_i386.deb (262,440,214 bytes) (cksum 3404538446) *Debian package

安装 debian:/home/huihoo/database/oracle# dpkg -i oracle-xe-universal_10.2.0.1-1.0_i3 86.deb

(Reading database ... 76128 files and directories currently installed.)

Unpacking oracle-xe-universal (from oracle-xe-universal_10.2.0.1-1.0_i386.deb) . ..

This system does not meet the minimum requirements for swap space. Based on

the amount of physical memory available on the system, Oracle Database 10g

Express Edition requires 1006 MB of swap space. This system has 818 MB

of swap space. Configure more swap space on the system and retry the installati on.

dpkg: error processing oracle-xe-universal_10.2.0.1-1.0_i386.deb (--install):

subprocess pre-installation script returned error exit status 1

Errors were encountered while processing:

oracle-xe-universal_10.2.0.1-1.0_i386.deb

Create 1GB swap file if needed.

dd if=/dev/zero of=/tmp/tmpswap bs=1k count=1024000

chmod 600 /tmp/tmpswap
/sbin/mkswap /tmp/tmpswap

su

# /sbin/swapon -v /tmp/tmpswap

若要卸出,可运?

swapoff /tmp/tmpswap
rm /tmp/tmpswap

再次安装

debian:/home/huihoo/database/oracle# dpkg -i oracle-xe-universal_10.2.0.1-1.0_i3 86.deb

dpkg: dependency problems prevent configuration of oracle-xe-universal:

oracle-xe-universal depends on libaio (>= 0.3.96) | libaio1 (>= 0.3.96); however:

Package libaio is not installed.

Package libaio1 is not installed.

dpkg: error processing oracle-xe-universal (--install):

dependency problems - leaving unconfigured

Errors were encountered while processing:

oracle-xe-universal

安装 package libaio libaio1

?http://packages.debian.org/unstable/libs/libaio 获得libaio debian package
? http://ftp.hk.debian.org/debian/pool/main/liba/libaio/libaio_0.3.104-1_i386.deb
# dpkg -i libaio_0.3.104-1_i386.deb

接着

# dpkg -i oracle-xe-universal_10.2.0.1-1.0_i3 86.deb
# /etc/init.d/oracle-xe configure
  • A valid HTTP port for the Oracle Database XE graphical user interface (the default is 8080)
  • A valid port for the Oracle database listener (the default is 1521)
  • A password for the SYS and SYSTEM administrative user accounts
  • Whether you want the database to start automatically when the computer starts

If you enter Yes, then the database starts immediately

To start the database manually, run this command:

$ /etc/init.d/oracle-xe start

To stop the database manually, use the following command:

$ /etc/init.d/oracle-xe stop

q时可看见后台启动了很多oracle q程

oracle 7357 0.0 1.8 224664 9664 ? Ss 06:25 0:00 xe_pmon_XE
oracle 7359 0.0 1.6 224048 8300 ? Ss 06:25 0:00 xe_psp0_XE
oracle 7361 0.0 4.4 224048 23084 ? Ss 06:25 0:00 xe_mman_XE
oracle 7363 0.0 2.1 226116 11248 ? Ss 06:25 0:00 xe_dbw0_XE
oracle 7365 0.0 2.4 239608 12508 ? Ss 06:25 0:00 xe_lgwr_XE
oracle 7367 0.0 2.6 224108 13764 ? Ss 06:25 0:00 xe_ckpt_XE
oracle 7369 0.0 8.1 224648 42268 ? Ss 06:25 0:00 xe_smon_XE
oracle 7371 0.0 2.6 224108 13896 ? Ss 06:25 0:00 xe_reco_XE
oracle 7373 0.0 4.1 225716 21332 ? Ss 06:25 0:00 xe_cjq0_XE
oracle 7375 0.0 7.9 226864 40820 ? Ss 06:25 0:00 xe_mmon_XE
oracle 7377 0.0 2.0 224052 10560 ? Ss 06:25 0:00 xe_mmnl_XE
oracle 7379 0.0 1.6 224712 8280 ? Ss 06:25 0:00 xe_d000_XE
oracle 7381 0.0 1.5 224668 8036 ? Ss 06:25 0:00 xe_s000_XE
oracle 7383 0.0 1.5 224668 8040 ? Ss 06:25 0:00 xe_s001_XE
oracle 7385 0.0 1.5 224668 8044 ? Ss 06:25 0:00 xe_s002_XE
oracle 7387 0.0 1.5 224668 8048 ? Ss 06:25 0:00 xe_s003_XE
oracle 7414 0.0 2.5 224108 13000 ? Ss 06:25 0:00 xe_qmnc_XE
oracle 7424 0.0 1.7 224076 8784 ? Ss 06:25 0:00 xe_q000_XE
oracle 7426 0.0 2.0 224076 10596 ? Ss 06:25 0:00 xe_q001_XE
http://localhost:8080/
http://localhost:8080/apex

讄环境变量

#cd /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/bin
# source oracle_env.csh (for C or tcsh shell)

?

# ./oracle_env.sh (for Bourne, Bash, or Korn shell)

Making Oracle Database XE Server Available to Remote Clients

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.

2 In the Database Login page, log in as SYSTEM, enter the password, and then click Login.

3 In the Oracle Database XE home page, click Administration.

4 Under Tasks, click Manage HTTP Access.

5 Under Manage HTTP Access, select Available from local server and remove clients.

6 Click Apply Changes.

export ORACLE_HOME=/usr/lib/oracle/xe/app/oracle/product/10.2.0/server
bin/sqlplus system
Enter password:

ERROR: ORA-12162: TNS:net service name is incorrectly specified

./sqlplus system@localhost

[http://download-west.oracle.com/docs/cd/B25329_01/doc/admin.102/b25610/toc.htm
  • Oracle Database Express Edition 10g Release 2 (10.2) - http://www.oracle.com/technology/xe/documentation
  • 来源Qhttp://wiki.huihoo.com/index.php?title=Install_Oracle_10g_Express_Edition_on_Debian


    狼爱上狸 2007-09-24 19:03 发表评论
    ]]>oracle10g_linux_install_confighttp://www.aygfsteel.com/waterjava/archive/2007/07/10/129183.html狼爱上狸狼爱上狸Mon, 09 Jul 2007 23:00:00 GMThttp://www.aygfsteel.com/waterjava/archive/2007/07/10/129183.htmlhttp://www.aygfsteel.com/waterjava/comments/129183.htmlhttp://www.aygfsteel.com/waterjava/archive/2007/07/10/129183.html#Feedback0http://www.aygfsteel.com/waterjava/comments/commentRss/129183.htmlhttp://www.aygfsteel.com/waterjava/services/trackbacks/129183.html/usr/sbin/groupadd oinstall
    /usr/sbin/groupadd dba
    /usr/sbin/useradd -g oinstall -G dba oracle
    passwd oracle
    mkdir /opt/oracle
    mkdir /opt/oracle/product
    mkdir /opt/oracle/product/10.1.0
    chown -R oracle.oinstall /opt/oracle
    mkdir /opt/oracle/oradata
    chown -R oracle.oinstall /opt/oracle/oradata
    mkdir /var/opt/oracle
    chown oracle.dba /var/opt/oracle
    chmod 755 /var/opt/oracle
    vi /etc/sysctl.conf
    kernel.shmall = 2097152
    kernel.shmmax = 2147483648
    kernel.shmmni = 4096
    kernel.sem = 250 32000 100 128
    fs.file-max = 65536
    net.ipv4.ip_local_port_range = 1024 65000

    vi /etc/security/limits.conf
    * soft nproc 2047
    * hard nproc 16384
    * soft nofile 1024
    * hard nofile 65536

    vi /etc/profile
    if [ $USER = "oracle" ]; then
    if [ $SHELL = "/bin/ksh" ]; then
    ulimit -p 16384
    ulimit -n 65536
    else
    ulimit -u 16384 -n 65536
    fi
    fi

    vi .bach_profile
    export ORACLE_BASE=/opt/oracle
    export ORACLE_HOME=/opt/oracle/product/10.1.0
    export PATH=$ORACLE_HOME/bin:$ORACLE_HOME/Apache/Apache/bin:$PATH
    export ORACLE_OWNER=oracle
    export ORACLE_SID=URPDB
    export ORACLE_TERM=vt100
    export LD_ASSUME_KERNEL=2.4.1
    export THREADS_FLAG=native
    LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
    LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib
    export LD_LIBRARY_PATH
    export PATH=$PATH:$ORACLE_HOME/bin
    export NLS_LANG=AMERICAN_AMERICA.UTF8
    export LANG=en_US
    export ORA_NLS33=$ORACLE_HOME/ocommon/nls/admin/data
    CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib
    CLASSPATH=$CLASSPATH:$ORACLE_HOME/network/jlib
    export CLASSPATH
    认q是修改生效
    $ source .bash_profile

    来自Qhttp://www.cngr.cn/article/63/390/2006/2006071919228.shtml



    狼爱上狸 2007-07-10 07:00 发表评论
    ]]>
    oracle9i for linux安装http://www.aygfsteel.com/waterjava/archive/2007/07/10/129182.html狼爱上狸狼爱上狸Mon, 09 Jul 2007 22:58:00 GMThttp://www.aygfsteel.com/waterjava/archive/2007/07/10/129182.htmlhttp://www.aygfsteel.com/waterjava/comments/129182.htmlhttp://www.aygfsteel.com/waterjava/archive/2007/07/10/129182.html#Feedback0http://www.aygfsteel.com/waterjava/comments/commentRss/129182.htmlhttp://www.aygfsteel.com/waterjava/services/trackbacks/129182.html物理内存: 1G
    交换I间: 1.5 GB或?倍内存大?br>/tmp I间: 1 G
    软g所需I间: 3 GB
    数据库文? 1.5 GB

    2.linux参数标准最低要?指不警告?
    #注释:#表示使用root用户操作,$表示使用oracle 用户q行操作

    2.1 核心参数配置
    #vi /etc/sysctl.conf
    加入以下内容:
    kernel.shmall = 2097152
    kernel.shmmax = 2147483648
    kernel.shmmni = 4096
    kernel.sem = 250 32000 100 128
    fs.file-max = 65536
    net.ipv4.ip_local_port_range = 1024 65000
    net.core.rmem_default = 262144
    net.core.rmem_max = 262144
    net.core.wmem_default = 262144
    net.core.wmem_max = 262144

    ~辑完之?保存,执行
    # /sbin/sysctl -p
    然后,应该查一下上面的操作是否正确:
    # /sbin/sysctl -a | grep sem
    # /sbin/sysctl -a | grep shm
    # /sbin/sysctl -a | grep file-max
    # /sbin/sysctl -a | grep ip_local_port_range

    2.2 为Oracle用户讑֮Shell的限?br># vi /etc/security/limits.conf
    # d如下的行
    * soft nproc 2047
    * hard nproc 16384
    * soft nofile 1024
    * hard nofile 65536
    d如下的行?etc/pam.d/login 文gQ?br>session required /lib/security/pam_limits.so
    ~辑 /etc/profile 文g,d如下部分Q?br>if [ $USER = "oracle" ]; then
    if [ $SHELL = "/bin/ksh" ]; then
    ulimit -p 16384
    ulimit -n 65536
    else
    ulimit -u 16384 -n 65536
    fi
    fi

    2.3 此外Q最好验证一?gcc和glibc的版?要求是gcc-3.2.3-2 或者更?
    #gcc -v

    2.4 创徏用户和相关的l?br># /usr/sbin/groupadd oinstall
    # /usr/sbin/groupadd dba
    # /usr/sbin/useradd -g oinstall -G dba oracle
    如果只是试目的的话Q不创徏oinstalll也没什? 不过q是规范一Ҏ(gu)较好.如果oracle 用户和dbal等已经存在Q作适当的调整即?

    2.5 查ƈ调整环境变量
    d为oracle用户
    # su – oracle
    $ vi .bash_profile
    #d如下内容,你的具体值应该不会和q个完全相同.
    export ORACLE_BASE=/opt/oracle
    export ORACLE_HOME=$ORACLE_BASE/product/10.2.0/db_1
    export ORACLE_SID=orcl
    export PATH=$PATH:$HOME/bin:$ORACLE_HOME/bin
    export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/usr/lib
    export LC_CTYPE=zh_CN.UTF-8
    然后执行
    $ source .bash_profile
    使环境变量生?opt/oracle {目录应该徏立好q做合适的授权
    #chown -R oracle /opt/oracle

    3 开始安?0g
    执行 /install/runInstaller
    按照界面提示安装卛_
    最好按照高U安?br>高安装的好?
    a.字符设ؓutf-8(默认是iso-8859-1);
    b.查配|?
    c.讑֮pȝ用户(默认是关闭的)
    {等...

    4 q行oracle10g

    启动监听: lsnrctl start
    关闭监听: lsnrctl stop

    q入sql命o环境
    sqlplus
    /as sysdba

    启动 startup
    关闭 shutdown immediate

    来自Qhttp://fsz521job.itpub.net/post/5606/68404



    狼爱上狸 2007-07-10 06:58 发表评论
    ]]>
    վ֩ģ壺 ƽ| ͨ| | | ָɽ| | | ˻| ٷ| ׿| ɽ| | Ͽ| ֳ| ʶ| ԫ| | Ϫ| ɽ| Դ| | | ̨ʡ| | | | | ʱ| ½| | | | | | | | | | Դ| | ɣ|