锘??xml version="1.0" encoding="utf-8" standalone="yes"?>无码天堂亚洲国产AV,永久亚洲成a人片777777,亚洲AV综合色一区二区三区http://www.tkk7.com/waterjava/category/9753.html鎴戣儭姹夊北鍙堝洖鏉ヤ簡!zh-cnFri, 02 May 2008 21:58:52 GMTFri, 02 May 2008 21:58:52 GMT60dbstart&dbshut鑴氭湰涓殑閿欒http://www.tkk7.com/waterjava/archive/2008/05/02/197758.html鐙肩埍涓婄嫺鐙肩埍涓婄嫺Fri, 02 May 2008 09:30:00 GMThttp://www.tkk7.com/waterjava/archive/2008/05/02/197758.htmlhttp://www.tkk7.com/waterjava/comments/197758.htmlhttp://www.tkk7.com/waterjava/archive/2008/05/02/197758.html#Feedback0http://www.tkk7.com/waterjava/comments/commentRss/197758.htmlhttp://www.tkk7.com/waterjava/services/trackbacks/197758.htmlOracle鎻愪緵浜嗕袱涓剼鏈琩bstart鍜宒bshut鐢ㄦ潵鍚姩鍜屽叧闂暟鎹簱.
榪欎袱涓剼鏈鍏堣鍙杘ratab(/etc/oratab)鏂囦歡鏉ュ喅瀹氬摢涓暟鎹簱鏄渶瑕佽嚜鍔ㄥ惎鍔ㄥ拰鍏抽棴,鐒跺悗鍚姩鍜屽叧闂偅浜涙暟鎹簱,
oratab鏂囦歡閫氳繃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鑴氭湰涓兘鍖呭惈鏈夐敊璇?
闇瑕佷慨鏀筄RACLE_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]$

鏉ヨ嚜錛歨ttp://benbo.itpub.net/post/26034/311306

鐙肩埍涓婄嫺 2008-05-02 17:30 鍙戣〃璇勮
]]>
Installing Oracle 11g on Ubuntu Linux 7.04http://www.tkk7.com/waterjava/archive/2008/04/27/196628.html鐙肩埍涓婄嫺鐙肩埍涓婄嫺Sun, 27 Apr 2008 12:55:00 GMThttp://www.tkk7.com/waterjava/archive/2008/04/27/196628.htmlhttp://www.tkk7.com/waterjava/comments/196628.htmlhttp://www.tkk7.com/waterjava/archive/2008/04/27/196628.html#Feedback0http://www.tkk7.com/waterjava/comments/commentRss/196628.htmlhttp://www.tkk7.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 涓嬩嬌鐢∣rcale Express Editionhttp://www.tkk7.com/waterjava/archive/2008/04/08/191581.html鐙肩埍涓婄嫺鐙肩埍涓婄嫺Tue, 08 Apr 2008 15:16:00 GMThttp://www.tkk7.com/waterjava/archive/2008/04/08/191581.htmlhttp://www.tkk7.com/waterjava/comments/191581.htmlhttp://www.tkk7.com/waterjava/archive/2008/04/08/191581.html#Feedback0http://www.tkk7.com/waterjava/comments/commentRss/191581.htmlhttp://www.tkk7.com/waterjava/services/trackbacks/191581.html     涓銆佸畨瑁匫racle-xe
    鐢變簬鏂伴」鐩噰鐢ㄧ殑鏄疧racle10i錛屾墍浠ヤ竴鐩存兂鍦ㄥ閲屾悶涓ā鎷熺幆澧冿紝浣嗘槸鍦║buntu涓婳racle灝辨垚浜嗘垜鏈澶х殑闃葷錛屽厛鏄渶寮濮嬬殑PL/SQL 浠f浛鍝侊紝鐒跺悗鏄疧racle鐨勪唬鏇垮搧銆備笅杞戒簡濂戒箙鎵嶆妸Oracle浼佷笟鐗堟悶涓嬫潵錛屼絾鏄棤娉曞畨瑁咃紝閮侀椃涔嬩笅涓嬭澆浜哋racle-xe錛屼笅杞藉湴鍧錛歨ttp: //www.oracle.com/technology/software/products/database/oracle10g/index.html錛? 娉ㄦ剰閫夋嫨涓嬭澆閫傜敤浜嶦xpress Edition z/Linux鐨勭増鏈紝 涔熺敤浜嗗緢闀挎椂闂達紝浣嗘槸鍊煎緱搴嗗垢鐨勬槸瀹夎榪樻槸鐩稿綋鐨勭畝鍗曪紝涓涓猟eb鍖咃紝瀹夎濂戒互鍚庢牴鎹畠鐨勬彁紺鴻瀹氬垵濮嬪寲閰嶇疆錛歨ttp: //wlx.westgis.ac.cn/260/浠嬬粛浜哋racle-xe鐨勫叿浣撳畨瑁呰緗柟娉曪紝浣嗘槸鎴戣繖閲屼嬌鐢╯sh鏂規硶閾炬帴涓鐩存姤閿欙細
 
  1. ssh -L 8084:localhost:8084 oracle@127.0.0.1  
  2. ssh: connect to host 127.0.0.1 port 22: Connection refused  
