Install Oracle 11gR2 on Ubuntu Server 12.4.0

Related references:

http://www.techienote.com/how-to-install-oracle-database-11g-r2-on-ubuntu-12-04/

http://www.linuxidc.com/Linux/2011-12/48931.htm

http://www.cnblogs.com/dyllove98/archive/2013/06/16/3138761.html

http://blog.csdn.net/idber/article/details/9039857

System environment:

64 Ubuntu operating system 12.4.0

  1. Installation dependencies

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

  1. Create some soft links

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/x86_64-linux-gnu/libc_nonshared.a /usr/lib64/libc_nonshared.a

sudo ln -s /usr/lib/x86_64-linux-gnu/libpthread_nonshared.a /usr/lib64/libpthread_nonshared.a

sudo ln -s /usr/lib/x86_64-linux-gnu/libstdc++.so.6 /usr/lib64/libstdc++.so.6

sudo ln -s /lib/x86_64-linux-gnu/libgcc_s.so.1 /lib64/libgcc_s.so.1

  1. Create users and groups

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

  1. Change the startup script (execute the following command and script as root user)

mkdir /etc/rc.d

for i in 0 1 2 3 4 5 6 S

do ln -s /etc/rci.d /etc/rc.d/rci.d

done

Note: Steps 2 and 4 create file links to make Ubuntu’s directory structure consistent with Red Hat (because Oracle officially supports Red Hat but not Ubuntu).

  1. Modify the run level of the system to 5 (default is 2)

vim /etc/init/rc-sysinit.conf

Set env DEFAULT_RUNLEVEL=2

Change to env DEFAULT_RUNLEVEL=5

Note: After installation, you can modify it back to the original default value 2. You can use the command "runlevel" to view the current run level, or use the command "sudo init 5" to temporarily change the run level to 5.

  1. Modify the system configuration file sysctl.conf

Add the following line to /etc/sysctl.conf:

Oracle 11gR2 entries

kernel.shmall = 2097152

kernel.shmmax = 2147483648

kernel.shmmni = 4096

kernel.sem = 250 32000 100 128

fs.file-max = 6815744

fs.aio-max-nr = 1048576

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

Then execute sudo sysctl -p

Remarks:

fs.file-max --> The maximum number of file handles, indicating the number of files that can be opened in the Linux system, the default is 98063

kernel.shmall --> indicates the total amount of shared memory that the system can use at one time, the default value is 2097152, usually no need to modify

kernel.shmmax --> defines the maximum size of the shared memory segment (in bytes), the default is 32M, for oracle, the default value is too low

kernel.shmmni = 4096 -->(4K) Set the maximum number of shared memory segments system-wide, the default value is 4096, usually do not need to be changed.

kernel.sem --> 4 data respectively correspond to SEMMSL SEMMNS SEMOPM SEMMNI, indicating the set semaphore, the default is 250 32000 32 128 (cat /proc/sys/kernel/sem)

net.core.rmem_default -->The default is 126976

net.core.rmem_max -->The largest TCP data receiving buffer, the default is 131071

net.core.wmem_default -->The default is 126976

net.core.wmem_max --> The largest TCP data sending buffer, the default is 131071

net.ipv4.ip_local_port_range -->ipv4 port value range, the default is 32768 61000

fs.aio-max-nr --> 65536 by default

  1. Modify the system configuration file limits.conf

Add the following lines to /etc/security/limits.conf

Oracle 11gR2 shell limits

oracle soft nproc 2048

oracle hard nproc 16384

oracle soft nofile 1024

oracle hard nofile 65536

  1. Create files that deceive the Oracle installer system type

sudo vim /etc/RedHat-release

The file content is set to the following line to trick the installer into thinking that the system is RedHat:

Red Hat Linux release 4.1

  1. Copy the installation files of Oracle11R2 to UbuntuServer

Place the two downloaded installation files in the /home/oracle directory

cd /home/oracle

unzip linux.x64_11gR2_database_1of2.zip

unzip linux.x64_11gR2_database_2of2.zip

  1. Log in to the oracle user to install

su oracle

cd /home/oracle

chmod 777 -R database

cd database

. /runInstaller -ignoreSysPrereqs

  1. The configuration of the graphical interface (mostly keep the default)

After executing the oracle installation command

The first step is Configure Security Updates, remove I wish to receive security updates via My Oracle Support. Click Next.

The second step is Installation Option. Select Create and configure a database in Selection Installation Option.

The third step is to select Server Class in System Class.

The fourth step is to select Single instance database installation in Grid Selection.

The fifth step is to select Advanced install in Install Type.

Then the language is set, here is English.

Select the version, here select Standard Edition.

Choose the installation path and keep the default here (/home/oracle/app/oracle).

Create Inventory keeps the default.

Select General Purpose / Transaction Processing in Select Configure Type.

Keep the Database Identifier by default.

Configure as follows in Specify Configuration Options:

Memory -> Enable Automatic Memory Management: TRUE

Character sets: Use Unicode (AL32UTF8)

Select the default Use Database Control for database management in Specify Management Options.

Select the default File System in Specify Database Storage Options, and keep the default path.

Backup and Recovery keep the default.

Schema Password sets the password.

Privileged Operating System Groups keep the default, namely:

Database Administrator (OSDBA) Group: dba

Database Operator (OSOPER) Group: oinstall

Then there is Preform Prerequisite Checks. (There may be some errors, don’t bother about them, because we are using Debian system, which is not supported by Oracle official website, so some errors are normal)

Then there is Summary

Encountered an error reference:

http://my.oschina.net/farces/blog/279434

http://lvstone.blog.163.com/blog/static/1773601512012102914439982/

My errors are:

  1. Error in invoking target 'agent nmhs' of makefile '/home/oracle/app/oracle/product/11.2.0/dbhome_1/bin/sysman/lib/ins_emagent.mk'

Solution:

sed -i 's/^\(\s*\$(MK_EMAGENT_NMECTL)\)\s*$/\1 -lnnz11/g' $ORACLE_HOME/sysman/lib/ins_emagent.mk

  1. Error in invoking target 'all_no_orcl' of makefile '/home/oracle/app/oracle/product/11.2.0/dbhome_1/bin/rdbms/lib/ins_rdbms.mk'.

Solution:

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

  1. Error in invoking target 'install' of makefile '/home/oracle/app/oracle/product/11.2.0/dbhome_1/bin/network/lib/ins_net_server.mk'.

Solution:

vim $ORACLE_HOME/network/lib/ins_net_server.mk

The revised content is:

tnslsnr: $(S0NSGL) $(SNSGLP) $(NSGLPNP)

(SILENT)(ECHO) " - Linking $(TNSLSNR)"

$(RMF) $@

$(TNSLSNR_LINKLINE)

itnslsnr: tnslsnr

itnslsnr:

Recommended Posts

Install Oracle 11gR2 on Ubuntu Server 12.4.0
Install OpenSSL 1.0.2 on Ubuntu Server 14.04
Install Oracle Java8 on Ubuntu
Install Chef server workstation on Ubuntu 18.04
Install Gnome and VNC on Ubuntu Server
How to install Bacula Server on Ubuntu 14.04
How to install Zabbix on Ubuntu 16.04 Server
install vscode on ubuntu18
Install Redis on Ubuntu
Install R4 on ubuntu20
Install nvtop on Ubuntu 18.04
Install postgresql-10 on Ubuntu 18.04
Install docker on Ubuntu
Install Docker on ubuntu18.04
Install nodejs10 on Ubuntu16
Install mysql on Ubuntu 14.04
Install Django on ubuntu
Install Pytorch+CUDA on Ubuntu 16.04
Install Python3 on Ubuntu 14.04
Install rJava on Ubuntu18
Install JDK10+ on Ubuntu
Install Python3 on Ubuntu 16.04
Install KDE on Ubuntu16.04.2
ubuntu install nginx server
Install Docker on Ubuntu18
Install Python3.7 on Ubuntu
install oracle on centos
Install flashplayer on Ubuntu
How to install Squid proxy server on Ubuntu 18.04
How to install Oracle Java 14 on Ubuntu Linux
Docker practice (1): install Docker on Ubuntu 16.04
Install QQ robot on Ubuntu 16.04
Install Python 3.7 on Ubuntu 18.04 LTS
Install Android Studio on Ubuntu
Configure tomcat on ubuntu server
Install scrapy framework on ubuntu
Install Mysql offline on Ubuntu
Install Odoo 11 stack on Ubuntu 16.04
Install Go locale on Ubuntu16
Install common software on Ubuntu 16.04
install virtualbox on centos server
Install Docker on Ubuntu 18.04 offline
Install Nginx server on CentOS 7
Install and configure Mono production environment on Ubuntu Server
How to install Ruby on Ubuntu 20.04
Build Nginx-RTMP live server on ubuntu
How to install Java on Ubuntu 20.04
How to install VirtualBox on Ubuntu 20.04
How to install Elasticsearch on Ubuntu 20.04
How to install Protobuf 3 on Ubuntu
Install Tenda u12 driver on Ubuntu
How to install Nginx on Ubuntu 20.04
How to install Apache on Ubuntu 20.04
How to install Git on Ubuntu 20.04
How to install Node.js on Ubuntu 16.04
Install and configure MySQL on Ubuntu
How to install Vagrant on Ubuntu 20.04
How to install Bacula-Web on Ubuntu 14.04
Install botan2 encryption library on ubuntu
How to install PostgreSQL on Ubuntu 16.04
How to install Git on Ubuntu 20.04