锘??xml version="1.0" encoding="utf-8" standalone="yes"?>
榪欎袱涓剼鏈鍏堣鍙杘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]$
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.
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.
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.
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
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).
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
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
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
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:
SEMMSL
- semaphores per arraySEMMNS
- max semaphores system-wide (SEMMNI*SEMMSL
)SEMOPM
- max operations per semop callSEMMNI
- max number of semaphore arraysTo 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:
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
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
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
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.
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.
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.
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!)
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.
And some more coffee.
And even more coffee.
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.
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:
Just hit OK to get out the installer. The basic installation is… not over yet.
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.
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
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