Ubuntu14.04lts64 bit installation oracle11g

Source: Internet
Author: User

Oracle does not state that it supports Ubuntu installation, so the environment needs to be prepared for a successful installation. Ps, I retry several times but the 12c is not installed successfully, so 11g is installed.

Environment preparation
    • ubuntu14.04 Desktop 64-bit
      My desktop is GNOME, Chinese version.
    • JDK Ready (mine is jdk1.7.60)
    • To Configure the system environment variables:
      (used to ensure that some scripts execute properly during installation, executed under users with sudo privileges)
$sudo-s /usr/bin/awk /bin/awk    $sudo-s /usr/bin/rpm /bin/rpm    $sudo-s /usr/bin/basename /bin/basename# 直接链接这个目录过来,不建议使用参考文章1的中链接多个文件的方式$sudo-s /usr/lib/x86_64-linux-gnu /usr/lib64$cd /lib64$sudo-s /lib/x86_64-linux-gnu/libgcc_s.so.1 .
    • install the necessary packages
      Please refer to the installation packages listed in articles 1 and 2 below, or skip this step and reload as needed.
    • set up Oracle user group and installation directory
      I still use the reference article 2 method to install Oracle using a standalone Oracle user.
$sudo groupadd oinstall$sudo groupadd dba$sudo#目录修改为自己机器的实际目录$sudo-s /bin/bash oracle$sudo passwd oracle$sudo chown -R oracle:oinstall /opt/oracle
    • Setting System Parameters
      Please refer to the following reference article 1, mainly sysctl and limit configuration.
    • setting user Environment variables
      According to Oracle, it is not recommended to configure. Profile or. BASHRC before installation, which is not a reference article. You can configure the. Profile or. BASHRC to enable Oracle after the installation is successful. We recommend that you configure only the following variables:
$su - oracle$vi .profile# Oracle SettingsTMP=/tmp;export TMPTMPDIR=$TMP;export TMPDIR# 直接生效$source .profile
Download ORACLE11GR2

To Oracle's official download oracle11g linux64-bit version
A total of two compressed packages:

    • Linux.x64_11gR2_database_1of2.zip
    • Linux.x64_11gR2_database_2of2.zip

Unzip to a directory such as:/data/downloads/database, give permission.

$cd /data/downloads/database/install$chmod +x *.sh .oui unzip$sudo chown -R oracle:oinstall /data/downloads/database
Performing the installation

I use the reference article 1, the way to specify the JRE (installer is the Java write interface), or the installation interface is garbled, even if the export lang=c, etc. can be recalled in English, but the interface is not friendly. There are two ways to open the installation interface, one is to switch directly to the Oracle user and login to desktop, the other is not to switch the current interface, execute the following command:

$xhost +$su - oracle$export DISPLAY=:0

Then execute the following command, open the installation interface, and start the installation.

$cd /data/downloads/database$chmodx +x runInstaller# 修改为自己系统对应的jre路径$./runInstaller -jreloc /usr/lib/jvm/java-7-oracle/jre/

The next step is to do it, and my advice is to use the default option to install it and modify it to the same directory on your machine.

Error handling during installation

The installation process will not be smooth sailing, there will be errors pop-up. My experience is that the installation process error, do not hurry, but also do not click to confirm the cancellation or skip ( keep the popup box do not close ), carefully review the error prompt, follow the corresponding log file to find the specific error, and then processing.
I encountered the error, in reference to article 2 have been resolved, suggest pop-up error focus reference article 2. Here is a brief list of my examples.

    • Issue 1: Unable to find [email protected]_2.14 (libstdc++5)
      The workaround is to download the new Libstdc++5 library.
      Download from here, direct an archive package to open extract, and extract the old file (using the sudo permission account) under/usr/lib/x86_64-linux-gnu.
      Article 2 also describes a download link, to find the 64-bit version below to download down. Then switch to an account with sudo privileges to perform the installation:
$sudo dpkg -i libstdc++5_3.3.6-27.2ubuntu1_amd64.deb
    • Issue 2: error encountered while executing ' link binaries ' (some makefile)
      The workaround is to open a console and execute the script below to execute the corresponding script based on the pop-up error on the. mk file, and then try again, or you can do it together the first time the error occurs, and then try again.
$exportoracle_home=/opt/oracle/product/11.2.0/dbhome_1$sed-I.' S/^\ (\s*\$ (mk_emagent_nmectl) \) \s*$/\1-lnnz11/g ' $ORACLE _home/sysman/lib/ins_emagent.mk$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
    • If you have other errors, see reference article 2. When you're done, it's ready to install.
Installation Complete

After the installation is complete, you will also execute two scripts (or a script, the installation interface will be prompted at the end), just take out the sudo execution.

# 执行第1个,如果安装界面有提示,就sudo它# 执行第2个脚本,根据安装界面给出的路径$sudo /opt/oracle/product/11.2.0/dbhome_1/root.sh
    • Finally the installation program will perform the establishment of listening (1521), create sample libraries, start EM, etc., please be patient, the interface may be garbled, do not control it, the last pop-up interface point at the bottom of the button.
Improve user Environment variables

Complete the configuration of the Oracle environment variables and execute them under the Oracle home directory:

$vi .profileexport ORACLE_HOSTNAME=localhost;export ORACLE_BASE=/opt/oracle;export ORACLE_HOME=$ORACLE_BASE/product/11.2.0/dbhome_1;export ORACLE_SID=orcl;export PATH=$PATH:$ORACLE_HOME/binexport LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ORACLE_HOME/libexport NLS_LANG="Simplified chinese_china.al32utf8"# 配置直接生效$source .profile
Start Oracle

After the installation is complete, Oracle data has been successfully enabled. However, after restarting the server, the library does not automatically restart the load (since the start reader can self-configure), the following describes the manual operation.

    • Start/Stop Monitoring
# 登录到oracle用户$su - oracle# 启动# 可以使用netstat -lntp看一看1521商品是否打开$lsnrctl start# 停止$lsnrctl stop# 也可使用$dbstart$ORACLE_HOME$dbshut$ORACLE_HOME# 可用以下命令配置监听,注意必须进入图形界面$export LANG=C# hostname处尽量填主机名称,不用IP,用IP也要更换端口$netmgr
    • Open/Close Library
$sqlplus / as sysdba# 启动SQL>startup;# 停止SQL>shutdown immediate;

start/close em
The use of the Web to manage the database server is convenient, and can be enabled if required.

# 前提是ORACLE_HOSTNAME要设置正确(命令中也有提示)$emctl stop dbconsole

Access Address:
Https://localhost:1158/em

Reference articles

Reference article 1
Reference Article 2

Ubuntu14.04lts64 bit installation oracle11g

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.