榪欎釜閿欒闂簡涓浜涗漢銆佷篃鎼滅儲浜嗗緢澶氾紝浣嗘槸娌℃湁絳旀錛岀儲鎬т笉鍘繪悶瀹冿紝榪樻湁SQL PLUS 鍜孫racle SQL Developer鍙敤銆?br />     浜屻佸畨瑁匫racle SQL Developer
    榪欎釜鏄疧racle閫鍑虹殑鍏嶈垂Oracle綆$悊宸ュ叿錛屾彁渚涘縐嶈璦鍜屽涓搷浣滅郴緇熺殑瀹炵幇錛岀敱浜嶶buntu涓婃病鏈夌嫭绔嬪疄鐜幫紝鎵浠ヤ笅杞戒簡Java鐗堟湰錛岀敱浜? 鏄嬌鐢⊿wing瀹炵幇錛屾墍浠ヤ嬌鐢ㄨ搗鏉ラ潪甯哥殑鎱紝綆鐩村拰PL/SQL涓嶆槸涓涓。嬈$殑涓滆タ錛屼絾鏄棤濂堟湁榪欎釜涓滆タ涔熻繕綆楀ソ浜嗐備嬌鐢║buntu鐨勪漢闇瑕佸叿鏈夋洿澶? 鐨勪漢鑰愬姏銆?br />     瀹夎鏂規硶寰堢畝鍗曪紝鍘籓racle鐨勫畼鏂圭綉绔欎笅杞藉畨瑁呭嵆鍙?
    涓夈佺畝鍗曚嬌鐢∣racle-xe
    棣栧厛浜嗚В浜嗕竴涓嬪叾鑷甫鐨凷ample錛屾槸閫氳繃Oracle鑷甫鐨刉eb綆$悊宸ュ叿錛屽湪Oracle-xe鍚姩浠ュ悗錛岃闂甴ttp://localhost: <port>/apex灝卞彲浠ヤ簡錛岀劧鍚庝嬌鐢⊿YS鎴栬匰YSTEM甯愭埛鐧誨綍錛屽瘑鐮佹槸鍒濆鍖栬瀹氱殑銆傚寘鍚竴涓粯璁ょ殑HR甯愭埛錛屼絾鏄渶瑕佽В闄ら攣 瀹氾紝鍦ㄨ繖閲岄潰鎻愪緵浜嗗嚑鏈殑緋葷粺綆$悊銆佽〃綆$悊絳夊姛鑳斤紝榪樻湁涓涓簲鐢ㄧ▼搴忕鐞嗭紝榪欎釜鐢監racle鎻愪緵鐨刧et started灝辨槸涓涓姤琛ㄧ鐞嗙▼搴忥紝鎸夌収瀹冪殑姝ラ鍋氫笅鏉ワ紝榪樻槸寰堝鏄撶殑銆?br />     鍥涖佺戶緇涔?br />     http://www.oracle.com/technology/getting-started/xe.html 璁塊棶榪欎釜鍦板潃鏈夋洿澶氭湁鍏砄racle-xe鐨勬枃妗o紝鎺ヤ笅鏉ュ涔燨racle® Database Express Edition 2 Day DBA錛岃榪頒簡寰堝熀紜鐨勪笢瑗垮拰騫蟲椂浣跨敤Oracle灝卞緢鍍忎簡錛孫racle-xe榛樿鐨凷ID鏄痻e錛屽湪鍒氭墠鐨刉eb綆$悊鐣岄潰閲岄潰鐩存帴鍒涘緩涓涓敤鎴鳳紝鐒跺悗 灝卞彲浠ヤ嬌鐢⊿QL PLUS鎴栬匫racle SQL Developer鐧誨綍榪涜Oracle鐨勬搷浣溿?br />


