上周在自己的ubuntu环境里安装好了oracle 11g, 特此把安装过程纪录下来,留作备忘录。
事前准备:
- 系统更新sudo
sudo apt-get update
sudo apt-get upgrade
- 安装系统所需要的packagesudo
sudo su -
apt-get install build-essential
apt-get install libaio1
apt-get install libaio-dev
apt-get install unixODBC
apt-get install unixODBC-dev
apt-get install pdksh
apt-get install expat
apt-get install sysstat
apt-get install libelf-dev
apt-get install elfutils
apt-get install lsb-cxx
apt-get install ksh
apt-get install libmotif3
apt-get install alien
apt-get install libtool
apt-get install lsb-rpm
- 为避免linking ctx/lib/ins_ctx.mk的编译错误,下载libstdc++5_3.3.6-25ubuntu1_i386.deb,并进行安装。
- 为避免编译中link错误,执行下面命令
sudo ln -s /usr/bin/awk /bin/awk
sudo ln -s /usr/bin/rpm /bin/rpm
sudo ln -s /usr/bin/basename /bin/basename
sudo ln -s /usr/lib/i386-linux-gnu/libc_nonshared.a /usr/lib
sudo ln -s /usr/lib/i386-linux-gnu/libpthread_nonshared.a /usr/lib
sudo ln -s /usr/lib/i386-linux-gnu/libstdc++.so.5 /usr/lib
sudo ln -s /usr/lib/i386-linux-gnu/libstdc++.so.6 /usr/lib
sudo ln -s /lib/i386-linux-gnu/libgcc_s.so.1 /lib
- 修改系统参数
sudo su -
#backup
cp /etc/sysctl.conf /etc/sysctl.original
vi /etc/sysctl.conf, 添加以下内容
# Oracle 11gR2 entries
fs.aio-max-nr=1048576
fs.file-max=6815744
kernel.shmall=2097152
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
kernel.shmmax=2147483648
Note: kernel.shmmax = max possible value, e.g. size of physical memory in bytes
#启动新的系统参数 Load new kernel parameters
sysctl -p
- 创建用户和组
sudo groupadd oinstall
sudo groupadd dba
sudo groupadd nobody
sudo usermod -g nobody nobody
sudo useradd -g oinstall -G dba -d /home/oracle -s /bin/bash oracle
sudo password oracle
mkdir /home/oracle
chown -R oracle:dba /home/oracle
- 修改/etc/security/limits.conf,添加以下内容
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536
- 创建oracle安装目录
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
开始正式安装:
- 以上边创建的oracle 用户login
- 执行以下命令开始安装
export LANG=C
#在安装目录下
./runInstaller
- 安装过程中,可能会遇到以下的编译错误
Error in invoking target 'agent nmhs' of makefile
'/u01/app/oracle/product/11.2.0/db_1/sysman/lib/ins_emagent.mk.'
See
'/u01/app/oraInventory/logs/installActions2012-03-11_06-59-43PM.log'
for details.
或者还有
Error in invoking target 'all_no_orcl' of makefile
'/u01/app/oracle/product/11.2.0/db_1/rdbms/lib/ins_rdbms.mk.'
See
'/u01/app/oraInventory/logs/installActions2012-03-11_06-59-43PM.log'
for details.
- 为解决上述编译错误,修改如下文件,然后再执行编译
sysman/lib/ins_emagent.mk:
变更前:
LDFLAGS=-Wl -o $@...
变更后:
LDFLAGS=-Wl,--copy-dt-needed-entries -o $@...
bin/genorasdksh:
变更前:
$LD SLD_RUNTIME -Wl $D_OPT $LD_OUT ...
变更后:
$LD SLD_RUNTIME -Wl,--no-as-needed $D_OPT $LD_OUT ...
srvm/lib/ins_srvm.mk:
变更前:
GETCRSHOME_LINKLINE=$(LINK) $(LDPATHFLAG)$(RDBMSLIB) $(CDEBUG) $(OPT) $(GETCRSHOME_OBJ1) -Wl
变更后:
GETCRSHOME_LINKLINE=$(LINK) $(LDPATHFLAG)$(RDBMSLIB) $(CDEBUG) $(OPT) $(GETCRSHOME_OBJ1) -Wl,--no-as-needed
network/lib/env_network.mk:
变更前:
TNSLSNR_LINKLINE=$(LINK) $(TNSLSNR_OFILES) -Wl $(LINKTTLIBS) ...
变更后:
TNSLSNR_LINKLINE=$(LINK) $(TNSLSNR_OFILES) -Wl,--no-as-needed $(LINKTTLIBS) ...
rdbms/lib/env_rdms.mk:
变更前:
ORACLE_LINKER=$(ADE_DEL_FILE_CMD) $(PURECMDS) gcc -Wl $(OLAPPRELINKOPTS) $(LDFLAGS) $(COMPSOBJS)
变更后:
ORACLE_LINKER=$(ADE_DEL_FILE_CMD) $(PURECMDS) gcc -Wl, --no-as-needed $(OLAPPRELINKOPTS) $(LDFLAGS) $(COMPSOBJS)
- 按照安装程序的提示,以root权限login,然后执行命令 /u01/app/oracle/product/11.2.0/db_1/root.sh
- 创建启动程序 vi /etc/init.d/oracledb, 加入以下内容
#!/bin/bash
export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=/u01/app/oracle/product/11.2.0/dbhome_1
export ORACLE_OWNR=oracle
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
参考资料
- 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=1115155
- https://forums.oracle.com/forums/thread.jspa?threadID=2336240
- http://blog.arkzoyd.com/2011/11/oracle-database-11g-and-ubuntu-1110.html
分享到:
相关推荐
Ubuntu12.04(64bit) server Oracle 11G(最新问题解决)
NULL 博文链接:https://benjaminyu.iteye.com/blog/1738161
亲测可用》》》》》》》》》》》》 Navicat 11.0.10 64bit for windows7 windows10 数据库支持:Mysql SQLSERVER postgresql SQLite Oracle
Ubuntu 64位 官网上最新Java安装包 下载地址: https://javadl.oracle.com/webapps/download/AutoDL?BundleId=241526_1f5b5a70bf22433b84d0e960903adac8
hadoop-eclipse-plugin-1.0.2.jar,使用Eclipse 3.7+Oracle JDK 1.6.0_26 64bit打包,在Win7 64bit + Eclipse 3.7 64bit中和Ubuntu 32bit+ Eclipse 3.7.2 32Bit中测试通过。
网站源代码使用 docker 容器(例如,类似 ubuntu 的发行版)在您的主机上运行 oracle-dba.ru: 安装和 docker-compose。进行更改的选项Docker 和 docker-compose 应该已经安装好了。 更远: $ cd ~$ mkdir oracle-...
64bit cuda9.0 cudnn7.1 源码安装tensorflow 1.安装java8 sudo add-apt-repository ppa:webupd8team/java //添加java源 sudo apt-get update sudo apt-get install oracle-java8-installer java -version //test 2....
java8 看不到源码安装指南 本指南有望帮助您在 Ubuntu 16.04 服务器上设置 Oracle JRE 8、Tomcat 9、GeoServer ...oracle-java8-installer ...oracle-java8-set-default ...如果在安装过程中出现哈希不匹配
Gramado (c) is a 32 bit multithreaded operating system. 内核功能。 分页。 线程。 IDE PATA,e1000 NIC,串行端口,ps2鼠标和键盘。 FAT16文件系统。 Userland功能。 在窗口服务器上工作。 (gws) 在...
This document describes how to create, test and configure a Linux image with Custom IP UIO Driver using PetaLinux 2014.4 on Ubuntu 14.04 LTS (64-bit). Ubunto 14.04 LTS (64-bit) Guest is running Oracle...
system with custom IP and interrupt support for the Avnet MicroZed development board using Vivado 2014.4 on Ubuntu 14.04 LTS (64-bit). Ubunto 14.04 LTS (64-bit) Guest is running Oracle VM VirtualBox ...
一个微服务框架,为高效的大数据处理提供异构计算环境。 文档 参考文档位于 。 构建笔记 CLARA 需要 Java 8 JDK。 Ubuntu 支持 PPA: $ sudo apt-get install software-properties-common 从以下位置安装 Oracle ...
便当 Bento是一个封装模板以构建基本框的项目。 模板的子集已构建并发布到Vagrant Cloud上的。 这些已发布的框用作的默认框。...为所有可能的提供者(同时)构建Debian 10.7 32bit box $ cd packer_te
彩虹工人快速入门说明为了使用 drttor.jar 你应该确保你有: 64 位 Linux 操作系统(在 Ubuntu 14.04 上测试) Oracle JDK 8 要启动 jar 文件,请使用命令行java -Djava.library.path=dist -jar drttor.jar ...
Ubuntu - http://www.webupd8.org/2012/01/install-oracle-java-jdk-7-in-ubuntu-via.html Debian - http://www.webupd8.org/2012/06/how-to-install-oracle-java-7-in-debian.html 存储库- git clone https://b
Ubuntu - http://www.webupd8.org/2012/01/install-oracle-java-jdk-7-in-ubuntu-via.html Debian - http://www.webupd8.org/2012/06/how-to-install-oracle-java-7-in-debian.html 存储库- git clone https://b
Bit Torrent For Dummies.pdf Blackberry For Dummies 2006.pdf Blackberry Pearl For Dummies Feb 2007.pdf Blackboard For Dummies.pdf Blocking Spam & Spyware For Dummies.pdf Blogging For Dummies.pdf Blues ...