Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Installation of oracle12c in ubuntu14.04 and its error solution

2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

1. Replace the apt source

Cp / etc/apt/sources.list / etc/apt/sources.list.bakvim / etc/apt/sources.listcat / etc/apt/sources.listdeb http://mirrors.163.com/ubuntu/ trusty main restricted universe multiversedeb http://mirrors.163.com/ubuntu/ trusty-security main restricted universe multiversedeb trusty main restricted universe multiversedeb trusty-updates main restricted universe multiversedeb http://mirrors.163.com/ubuntu/ trusty-proposed main restricted universe multiversedeb http://mirrors.163.com/ Ubuntu/ trusty-backports main restricted universe multiversedeb-src http://mirrors.163.com/ubuntu/ trusty main restricted universe multiversedeb-src http://mirrors.163.com/ubuntu/ trusty-security main restricted universe multiversedeb-src http://mirrors.163.com/ubuntu/ trusty-updates main restricted universe multiversedeb-src http://mirrors.163.com/ubuntu/ trusty-proposed main restricted universe multiversedeb-src http://mirrors.163.com/ubuntu/ trusty-backports main restricted universe multiverse

two。 Update the system

Apt-get updateapt-get dist-upgrade-yinit 6 apt-get dist-upgrade-y

3. If ubuntu is not a desktop version, install the desktop

Apt-get install x-window-system-core gnome-core-y

4. Install the oracle dependency package

Apt-get-y install alien binutils build-essential cpp-4.4 debhelper grubbing apt-get 4.4 gawk gcc-4.4 gcc-4.4-base gettext html2text lib32z1 lib32ncurses5 lib32bz2- 1.0 intltool-debian ksh lib32bz2-dev lib32z1-dev libaio-dev libaio1 libbeecrypt7 libc6 libc6-dev libc6-dev-i386 libelf-dev libelf1 libltdl-dev libltdl7 libmotif4 libodbcinstq4-1 libodbcinstq4-1:i386 libqt4-core libqt4-gui libsqlite3-0 libstdc++5 libstdc++6 libstdc++6-4.4-dev lsb lsb-core lsb-cxx lsb-desktop lsb-graphics lsb-qt4 make Odbcinst pax po-debconf rpm rpm-common sysstat unixodbc unixodbc-dev unzip

5. Create users and user groups

Addgroup oinstalladdgroup dbaaddgroup nobodyusermod-g nobody nobodyuseradd-g oinstall-G dba-p password-m-d / home/oracle-s / bin/bash oraclechown-R oracle:dba / home/oraclemkdir-p / u01/app/oraclemkdir-p / u01/binarieschown-R oracle:dba / U01

6. Set oracle user password and create redhat identity

Echo oracle | passwd-- stdin oracle (not supported by ubuntu) echo 'Red Hat Linux release 6' | sudo tee-a / etc/redhat-release

7. Create a redhat directory structure

Mkdir / usr/lib64 ln-s / etc/ etc/rc.d ln-s / lib/x86_64-linux-gnu/libgcc_s.so.1 / lib64/ ln-s / usr/bin/awk / bin/awk ln-s / usr/bin/basename / bin/basename ln-s / usr/bin/rpm / bin/rpm ln-s / usr/lib/x86_64-linux-gnu/libc_nonshared.a / usr/lib64/ ln-s / usr/lib/x86_64-linux-gnu / libpthread_nonshared.a / usr/lib64/ ln-s / usr/lib/x86_64-linux-gnu/libstdc++.so.6 / lib64/ ln-s / usr/lib/x86_64-linux-gnu/libstdc++.so.6 / usr/lib64/cp / etc/security/limits.conf / etc/security/limits.conf.originalecho "# Oracle 12C shell limits:" | tee-a / etc/security/limits.confecho "oracle soft nproc 2048" | tee-a / etc/security/limits.confecho "oracle Hard nproc 16384 "| tee-a / etc/security/limits.confecho" oracle soft nofile 1024 "| tee-a / etc/security/limits.confecho" oracle hard nofile 65536 "| tee-a / etc/security/limits.confecho" # "| tee-a / etc/sysctl.confecho" # Oracle 12C entries "| tee-a / etc/sysctl.confecho" fs.aio-max-nr=1048576 "| tee-a / etc/sysctl.confecho" fs.file-max=6815744 "| tee-a / etc/sysctl.confecho" kernel. Shmall=2097152 "| tee-a / etc/sysctl.confecho" kernel.shmmni=4096 "tee-a / etc/sysctl.confecho" kernel.sem=250 32000 100128 "| tee-a / etc/sysctl.confecho" net.ipv4.ip_local_port_range=9000 65500 "| tee-a / etc/sysctl.confecho" net.core.rmem_default=262144 "| tee-a / etc/sysctl.confecho" net.core.rmem_max=4194304 "| tee-a / etc/sysctl.confecho" net.core.wmem_default=262144 "| tee-a / etc/sysctl.confecho "net.core.wmem_max=1048586" | tee-a / etc/sysctl.confecho "kernel.shmmax=1073741824" | tee-a / etc/sysctl.confsysctl-p # to make the above configuration effective mkdir / etc/rc.d For i in 0 1 2 3 4 56 S; do sudo ln-s / etc/rc$i.d / etc/rc.d/rc$i.d; done

Install the VNC service:

Apt-get-y install vnc4servervncpasswd # set the vnc login password

-