鏉ヨ嚜錛歨ttp://yueguangyuan.javaeye.com/blog/97027


鐙肩埍涓婄嫺 2008-04-08 23:16 鍙戣〃璇勮
]]>
鍦╠ebian涓婂畨瑁卭racle 10g expresshttp://www.tkk7.com/waterjava/archive/2008/04/08/191579.html鐙肩埍涓婄嫺鐙肩埍涓婄嫺Tue, 08 Apr 2008 15:11:00 GMThttp://www.tkk7.com/waterjava/archive/2008/04/08/191579.htmlhttp://www.tkk7.com/waterjava/comments/191579.htmlhttp://www.tkk7.com/waterjava/archive/2008/04/08/191579.html#Feedback0http://www.tkk7.com/waterjava/comments/commentRss/191579.htmlhttp://www.tkk7.com/waterjava/services/trackbacks/191579.html 1銆佷慨鏀?etc/apt/source.list錛屾坊鍔爋racle鐨勬簮錛?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
鑻ユ湇鍔″櫒鏃燝UI錛屽彲浠ヨ繖鏍瘋繙紼嬬鐞?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.tkk7.com/waterjava/archive/2007/11/03/157871.html鐙肩埍涓婄嫺鐙肩埍涓婄嫺Sat, 03 Nov 2007 00:24:00 GMThttp://www.tkk7.com/waterjava/archive/2007/11/03/157871.htmlhttp://www.tkk7.com/waterjava/comments/157871.htmlhttp://www.tkk7.com/waterjava/archive/2007/11/03/157871.html#Feedback0http://www.tkk7.com/waterjava/comments/commentRss/157871.htmlhttp://www.tkk7.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/錛?

浠婂ぉ緇堜簬鍦║buntu7.04涓婃垚鍔熷畨瑁匫racle10g銆備負浜嗗畨瑁匫racle錛岃姳浜嗕笉灝戞椂闂村埌緗戜笂鏌ヨ祫鏂欙紝涓嶈繃鏇村鐨勬椂闂寸敤浜庤嚜宸辯殑鐪熸瀹炶返錛屽綋 涓蛋浜嗕笉灝戠殑寮礬錛岀幇鍦ㄦ妸瀹夎榪囩▼璁頒笅鏉ャ傦紙鎴戜竴鍏卞湪涓ゅ彴鏈哄櫒涓婂畨瑁呬簡涓夋錛岃繖綃囨枃绔犳槸鍦ㄥ畨瑁呯涓夋鐨勬椂鍊欎竴杈規搷浣滀竴杈瑰湪鍙﹀鐨勭數鑴戜笂鍐欑殑錛?
鍦ㄧ綉涓婃湁涓嶅皯Oracle鐨勫畨瑁呮暀紼嬶紝浣嗚繖浜涙暀紼嬫洿澶氱殑鍙槸閽堝杈冧綆鐗堟湰鐨刄buntu錛堝6.X錛?.X絳夌瓑錛夛紝鑰屼笖瀹夎Oracle鐨勮繃紼嬩腑涔熸湁浜涢棶 棰樻槸娌℃湁鎻忚堪鍜岃В鍐崇殑銆傚洜姝わ紝鎴戣寰楁湁蹇呰鑷繁鍐欎竴涓嬪畨瑁呮垜鐨勫疄璺佃繃紼嬶紝褰撶劧錛屾垜涓昏榪樻槸鍙傝冧簡瀛欓珮鍕囧厛鐢熺殑銆奜racle 10g for Ubuntu瀹夎鎸囧崡銆嬬殑鍐呭銆?
鐜板湪寮濮嬪惂錛?

