Oracle on Ubuntu Linux

http://blogs.oracle.com/toxophily/entry/installing_oracle_11g_db_on

http://www.linuxidc.com/Linux/2011-03/32807.htm

http://www.pythian.com/news/13291/installing-oracle-11gr2-enterprise-edition-on-ubuntu-10-04-lucid-lynx/

https://forums.oracle.com/forums/thread.jspa?threadID=954055

1.

Update Packages

apt-get update
apt-get update

apt-get install elfutils libaio1 libaio-dev libstdc++6-4.4-dev numactl pdksh sysstat unixODBC-dev unixODBC build-essential libaio1 gawk ksh libmotif3 alien libtool lsb-rpm

2.

Create Groups

groupadd oinstall
groupadd dba
groupadd nobody

usermod -g nobody nobody

3.

Create / Update oracle User

useradd -s /bin/bash -m -g oinstall -G dba oracle

passwd oracle

4.

The following command is required to successfully run the installer.

xhost local:oracle

5.

Configure Limits for oracle

sudo gedit /etc/security/limits.conf

Add :

oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536

6.

Configure System

sudo gedit /etc/sysctl.conf

Add :

fs.aio-max-nr = 1048576
fs.file-max = 6815744
kernel.shmall = 2097152
kernel.shmmax = 536870912
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
net.ipv4.ip_local_port_range = 9000 65500
net.core.rmem_default = 262144
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 1048586
net.ipv4.tcp_wmem = 262144 262144 262144
net.ipv4.tcp_rmem = 4194304 4194304 4194304

7.

Make Directories

mkdir -p /u01/app/oracle
chown -R oracle:oinstall /u01/app/oracle
chmod -R 775 /u01/app/oracle
mkdir -p /u01/app/oraInventory
chown -R oracle:oinstall /u01/app/oraInventory
chmod -R 775 /u01/app/oraInventory

8.

Link command to location expected by oracle installer

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

9

Run Installer

I assume here that the user has previously installed the oracle database. If not simply follow the default options when the database installer executes.

./runInstaller

https://localhost:1158/em

Invalid source path ‘../stage/Components/oracle.jdk/1.5.0.17.0/1/DataFiles’ specified for unzip.

问题,第二张盘没有解压

http://www.oracle.com/technetwork/developer-tools/sql-developer/downloads/index.html

http://www.oracle.com/technetwork/developer-tools/jdev/overview/index.html

mysql 123456

自启动

Post Install

Add the following to /etc/profile

export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=$ORACLE_BASE/product/11.2.0/dbhome_1
export ORACLE_OWNR=oracle
export
PATH=$PATH:$ORACLE_HOME/bin

Start Script

Create /etc/init.d/oracledb with the following contents:

#!/bin/bash
#
# Run-level Startup script for the Oracle Listener and Instances
# It relies on the information on /etc/oratab
#
export ORACLE_OWNR=oracle
export ORACLE_OWNER=oracle
export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=$ORACLE_BASE/product/11.2.0/dbhome_1
export PATH=$PATH:$ORACLE_HOME/bin

if [ ! -f $ORACLE_HOME/bin/dbstart -o ! -d $ORACLE_HOME ]
then
echo “Oracle startup: cannot start”
exit 1
fi

case “$1” in
start)
# Oracle listener and instance startup
echo -n “Starting Oracle: ”
su $ORACLE_OWNR -c “$ORACLE_HOME/bin/lsnrctl start”
su $ORACLE_OWNR -c “$ORACLE_HOME/bin/dbstart $ORACLE_HOME”
touch /var/lock/oracle
echo “OK”
;;
stop)
# Oracle listener and instance shutdown
echo -n “Shutdown Oracle: ”
su $ORACLE_OWNR -c “$ORACLE_HOME/bin/lsnrctl stop”
su $ORACLE_OWNR -c “$ORACLE_HOME/bin/dbshut $ORACLE_HOME”
rm -f /var/lock/oracle
echo “OK”
;;
reload|restart)
$0 stop
$0 start
;;
\*)
echo “Usage: `basename $0` start|stop|restart|reload”
exit 1
esac

exit 0

Execute :

cd /etc/init.d
update-rc.d oracledb defaults 99

The above will create links within the rc\*.d directories.

TNS:net service name is incorrectly specified

http://space.itpub.net/519536/viewspace-672034

SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC=(
(SID_NAME=orcl)
(GLOBAL_DBNAME=orcl)
(ORACLE_HOME=/u01/app/oracle/product/11.2.0/dbhome_1/)
)
)
)

NL-00303: syntax error in NV string

alert.log文件位置
unix下在:$ORACLE_BASE/admin/sid/bdump下
windows:%ORACLE_BASE%/admin/sid/bdump下

在使用emctl的时候碰到了ulimit: 25: bad number.的错误
这是因为Ubuntu默认把/bin/sh指向了dash,通过修改emctl脚本的头部,将/bin/sh改成/bin/bash即解决问题。

emctl stop dbconsole

发表评论

电子邮件地址不会被公开。 必填项已用*标注