Vim / homehort oracle.vncUnixstartupplementUnixexport XKL_XMODMAP_DISABLE=1 unset SESSION_MANAGER unset DBUS_SESSION_BUS_ADDRESS gnome-panel & gnome-settings-daemon & metacity & nautilus & gnome-terminal &-- chmod 777 / root/.vnc/xstartup

# you need to change the last line "x-window-manager &" to our own Ubuntu graphical interface service, so what? It depends on what kind of desktop environment you Ubuntu. Ubuntu has desktop environments such as gnome, KDE, Unity and so on.

For gnome desktops, change it to gnome-session &

For KDE desktops, change it to startkde &

If it is a Unity desktop, first go to / usr/share/gnome-session/sessions/ to see the name of the desktop session

Vncserver: 1 # start and shut down the vnc service as an oracle user

Vncserver-kill: 1

# download from vnc client

Https://www.realvnc.com/download/viewer/windows/

Configure variables for the oracle environment

Vim / home/oracle/.bashrcexport ORACLE_BASE=/u01/binariesexport ORACLE_HOME=$ORACLE_BASE/product/11.2.0/dbhome_1export ORACLE_SID=orclexport ORACLE_UNQNAME=orclexport LD_LIBRARY_PATH=$ORACLE_HOME/libexport NLS_LANG=AMERICAN_AMERICA.ZHS16GBKexport PATH=$ {PATH}: ${ORACLE_HOME} / bin/

Change OpenJDK to Oracle JDK

Cd / opttar xf jdk-7u67-linux-x64.tar.gzln-s jdk1.7.0_67/ / javavim / etc/profile#set java environmentexport JAVA_HOME=/opt/javaexport JRE_HOME=/opt/javaexport CLASSPATH==.:$CLASSPATH:$JAVA_HOME/lib:$JRE_HOME/libexport PATH=$PATH:$JAVA_HOME/bin:$JRE_HOME/binsource / etc/profilejava-version

8. Install oracle

Cd / u01/binaries/unzip linuxamd64_12102_database_1of2.zipunzip linuxamd64_12102_database_2of2.zipinit 6 # reboot to the desktop to login the oracle user to VNC, execute the following command export DiSPLAY:0.0xhost + cd / u01/binaries/database/./runInstaller-ignoreSysPrereqs

# configure boot boot

Vim / etc/orataborcl:/u01/binaries/product/11.2.0/dbhome_1:Yvim / etc/profileexport ORACLE_BASE=/u01/app/oracleexport ORACLE_HOME=/u01/app/oracle/product/12.1.0/dbhome_1export ORACLE_OWNR=oracleexport PATH=$PATH:$ORACLE_HOME/binexport ORACLE_SID=orclvim / etc/rc.localsu-oracle-lc "/ u01/binaries/product/11.2.0/dbhome_1/bin/dbstart" su-oracle-lc "/ u01/binaries/product/11.2.0/dbhome_1/bin/lsnrctl stop"

Error 1: VNC cannot open the desktop

Solution: configure the configuration file in the VNC login user's home directory

Error 2: java.lang.main classnotfind

Solution: configure variables for the oracle environment

Vim / home/oracle/.bashrc

Export ORACLE_BASE=/u01/binaries

Export ORACLE_HOME=$ORACLE_BASE/product/11.2.0/dbhome_1

Export ORACLE_SID=orcl

Export ORACLE_UNQNAME=orcl

Export LD_LIBRARY_PATH=$ORACLE_HOME/lib

No matter what encoding is configured for export NLS_LANG=AMERICAN_AMERICA.ZHS16GBK # unicode encoding, the format must be written correctly (language_territory.charset language _ region and character set), otherwise the installation will fail or no configuration will be made (not tried)

Export PATH=$ {PATH}: ${ORACLE_HOME} / bin/

Error 3: prompt DISPLAY not set. Please set the DISPLAY and try again .

Resolve:

Export DISPLAY=:0.0

Xhost +

After executing the above command, switch to the oracle user to perform the installation again.

Error 4:

Resolution: missing package

Apt-get-y install alien binutils build-essential cpp-4.4 debhelper grubbing apt-get 4.4 gawk gcc-4.4 gcc-4.4-base gettext html2text lib32z1 lib32ncurses5 lib32bz2- 1.0 intltool-debian ksh lib32bz2-dev lib32z1-dev libaio-dev libaio1 libbeecrypt7 libc6 libc6-dev libc6-dev-i386 libelf-dev libelf1 libltdl-dev libltdl7 libmotif4 libodbcinstq4-1 libodbcinstq4-1:i386 libqt4-core libqt4-gui libsqlite3-0 libstdc++5 libstdc++6 libstdc++6-4.4-dev lsb lsb-core lsb-cxx lsb-desktop lsb-graphics lsb-qt4 make Odbcinst pax po-debconf rpm rpm-common sysstat unixodbc unixodbc-dev unzip

Error 5: prompt insufficient disk space on this volume for the selected oracle home

Solution: insufficient disk space in the installation directory

Error 6: unable to start the installation interface and no error message

Resolve:

Log in to VNC as oracle, and execute the following command

Export DiSPLAY:0.0

Xhost +

Error 7:

Resolve:

Http://www.techienote.com/install-oracle-12c-on-ubuntu/

Error 8: lsnrctl 1070

Resolve:

Vim / etc/profile

Export ORACLE_BASE=/u01/app/oracle

Export ORACLE_HOME=/u01/app/oracle/product/12.1.0/dbhome_1

Export ORACLE_OWNR=oracle

Export PATH=$PATH:$ORACLE_HOME/bin

Export ORACLE_SID=orcl

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report