ubuntu 13.04 安装oracle
来源:互联网 发布:linux shell getopt 编辑:程序博客网 时间:2024/05/05 07:39
注:原文出自:http://www.techienote.com/tag/oracle-database-11g-r2-on-ubuntu-12-04
Following is the how to for installing Oracle Database 11g R2 on Ubuntu 12.10 / 12.04
In case you want to install Oracle Database Express edition on Ubuntu 12.10 follow below post
How to install Oracle Database Express Edition on Ubuntu
Installing Dependencies
To install dependencies, run
sudo apt-get update
sudo apt-get install gcc make binutils gawk x11-utils rpm build-essential libaio1 libaio-dev libmotif4 libtool expat alien ksh pdksh unixODBC unixODBC-dev sysstat elfutils libelf-dev binutils lesstif2 lsb-cxx libstdc++5
We need to create some softlinks to start the installation. To do so run the following commands,
sudo ln -sf /bin/bash /bin/sh
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/libpthread_nonshared.a /usr/lib/libpthread_nonshared.a
sudo ln -s /usr/lib/i386-linux-gnu/libc_nonshared.a /usr/lib/libc_nonshared.a
sudo ln -s /lib/i386-linux-gnu/libgcc_s.so.1 /lib/libgcc_s.so.1
sudo ln -s /usr/lib/i386-linux-gnu/libstdc++.so.6 /usr/lib/libstdc++.so.6
Also we need to add oracle user and oinstall, dba, nobody group. Run following commands,
sudo addgroup oinstall
sudo addgroup dba
sudo addgroup nobody
sudo usermod -g nobody nobody
sudo useradd -g oinstall -G dba -p password -d /home/oracle -s /bin/bash oracle
sudo mkdir /home/oracle
sudo chown -R oracle:dba /home/oracle
We need to do changes in start-up script, run following commands as root
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
Now we will create the directory for installation, and changes it owner to oracle. Run following commands to do the same
sudo mkdir -p /u01/app/oracle
sudo chown -R oracle:dba /u01
We also need to modify the kernel parameter, to do so run following commands as root
echo “#”>> /etc/sysctl.conf
echo “# Oracle 11gR2 entries”>> /etc/sysctl.conf
echo “fs.aio-max-nr=1048576″ >> /etc/sysctl.conf
echo “fs.file-max=6815744″ >> /etc/sysctl.conf
echo “kernel.shmall=2097152″ >> /etc/sysctl.conf
echo “kernel.shmmni=4096″ >> /etc/sysctl.conf
echo “kernel.sem=250 32000 100 128″ >> /etc/sysctl.conf
echo “net.ipv4.ip_local_port_range=9000 65500″ >> /etc/sysctl.conf
echo “net.core.rmem_default=262144″ >> /etc/sysctl.conf
echo “net.core.rmem_max=4194304″ >> /etc/sysctl.conf
echo “net.core.wmem_default=262144″ >> /etc/sysctl.conf
echo “net.core.wmem_max=1048586″ >> /etc/sysctl.conf
echo “kernel.shmmax=1073741824″ >> /etc/sysctl.conf
Note: kernel.shmmax = max possible value, e.g. size of physical memory in bytes. In my case machine is having 2GB so we are specifying 1GB. Adjust the parameter as per your configuration
Load new kernel parameters, by running following,
sudo sysctl -p
We have to change shell configuration, to do the same run following commands as root user,
cp /etc/security/limits.conf /etc/security/limits.conf.original
echo “#Oracle 11gR2 shell limits:”>>/etc/security/limits.conf
echo “oracle soft nproc 2048″>>/etc/security/limits.conf
echo “oracle hard nproc 16384″>>/etc/security/limits.conf
echo “oracle soft nofile 1024″>>/etc/security/limits.conf
echo “oracle hard nofile 65536″>>/etc/security/limits.conf
Download Oracle 11g R2 database from Oracle Download Center for linux.
I have downloaded both the zip in /home/oracle. We need to extract both the zip to start the installation. To unzip run,
cd /home/oracle
unzip linux_11gR2_database_1of2.zip
unzip linux_11gR2_database_2of2.zip
Now we will start the installation. You can start the installation from /home/oracle/database.
Login as a oracle user.
su oracle
Go to the binaries and start the installation as a oracle user,
cd /home/oracle
chmod 777 -R database
cd database
./runInstaller -ignoreSysPrereqs
ignoreSysPrereqs
Next we go though the installation (I don’t have the “Oracle Support Password” so just skip in here):
Oracle Base: /u01/app/oracle
SofewareLocation: /u01/app/oracle/product/11.2.0/dbhome_1
In “Create Inventory”, it should default as below:
Inventory Directory: /u01/app/oraInventory
oraInventory Group Name: oinstall
In “Select Configure Type”, choose “General Purpose / Transaction Processing”:
(IMPORTANT!) In “Specify Database Identifiers”, configure as below:
Global database name: orcl.techienote.com
Oracle Service Identifier (SID): orcl
In “Specify Configuration Options”, configure as below:
Memory -> Enable Automatic Memory Management:
TRUE
Character sets: Use Unicode (AL32UTF8)
In “Specify Management Options”, choose “Use Database Control for database management” but keep other else empty:
In “Specify Database Storage Options”, choose “File System” where:
Specify database file location: /u01/app/oracle/oradata
In “Specify Recovery Options”, choose “Do not enable automated backups”:
In “Specify Schema Passwords”, I am a bit lazy so choose “Use the same password for all accounts” (don’t do this in production server!):
In “Privileged Operating System Groups”, confirm as below:
Database Administrator (OSDBA) Group: dba
Database Operator (OSOPER) Group: oinstall
In “Preform Prerequisite Checks”, just simply ignore all warning message (since we are using Debian but not Oracle officially supported OS):
So just confirm everything in “Summary”:
And now let’s go for a coffee break
Now following the instructions and run the following commands with “root” user:
/u01/app/oraInventory/orainstRoot.sh/u01/app/oracle/product/11.2.0/dbhome_1/root.sh
Ok you get it!
Confirm with installation progress
In previous screen the installer mentioned that we can access “Enterprise Manager Database Control URL” from https://localhost:1158/em, so now let’s open the browser and test it with following account:
User Name: SYS
Password: your_secret_password Connect As: SYSDBA
Once login it should show as below:
打开一个terminal,运行一个命令就ok了
sed -i 's/^\(\s*\$(MK_EMAGENT_NMECTL)\)\s*$/\1 -lnnz11/g' $ORACLE_HOME/sysman/lib/ins_emagent.mk
然后在图形界面点击‘Retry’就能继续安装了。
打开一个新的终端,输入如下四个命令:
sed -i 's/^\(TNSLSNR_LINKLINE.*\$(TNSLSNR_OFILES)\) \(\$(LINKTTLIBS)\)/\1 -Wl,--no-as-needed \2/g' $ORACLE_HOME/network/lib/env_network.mk
sed -i 's/^\(ORACLE_LINKLINE.*\$(ORACLE_LINKER)\) \(\$(PL_FLAGS)\)/\1 -Wl,--no-as-needed \2/g' $ORACLE_HOME/rdbms/lib/env_rdbms.mk
sed -i 's/^\(\$LD \$LD_RUNTIME\) \(\$LD_OPT\)/\1 -Wl,--no-as-needed \2/g' $ORACLE_HOME/bin/genorasdksh
sed -i 's/^\(\s*\)\(\$(OCRLIBS_DEFAULT)\)/\1 -Wl,--no-as-needed \2/g' $ORACLE_HOME/srvm/lib/ins_srvm.mk
成功安装后就能通过sqlplus来访问oracle了.
$ su oracle # 切换到oracle用户
$ sqlplus /nolog
如果报没有sqlplus命令 就将sqlplus文件拷贝到/bin中
sudo cp app/oracle/product/11.2.0/dbhome_1/bin/sqlplus /bin/
然后再次执行 $ sqlplus /nolog
就能成功进入
- ubuntu 13.04 安装oracle
- ubuntu oracle client 安装
- ubuntu下安装oracle
- oracle vm ubuntu 安装
- ubuntu server 安装 oracle
- Ubuntu安装Oracle
- ubuntu安装oracle
- ubuntu下安装oracle
- ubuntu oracle安装
- ubuntu 安装 oracle java
- Ubuntu 安装oracle
- Ubuntu安装Oracle InstantClient
- ubuntu 安装oracle-jdk7
- Ubuntu安装Oracle客户端
- ubuntu oracle客户端安装
- Ubuntu 安装Oracle JDK
- Ubuntu 安装 Oracle JDK
- ubuntu安装oracle客户端
- [翻译Joel On Software]Unicode/Unicode
- ArrayList
- 9个offer,12家公司,35场面试,从微软到谷歌,应届计算机毕业生的2012求职之路
- ImportError: The _imaging C module is not installed错误解决记录
- 向大家推荐博士数学论坛
- ubuntu 13.04 安装oracle
- PADS2007中SCH与PCB做了修改怎么反标注到对方----本人总结
- LibSVM中错误:OSError: [WinError 193] %1 不是有效的 Win32 应用程序
- Code Fragment-简单的打印时间的操作
- Sizeof与Strlen的区别与联系
- 核函数(Kernels)
- TOJ 3030 ZOJ 1140 HDU 1083 Courses / 二分图
- Fdemo
- 任意输入不高于20个数并求平均值