oracle 在Ubuntu 上的安装经历

一开始都跟网上人说的一样,但是我是个初学者,中间连续装个好几次,每次都有问题,最终在摸索中,终于安装成功。期间参考了这篇文章http://blog.163.com/chhj_292/blog/static/12229472008722115035888/



[quote]1.软件包安装
apt-get install gcc make binutils lesstif2 libc6 libc6-dev rpm libmotif3 libaio libstdc++5 alien[/quote]

2.创建用户和组:(创建oracle用户,如果没有创建则在(用户和组)里边创建oracle用户)
addgroup oinstall 
addgroup dba
addgroup nobody
useradd -g oinstall -G dba -p passwd -d /home/oracle -s /bin/bash oracle
usermod -g nobody nobody

3. 以root用户执行下边的命令(我的oracle安装在/opt/oracle)
mkdir -p /opt/oracle
mkdir -p /opt/oracle
chown -R oracle:oinstall /opt/ora*
chmod -R 775 /opt/ora


4.环境变量的设置
su oracle(上边创建的 oracle用户)
cd /home/oracle
sudo nano ./.bashrc


在里边粘贴下边的
# oracle 10g 
export ORACLE_BASE=/opt/oracle
export ORACLE_HOME=$ORACLE_BASE/product/10.2.0/db_1
#export PATH=$ORACLE_HOME/bin:$ORACLE_HOME/Apache/Apache/bin:$PATH
export ORACLE_OWNER=oracle
export ORACLE_SID=orcl (SID很重要,要记住跟安装的一样)
export ORACLE_TERM=xterm
# Edit paths
#export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/opt/oracle/lib/stubs/:$LD_LIBRARY_PATH
export PATH=$ORACLE_HOME/bin:$PATH (oracle_home要设置对了,要不在终端里边找不到sqlplus)


5.创建.bashrc文件(默认ubuntu下是没有这个文件的) 他处于/home/oracle/目录下

粘贴一下内容:
 # Begin ~/.bash_profile 
# Written for Beyond Linux From Scratch
# by James Robertson <jameswrobertson@earthlink.net>
# updated by Bruce Dubbs <bdubbs@linuxfromscratch.org>
# Personal environment variables and startup programs.
# Personal aliases and functions should go in ~/.bashrc. System wide
# environment variables and startup programs are in /etc/profile.
# System wide aliases and functions are in /etc/bashrc.
append () {
# First remove the directory
local IFS=':'
local NEWPATH
for DIR in $PATH; do
if [ "$DIR" != "$1" ]; then
NEWPATH=${NEWPATH:+$NEWPATH:}$DIR
fi
done
# Then append the directory
export PATH=$NEWPATH:$1
}
if [ -f "$HOME/.bashrc" ] ; then
source $HOME/.bashrc
fi
if [ -d "$HOME/bin" ] ; then
append $HOME/bin
fi
unset append
# End ~/.bash_profile


6.设置内核参数
修改/etc/sysctl.conf
添加一下内容
#Oracle Settings 
#By Chenghaojun 2008-08-19 16.53
kernel.shmall = 2097152
kernel.shmmax = 3147483648
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
fs.file-max = 65536
net.ipv4.ip_local_port_range = 1024 65000


7.修改/etc/security/limits.conf
添加以下内容:
 #By chenghaojun 2008-08-19 17.18 
soft nproc 2047
hard nproc 16384
soft nofile 1024
hard nofile 65536


8.建了软连接
ln -s /usr/bin/awk /bin/awk 
ln -s /usr/bin/rpm /bin/rpm
ln -s /usr/bin/basename /bin/basename


9redhat欺骗
nano /etc/redhat-release 
添加以下内容:Red Hat Linux release 3.1 (drupal)


10.先切换用户到oracle 然后安装(要不装完后会报错,权限不足):
export LANG=en_US

11
./runInstall



12.在安装的时候,一定要注意自己的环境变量的设置, 已经在安装过程中注意 用户组的选择。
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值