絎竴姝ワ紝鎴戜滑闇瑕佷竴涓猆buntu銆傚綋鐒跺湪緗戜笂鍙互鍏嶈垂涓嬭澆寰楀埌錛屾垜鐢ㄧ殑鏄闈㈢増錛岃屼笉鏄綉绔欎笂鎻愪緵鐨勬湇鍔″櫒鐗堬紝寰堝鍒氱敱Windows杞繃鏉ョ殑 鏈嬪弸鍙兘浼氳涓烘湇鍔″櫒鐗堟諱細姣旀闈㈢増澶氫簺鍔熻兘錛屼負姝よ屼笅杞戒簡鏈嶅姟鐗堟潵鐢ㄣ傚叾瀹濽buntu緗戜笂鎻愪緵鐨勪笅杞藉嵈涓嶇劧錛屾湇鍔″櫒鐗堝彧涓嶈繃姣旀闈㈢増澶氫簡amp鐨勮蔣浠? 錛坅-apache, m-mysql, p-php)錛屼絾鍗存病鏈夊浘褰㈢敤鎴風晫闈紙鍙互鍙﹀鍐嶅畨瑁咃紝浣嗘瘮杈冮夯鐑︼級銆備負姝わ紝鎴戜嬌鐢ㄤ簡妗岄潰鐗堢殑Ubuntu鏉ュ畬鎴愯繖嬈$殑瀹夎銆傚畨瑁呯殑鏃跺欒櫧鐒舵湁涓枃鍙互閫? 鎷╋紝浣嗘垜榪樻槸閫夌敤浜嗚嫳鏂囷紝榪欎笉鏄垜鐨勮嫳鏂囩壒鍒ソ錛堝啀濂戒篃濂戒笉榪囨瘝璇級鐨勭紭鏁咃紝鑰屾槸鍥犱負Ubuntu鐨勬眽鍖栨湭濡傜悊鎯籌紝姹夊瓧鐨勬敮鎸佷篃涓嶆庝箞鏍鳳紙鐗瑰埆鏄湪綰? CUI妯″紡涓嬶級銆傛墍浠ヨ繕鏄敤鑻辨枃浼氭洿濂斤紙涓嶅繀鎷呭績錛屽湪鑻辨枃鐗圲buntu涓嬩竴鏍峰彲浠ョ敤涓枃鐨勮緭鍏ユ硶錛屽悓鏍蜂篃鍙互璁㎡racle鏀寔涓枃錛夛紝瑕佸畨瑁? ubuntu錛屽彲浠ュ弬鑰冪綉涓婄殑鍏跺畠鏁欑▼銆?

絎簩姝ワ紝瀹夎蹇呴渶鐨勫寘
apt-get install gcc make binutils lesstif2 libc6 libc6-dev rpm libmotif3 libaio libstdc++5 alien

絎笁姝ワ紝鍒涘緩鐢ㄦ埛
鍦ㄥ緢澶氭暀紼嬩腑閮界敤鍛戒護鍘誨垱寤虹敤鎴楓備絾鎴戝彂鐜扮敤鍛戒護鍘誨垱寤虹殑鐢ㄦ埛錛屽湪鍥懼艦鐣岄潰涓嬬敤寰椾笉鐢氱悊鎯籌紝鎵浠ョ敤鍥懼艦鐣岄潰鐨勭敤鎴風鐞嗗櫒澧炲姞涓涓嬫柊緇勫彨dba錛岀劧鍚庡啀澧炲姞涓涓櫘閫氭闈㈢殑鐢ㄦ埛鍙玱racle錛堟寜榛樿鐨勮緗嵆鍙級錛屾帴鐫鐢ㄥ懡浠ゅ鍔犱竴涓粍鍙婄敤鎴?

addgroup nobody
usermod -g nobody nobody

絎笁姝ワ紝澶嶅埗鏂囦歡鍙婅緗畨瑁呯洰褰?
鎴戞槸鐢ㄤ互CD浣滀粙璐ㄦ潵瀹夎Oracle鐨勶紝鎵浠ュ畨瑁呬箣鍓嶈鍏堝皢瀹夎鏂囦歡澶嶅埗鍒版満鍣ㄥ綋涓紙涓嶅鍒朵篃鏄彲浠ョ殑錛屼絾澶嶅埗鍒版満鍣ㄤ腑浼氭瘮杈冪ǔ褰擄級錛屾垜鍦? / 涓婂垱寤轟竴涓洰褰昽ra_ins_disk錛岀劧鍚庡皢鏂囦歡閮藉鍒惰繘鍘匯傚鍒跺悗錛屼負浜嗙‘淇濊兘欏哄埄榪涜瀹夎錛岃鏌ョ湅涓涓媟unInstaller鍙? unzip 涓や釜鏂囦歡灞炴э紝紜繚鍏跺叿鏈墄灞炴э紙鎴戝氨鍦╱nzip榪欎釜鍦版柟鍊掍簡澶ч湁錛岃瘯鐫瀹夎鐨勬椂鍊欒佹槸鎶ermission Denied錛屾垜寮濮嬬殑鏃跺欎竴鐩翠互涓烘槸tmp絀洪棿涓嶈凍錛屽叾瀹炴槸 unzip 涓病鏈夎繍琛岀殑鏉冮檺錛夛紝濡傛灉娌℃湁閭d箞瑕佹敼鍔ㄤ竴涓嬫枃浠剁殑灞炴э細

