`
qm4050
  • 浏览: 73578 次
  • 性别: Icon_minigender_1
  • 来自: 上海
文章分类
社区版块
存档分类
最新评论

Ubuntu 10.10 安装Oracle 11g

阅读更多

在Ubuntu 10.04 LTS上顺利安装Oracle 11G.下面说说大概的步骤.

  (

  first , let root login , to do this:

  sudo passwd root

  System->Adminstrator->Login Window -> Security -> allow local system administrator login Checked!

  newsea.

  )

  1.确保安装了以下程序:

  sudo apt-get install build-essential libaio1 gawk ksh libmotif3 alien libtool lsb-rpm

  (mybe return a error code ,but can continu ; newsea. )

  2.

  cd /bin

  ln -sf bash /bin/sh

  3.增加用户和组

  addgroup oinstall

  addgroup dba

  addgroup nobody

  useradd -g oinstall -G dba -p passwd -d /home/oracle -s /bin/bash oracle

  usermod -g nobody nobody

  4.

  mkdir /home/oracle

  chown -R oracle:dba /home/oracle

  ln -s /usr/bin/awk /bin/awk

  ln -s /usr/bin/rpm /bin/rpm

  ln -s /usr/bin/basename /bin/basename

  5.

  mkdir /etc/rc.d

  for i in 0 1 2 3 4 5 6 S ; do ln -s /etc/rc$i.d /etc/rc.d/rc$i.d ; done

  mkdir -p /opt/ora11

  chown -R oracle:dba /opt

  6.编辑/etc/sysctl.conf,增加以下内容:

  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 65535

  net.core.rmem_default = 1048576

  net.core.rmem_max = 1048576

  net.core.wmem_default = 262144

  net.core.wmem_max = 262144

  7.编辑/etc/security/limits.conf,增加以下内容:

  oracle soft nproc 2047

  oracle hard nproc 16383

  oracle soft nofile 1023

  oracle hard nofile 65535

  8.编辑/etc/pam.d/login,增加以下内容:

  session required /lib/security/pam_limits.so

  session required pam_limits.so

  9.执行:

  sysctl -p

  10.

  su - oracle

  以上命令需以root用户执行,接下来切换至oracle用户.

  11.切换至安装目录,开始安装.我选择了英语作为安装时显示的语言.

  export LANG=en_CN

  ./runInstaller

  (

  出错:Exception in thread "main" java.lang.InternalError:can't connect to x11 window server using "localhost:0.0" at

  解决: sudo xhost +

  如果显示值不正确,把 系统 ->系统管理 ->登录窗口->远程->样式: 与本地相同。export DISPLAY = 127.0.0.1:0.0 (觉着这一步最管事。) 即可。

  newsea.

  )

  (

  选高级,路径用默认:/home/oracle/oraInventory ,指定组名 dba , 企业版, 自定义, OracleBase:/home/oracle/app/oracle, Oracle Name : OraDb11g_home1 , Oracle Path : /home/oracle/app/oracle/product/11.1.0/db_1 ,全选, 全选,默认选中 OSDBA Group : dba , osoper group : oinstall , osasm group :oinstall , 选中 create database ,。net configuration assistant : default check, LISTENER ,TCP ,1521 。 Database configureation assistant :

  customer, golbal database name : orcl ,SID: orcl , password: 选同样的密码: newsea . 以后默认选: file system , 内存自定义: 160 + 30 .

  )

  12.安装过程中提示运行以下两个脚本:

  orainstRoot.sh

  root.sh

  12.安装过程中检测到系统未装有GLIBC环境,忽略后,未发现对安装和运行有多大影响.

  13.切记,安装时选择自定义,并且选择数据库的字符集为 ZHS16GBK!

  因为忘记了这个选项,我只好删掉数据库,重新建了一个,浪费了半个小时的时间.

  PS.ORACLE 11g好像不支持更改数据库的字符集了...或是我没有找到正确的方法

  14.安装完成后,数据库的连接和查询异常之慢,GOOGLE之,然后尝试着把网络的DNS服务器全给删了,解决.

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics