Skip to content

Установка Oracle 12с на Debian

1) Oracle XE Debian repository

deb http://oss.oracle.com/debian unstable main non-free  

2)

addgroup –system oinstall  
addgroup –system dba  
adduser –system –ingroup oinstall –shell /bin/bash oracle  
adduser oracle dba

3)

fs.file-max = 65536  
fs.aio-max-nr = 1048576  

semaphores: semmsl, semmns, semopm, semmni  
kernel.sem = 250 32000 100 128  

 (Oracle recommends total machine Ram -1 byte)  
kernel.shmmax = 2147483648  
kernel.shmall = 2097152  
kernel.shmmni = 4096  
net.ipv4.ip_local_port_range = 1024 65000  
vm.hugetlb_shm_group = 111  
vm.nr_hugepages = 64  
sysctl -p /etc/sysctl.d/oracle.conf

4)

oracle soft nproc 2047  
oracle hard nproc 16384  
oracle soft nofile 1024  
oracle hard nofile 65536  
—-  
/etc/security/limits.d/oracle.conf
5)
/etc/pam.d/su  
enable pam_limits.so

6)
Create a directory structure required to install Oracle DataBase.

mkdir -p /opt/oracle/product/12.1.0.2  
mkdir -p /opt/oraInventory  
chown -R oracle:dba /opt/oracle/  
chown -R oracle:dba /opt/oraInventory

7)

apt-get install build-essential binutils libcap-dev gcc g++ libc6-dev ksh libaio-dev make libxi-dev libxtst-dev libxau-dev libxcb1-dev sysstat rpm xauth
8)
oracle@oracle:~$ unzip linuxamd64_12XXX_database_1of2.zip  
oracle@oracle:~$ unzip linuxamd64_12XXX_database_2of2.zip

9)

export ORACLE_HOSTNAME=localhost  
export ORACLE_OWNER=oracle  
export ORACLE_BASE=/opt/oracle  
export ORACLE_HOME=/opt/oracle/product/12.1.0.2/dbhome_1  
export ORACLE_UNQNAME=orcl  
export ORACLE_SID=orcl  
export PATH=$PATH:$ORACLE_HOME/bin  
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib/x86_64-linux-gnu:/bin/lib:/lib/x86_64-linux-gnu/:/usr/lib64

ORACLE_OWNER: User with permission on Oracle files.  
ORACLE_BASE: Directory that will store the distinct Oracle Services.  
ORACLE_HOME: Directory that will store the Oracle database.  
ORACLE_UNQNAME: Unique name of database.  
ORACLE_SID: Service Identifier of Listener.  
PATH: Path to binary files.  
LD_LIBRARY_PATH: Path to library.

10)

passwd oracle

11)

Connect ssh by user oracle to server

13)

/home/oracle/database/runInstaller -IgnoreSysPreReqs

Errors

  1. Error
    DISPLAY not set. Please set the DISPLAY and try again.
    

делаем:

export DISPLAY=192.168.112.187:0.0

снова запуск:

2)
Could not initialize class sun.awt.X11.XToolkit

apt-get install openjdk-7-jre-headless  
Не порешает, но надо.

3)
Добиться чтобы работал X11Forwarding

/home/oracle/database/runInstaller -IgnoreSysPreReqs

В процесс инсталяции:

Ошибка в логе:

/usr/bin/ld: cannot find /usr/lib64/libpthread_nonshared.a  
Решение:
sudo ln -s /usr/lib/x86_64-linux-gnu /usr/lib64

На этапе запуска рутовых скриптов потребовалось:

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

oracle01