cd /ora_ins_disk
chmod 755 runInstaller
cd install
chomd 755 unzip

鎴戝噯澶囨妸oracle瀹夎鍒?opt/ora10涓紝鑰屾暟鎹枃浠朵篃鏀懼湪榪欎釜鐩綍鐨勪笅灞傚瓙鐩綍涓?

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

絎洓姝ワ紝淇敼璁劇疆
A.璁劇疆swap鍖?
Oracle10g鑷沖皯闇瑕?00M鐨勫唴瀛樺拰400M鐨勪氦鎹㈢┖闂達紝瑕佹煡鐪媠wap鍖烘槸鍚﹁凍澶熷ぇ灝忥紝鐢?fdisk -l 鍛戒護鍘繪煡錛屽鏋滃皬浜?00M鐨勭┖闂達紝閭d箞灝辮澧炲姞swap鐨勫ぇ灝?
閲嶈浜ゆ崲鍒嗗尯鍙互浣跨敤濡備笅鎿嶄綔:

dd if=/dev/zero of=tmp_swap bs=1k count=900000
chmod 600 tmp_swap
mkswap tmp_swap
swapon tmp_swap
瀹屾垚瀹夎浠ュ悗,鍙互閲婃斁榪欎釜絀洪棿:
swapoff tmp_swap
rm tmp_swap
count 鍊兼槸鏍規嵁浣犻渶瑕佽皟鏁寸殑浜ゆ崲鍒嗗尯澶у皬鑰屽畾銆?

B.淇敼 sysctl.conf
娣誨姞濡備笅鐨勮鍒?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
娣誨姞濡備笅鐨勮鍒?etc/security/limits.conf涓細

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

D.璁╀慨鏀圭敓鏁?
淇敼浜嗕互涓婃枃浠跺悗,蹇呴』璁╁叾鐢熸晥,鎴栭噸鍚郴緇?鎴栧垏鎹㈠埌 root 鐢ㄦ埛涓嬬敤浠ヤ笅鐨勬柟寮忔敼鍙樺唴鏍歌繍琛屽弬鏁?
sysctl -p

E.浜х敓鐩稿簲鐨勮蔣榪炴帴
鍒涘緩涓涓枃浠跺 kk錛屽唴瀹瑰涓嬶細

#!/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 鐢ㄦ埛鍘繪墽琛屼竴涓嬨?

F.鍒涘緩RedHat鐨勭増鏈0鏄庢枃浠?
鍦?etc/redhat-release涓坊鍔犱互涓嬭鍙ワ紝浠ヤ嬌瀹夎紼嬪簭璁や負姝e湪涓涓猂edHat鐨勭郴緇熶笂瀹夎錛?

Red Hat Linux release 3.1 (drupal)

G.淇敼鐜鍙橀噺
緙栬緫 /home/oracle/.bashrc錛屽鍔犱互涓媏xport 鐨勫唴瀹廣?
(娉ㄦ剰錛屽湪Ubnutu 7.04涓敤鎴風殑profile鏂囦歡宸叉敼鍚嶄負~/.profile錛屾湁寰堝瀹夎鏁欑▼閮芥槸鐢?~/.bash_profile錛屽湪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

絎簲姝ワ紝寮濮嬪畨瑁?
娉ㄩ攢鍘熸潵鐨勭敤鎴鳳紝鏀圭敤oracle鐢ㄦ埛鐧誨綍銆傜敤env鏌ョ湅涓涓嬬幆澧冨彉閲忔槸鍚︾敓鏁堛?
鐒跺悗榪涜/ora_ins_disk涓繘琛屽畨瑁?

cd/ora_ins_disk
./runInstaller

鍦ㄥ畨瑁呰繃紼嬩腑錛岃浣跨敤 Advanced Installation錛岀劧鍚庝竴璺寜榛樿鐨勮緗繘琛屽線涓嬭緗紝鍒扮獥鍗曞悕涓?“Specify Database Configuration Options”鐨勬椂鍊欙紝瑕佷慨鏀逛互涓嬭緗細
Database Character Set 涓夋嫨 Simplified Chinese ZHS16GBK
鍦ㄥ畨瑁呯殑鍚庢湡錛岀郴緇熸彁紺洪渶瑕佺敤 root 鐢ㄦ埛鍘昏繍琛屼袱涓剼鏈枃浠秓rainstRoot.sh鍜宺oot.sh錛屽畨瑁呭畬姣曞悗錛孫racle鏄甯稿惎鍔ㄧ潃鐨勶紝浣犲彲浠ヨ瘯涓涓嬭繛鎺ユ暟鎹簱錛屽悓鏃朵篃鍙互浣? 鐢ㄦ祻瑙堝櫒鍘昏緗竴涓婳racle錛岋紙url:http: //localhost:1158/em/錛夛紙Oracle 10g涓庝箣鍓嶇殑鐗堟湰閮戒笉涓鏍鳳紝浣跨敤WEB欏電殑浼佷笟綆$悊鍣ㄦ潵浠f浛浠ュ墠鐨凜/S鐗圝AVA浼佷笟綆$悊鍣級

絎叚姝ワ紝璁劇疆鑷惎鍔?

鍒涘緩鑷惎鍔ㄨ剼鏈?
鍒涘緩 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 鐨勫畨瑁呯洏涓彲鑳芥湁浜涢棶棰橈紝鎵浠ュ鏋滃彧鐢ㄤ笂榪扮殑鑴氭湰鏄笉鑳藉惎鍔?listener鐨勶紝瑕佷慨鏀逛竴涓嬶細
淇敼 /opt/ora10/bin/dbstart鏂囦歡
鏌ユ壘錛?
# Set this to bring up Oracle Net Listener
ORACLE_HOME_LISTNER=/ade/vikrkuma_new/oracle
灝嗗叾鏀逛負錛?
# Set this to bring up Oracle Net Listener
ORACLE_HOME_LISTNER=$ORACLE_HOME

璁劇疆鍚庯紝嫻嬭瘯涓涓?

/etc/init.d/./oracledb reload

濡傛灉涓鍒囨甯哥殑璇濓紝浼氬叧闂竴嬈racle鍙堝啀閲嶆柊鎵撳紑銆?

鑷蟲灝卞畨瑁呭畬姣曪紝浣嗚繖閲屾湁涓皬闂涓鐩存湭鑳借В鍐籌細
濡傛灉鎴戠敤涓枃WinXP鐨処E鍘葷櫥褰曠鐞嗛偅鍙癘racle鏈嶅姟鍣ㄧ殑璇濓紝欏甸潰涓殑鏂囧瓧浼氶殢涔嬪彉涓轟腑鏂囷紙鍦ㄨ嫳鏂囩殑嫻忚鍣ㄤ笅錛屼細鐪嬪埌鏄函鑻辨枃鐨勯〉闈級錛? 浣嗕細鏈夐儴浠界殑瀛椾細鍙樻垚“鍙e彛”瀛楃錛屼笉鐭ュ浣曡В鍐熾傛垜瑙夊緱榪欏簲璇ユ槸Java闂錛屽洜涓轟箣鍓嶇敤tomcat鍐?jsp 鐨勬椂鍊欙紝濡傛灉character encoding娌″啓濂界殑璇濓紝涔熶細鍑虹幇榪欐牱鐨勯棶棰橈紝浣嗗湪Oracle涓垜榪樹笉鐭ュ浣曡В鍐熾?/span>

涓婁竴嬈$敱flexitime浜?007-10-24 鍛ㄤ笁, 17:43淇敼錛屾誨叡淇敼浜?嬈?br />
鍐欑殑濂斤紝鎴戣繖鍑犲ぉ涔熸濂芥悶榪欎釜錛屽叧浜庤繖涓腑鏂囩殑闂錛屾垜宸茬粡瑙e喅浜嗭紝灝辨槸浣犲彲浠ヤ笉浣跨敤Oracle鑷甫鐨? JDK錛岃屾槸鍙互浣跨敤鑷繁瀹夎鐨凧DK錛屾垜灝辨槸鐢ㄧ殑鑷繁瀹夎鐨勶紝鑷充簬濡備綍璁劇疆JAVA涓枃錛屼綘鍙互鐪嬩笅http: //forum.ubuntu.org.cn/viewtopic.php?t=71848榪欑瘒甯栧瓙錛岃緗ソJAVA涓枃鐜涔嬪悗錛屼綘灝卞彲浠ュ皢 Oracle涓殑JDK鍒犳帀錛岀劧鍚庡仛涓涓鍙瘋繛鎺ワ紝榪炴帴鍒頒綘鑷繁鐨凧DK涓婂氨濂戒簡銆傚懙鍛點傛垜涔熸槸鍏堢敤鍛戒護琛屽垱寤虹敤鎴峰拰緇勶紝浣嗘槸鍒涘緩鍑烘潵涔嬪悗錛屾病鏈? oracle鐨勭洰褰曪紝鎵浠ュ氨浣跨敤緋葷粺綆$悊涓殑鍒涘緩錛岀劧鍚庡氨娌′粈涔堥棶棰樹簡銆傛垜榪樻病鏈夎緗嚜鍚姩錛岀湅浜嗕綘鐨勬枃绔犲彲浠ヨ瘯涓璇曘?/span>

鏉ヨ嚜錛歨ttp://forum.ubuntu.org.cn/viewtopic.php?p=481122


]]>
Install Oracle 10g Express Edition on Debianhttp://www.tkk7.com/waterjava/archive/2007/09/24/147874.html鐙肩埍涓婄嫺鐙肩埍涓婄嫺Mon, 24 Sep 2007 11:03:00 GMThttp://www.tkk7.com/waterjava/archive/2007/09/24/147874.htmlhttp://www.tkk7.com/waterjava/comments/147874.htmlhttp://www.tkk7.com/waterjava/archive/2007/09/24/147874.html#Feedback0http://www.tkk7.com/waterjava/comments/commentRss/147874.htmlhttp://www.tkk7.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

鏂囦歡 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

榪欐椂鍙湅瑙佸悗鍙板惎鍔ㄤ簡寰堝oracle 榪涚▼

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
  • 鏉ユ簮錛歨ttp://wiki.huihoo.com/index.php?title=Install_Oracle_10g_Express_Edition_on_Debian


    ]]>oracle10g_linux_install_confighttp://www.tkk7.com/waterjava/archive/2007/07/10/129183.html鐙肩埍涓婄嫺鐙肩埍涓婄嫺Mon, 09 Jul 2007 23:00:00 GMThttp://www.tkk7.com/waterjava/archive/2007/07/10/129183.htmlhttp://www.tkk7.com/waterjava/comments/129183.htmlhttp://www.tkk7.com/waterjava/archive/2007/07/10/129183.html#Feedback0http://www.tkk7.com/waterjava/comments/commentRss/129183.htmlhttp://www.tkk7.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
    紜騫舵槸淇敼鐢熸晥
    $ source .bash_profile

    鏉ヨ嚜錛歨ttp://www.cngr.cn/article/63/390/2006/2006071919228.shtml



    鐙肩埍涓婄嫺 2007-07-10 07:00 鍙戣〃璇勮
    ]]>
    oracle9i for linux瀹夎http://www.tkk7.com/waterjava/archive/2007/07/10/129182.html鐙肩埍涓婄嫺鐙肩埍涓婄嫺Mon, 09 Jul 2007 22:58:00 GMThttp://www.tkk7.com/waterjava/archive/2007/07/10/129182.htmlhttp://www.tkk7.com/waterjava/comments/129182.htmlhttp://www.tkk7.com/waterjava/archive/2007/07/10/129182.html#Feedback0http://www.tkk7.com/waterjava/comments/commentRss/129182.htmlhttp://www.tkk7.com/waterjava/services/trackbacks/129182.html鐗╃悊鍐呭瓨: 1G
    浜ゆ崲絀洪棿: 1.5 GB鎴栬?鍊嶅唴瀛樺ぇ灝?br>/tmp 絀洪棿: 1 G
    杞歡鎵闇絀洪棿: 3 GB
    鏁版嵁搴撴枃浠? 1.5 GB

    2.linux鍙傛暟鏍囧噯鏈浣庤姹?鎸囦笉璀﹀憡鐨?
    #娉ㄩ噴:#琛ㄧず浣跨敤root鐢ㄦ埛鎿嶄綔,$琛ㄧず浣跨敤oracle 鐢ㄦ埛榪涜鎿嶄綔

    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
    鐒跺悗,搴旇媯鏌ヤ竴涓嬩笂闈㈢殑鎿嶄綔鏄惁姝g‘:
    # /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 涓篛racle鐢ㄦ埛璁懼畾Shell鐨勯檺鍒?br># vi /etc/security/limits.conf
    # 娣誨姞濡備笅鐨勮
    * soft nproc 2047
    * hard nproc 16384
    * soft nofile 1024
    * hard nofile 65536
    娣誨姞濡備笅鐨勮鍒?etc/pam.d/login 鏂囦歡錛?br>session required /lib/security/pam_limits.so
    緙栬緫 /etc/profile 鏂囦歡,娣誨姞濡備笅閮ㄥ垎錛?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 姝ゅ錛屾渶濂介獙璇佷竴涓?gcc鍜実libc鐨勭増鏈?瑕佹眰鏄痝cc-3.2.3-2 鎴栬呮洿楂?
    #gcc -v

    2.4 鍒涘緩鐢ㄦ埛鍜岀浉鍏崇殑緇?br># /usr/sbin/groupadd oinstall
    # /usr/sbin/groupadd dba
    # /usr/sbin/useradd -g oinstall -G dba oracle
    濡傛灉鍙槸嫻嬭瘯鐩殑鐨勮瘽錛屼笉鍒涘緩oinstall緇勪篃娌′粈涔? 涓嶈繃榪樻槸瑙勮寖涓鐐規瘮杈冨ソ.濡傛灉oracle 鐢ㄦ埛鍜宒ba緇勭瓑宸茬粡瀛樺湪錛屼綔閫傚綋鐨勮皟鏁村嵆鍙?

    2.5 媯鏌ュ茍璋冩暣鐜鍙橀噺
    鐧誨綍涓簅racle鐢ㄦ埛
    # su – oracle
    $ vi .bash_profile
    #娣誨姞濡備笅鍐呭,浣犵殑鍏蜂綋鍊煎簲璇ヤ笉浼氬拰榪欎釜瀹屽叏鐩稿悓.
    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 絳夌洰褰曞簲璇ュ緩绔嬪ソ騫跺仛鍚堥傜殑鎺堟潈
    #chown -R oracle /opt/oracle

    3 寮濮嬪畨瑁?0g
    鎵ц /install/runInstaller
    鎸夌収鐣岄潰鎻愮ず瀹夎鍗沖彲
    鏈濂芥寜鐓ч珮綰у畨瑁?br>楂樼駭瀹夎鐨勫ソ澶?
    a.瀛楃璁句負utf-8(榛樿鏄痠so-8859-1);
    b.媯鏌ラ厤緗?
    c.璁懼畾緋葷粺鐢ㄦ埛(榛樿鏄叧闂殑)
    絳夌瓑...

    4 榪愯oracle10g

    鍚姩鐩戝惉: lsnrctl start
    鍏抽棴鐩戝惉: lsnrctl stop

    榪涘叆sql鍛戒護鐜
    sqlplus
    /as sysdba

    鍚姩 startup
    鍏抽棴 shutdown immediate

    鏉ヨ嚜錛歨ttp://fsz521job.itpub.net/post/5606/68404



    鐙肩埍涓婄嫺 2007-07-10 06:58 鍙戣〃璇勮
    ]]>
    主站蜘蛛池模板: 亚洲不卡视频在线观看| 亚洲大片免费观看| 欧洲乱码伦视频免费国产| 国产精品免费视频网站| 亚洲youwu永久无码精品| 国产成人免费a在线视频app | 人人狠狠综合久久亚洲高清| 亚洲色大成网站www尤物| 免费看AV毛片一区二区三区| 国产精品亚洲精品| 啦啦啦中文在线观看电视剧免费版 | 亚洲精品国产综合久久久久紧 | 美女网站免费福利视频| 亚洲国产系列一区二区三区| 日本免费一区二区三区最新vr| 日韩成人精品日本亚洲| 亚洲黄黄黄网站在线观看| 日本免费A级毛一片| 亚洲色四在线视频观看| 手机在线看永久av片免费| 色天使色婷婷在线影院亚洲 | 亚洲午夜久久影院| 嫩草影院免费观看| 成人国产网站v片免费观看| 久久久亚洲欧洲日产国码农村| 国产成人免费高清激情明星| 亚洲妇女无套内射精| 中文字幕中韩乱码亚洲大片| 午夜精品一区二区三区免费视频| 亚洲一本之道高清乱码| 免费看男女下面日出水视频| 少妇性饥渴无码A区免费| 亚洲AV成人一区二区三区在线看| 五月天婷亚洲天综合网精品偷| 日韩精品免费视频| 亚洲精品无码一区二区| 国产V亚洲V天堂无码久久久 | 久久久久一级精品亚洲国产成人综合AV区| 国偷自产一区二区免费视频| 亚洲国产精品综合久久20| 国产亚洲成人在线播放va|