Reference article: http://tutorialforlinux.com/2016/03/09/ how-to-install-oracle-11g-r2-database-on-ubuntu-14-04-trusty-lts-64bit-easy-guide-managing-db-troubleshootings/
Reference article: http://m.oschina.net/blog/318293
I. Get the resource bundle, download the 64-bit version of the website yourself, a total of two compressed packages
: http://www.oracle.com/technetwork/database/enterprise-edition/downloads/index.html
Two. Installing dependent packages
1apt-Get update2Apt-getInstallAlien Autoconf Automake autotools-Dev binutils doxygen3Elfutils Expatgawk GCC GCC-multilib G++-multilib libstdc++6: I386 Ksh LessLibtiff44Libtiff4-dev lib32z1 libaio1 libaio-dev libc6-dev libc6-dev-i386 libc6-i3865Libelf-dev Libltdl-dev Libmotif4 libodbcinstq4-1libodbcinstq4-1: i3866Libpthread-stubs0 Libpth-dev libstdc++5Lsb-cxx Make 7Pdksh openssh-server rlwrap rpm sysstat unixodbc unixodbc-dev x11-Utils8ZLIBC libglapi-mesa:i386 libglu1-mesa:i386 libqt4-opengl:i3869Libpthread-workqueue0 Libpthread-workqueue-dev libzthread-2.3-2libzthread-DevTenLibpthread-stubs0-dev
Where package Libtiff4, Libtiff4-dev and Libpthread-stubs0 may not be available in the source, the following methods can be installed
$sudosu $echo'deb Http://cz.archive.ubuntu.com/ubuntu precise Main universe' >>/etc/apt/sources.list.d/extra.list // Add source apt- Get updateaptinstall libtiff4 libtiff4-Devmv// Remove Source Apt-get Update
Three. Configuring System environment variables
// linking Binaries Ln -s/usr/bin/awk /bin/awkln -s/usr/bin/rpm/bin/rpmln -s/usr /bin/basename /bin/basename//linking LibrariesLN -s/usr/lib/ x86_64-linux-gnu/usr//lib64ln -s/lib/x86_64-linux-gnu/libgcc_s.so. 1 .
Four. Configure the Oracle user group
Groupadd-g502Oinstallgroupadd-G503Dbagroupadd-G504Opergroupadd-G505Asmadminuseradd-U502-G oinstall-g dba,asmadmin,oper-s/bin/bash-m OraclepasswdOracle//Set your own password//Create a folder to install Oraclemkdir-p/u01/app/oracle/product/11.2.0///Create a folderChown-R oracle:oinstall/u01//change a user group to a folderchmod-R775/u01//Set folder permissions//----Unzip the downloaded compressed package to the specified folder and set permissionsCd/home/[myuser]/downloads//The path where you compress the packageUnzipLinux_11gr2_database_1of2.ZipUnzipLinux_11gr2_database_2of2.ZipChown-R Oracle:oinstall DatabaseMVDatabase/tmp
Five. Configure the . BASHRC for Oracle Users
//Enter the account of the Oracle user and modify the. bashrc file in its directorysu-Oracle//Switch to Oracle accountVim ~/. BASHRC//Add the following line# Oracle Settingstmp=/tmp; export Tmptmpdir=$TMP; export Tmpdiroracle_hostname=[HOSTNAME]; export Oracle_hostnameoracle_unqname=db11g; export Oracle_unqnameoracle_base=/u01/app/Oracle; Export Oracle_baseoracle_home= $ORACLE _base/product/11.2.0/dbhome_1; export Oracle_homeoracle_sid=[DBSID]; export Oracle_sidpath=/usr/sbin: $PATH; export Pathpath= $ORACLE _home/bin: $PATH; export Pathld_library_path= $ORACLE _home/lib:/lib:/usr/lib:/usr/lib64; export Ld_library_pathclasspath= $ORACLE _home/jlib: $ORACLE _home/rdbms/jlib; export CLASSPATH//where HOSTNAME =127.0.0.1 dbsid= you to create your own SID of the database (you can not change it first)
source ~/.bashrc 使配置生效
Six. Install Oracle
Xhost +//switch to root account to assign Oracle to Xwindow
Su-oracle//Switch to Oracle
Export display=:0//Display graphical interface at installation
Cd/tmp/database // Enter the directory you just unzipped chmod// add x permission to the file under directory ./runinstaller // Execute the installer to use your own JRE installation./runinstaller-jreloc/usr/java/[your JRE path]
Go to the Setup program
Do not set email
The following package fail selection ignores all
===================================================================
==================================================================
//error when installing to 84%, do not panic can be resolved with the following code//ins_ctx.mk error prompt, direct contiue jump over//The back also returns the wrong://Make file '/......emagent.mk ' ERROR//Workaround://open a different terminal to Oracle user, type the command line:sed-I.'s/^\ (\s*\$ (mk_emagent_nmectl) \) \s*$/\1-lnnz11/g'$ORACLE _home/sysman/lib/ins_emagent.mk//Click on the retry on the installation screen to continue.//Similarly, you will be prompted four times to follow the following command linesed-I.'s/^\ (\ $LD \ $LD _runtime\) \ (\ $LD _opt\)/\1-wl,--no-as-needed \2/g'$ORACLE _home/bin/Genorasdkshsed-I.'s/^\ (\s*\) \ (\$ (Ocrlibs_default) \)/\1-wl,--no-as-needed \2/g'$ORACLE _home/srvm/lib/ins_srvm.mksed-I.'s/^\ (tnslsnr_linkline.*\$ (tnslsnr_ofiles) \) \ (\$ (linkttlibs) \)/\1-wl,--no-as-needed \2/g'$ORACLE _home/network/lib/env_network.mksed-I.'s/^\ (oracle_linkline.*\$ (oracle_linker) \) \ (\$ (pl_flags) \)/\1-wl,--no-as-needed \2/g'$ORACLE _home/rdbms/lib/env_rdbms.mk
// you will be prompted to execute two files when the installation is complete // follow its prompts to switch to the root account and then go to make a path execution. // Press ENTER when you encounter what you want to enter
================================================================================
Seven. Oracle Startup and Configuration
// the command to use // Create a database // Configure listener--Configure ServiceName // Open Listener // Stop Listener // View listener status sqlplus/as sysdba // link Database startup // Open Database
//The second-to-last line may be reported no service when viewing the listening status//the solution is toCD $ORACLE _home/network/Admin, modify the following listener.ora://Add the following fieldsSid_list_listener =(Sid_list=(Sid_desc=(Global_dbname=ORCL) (Sid_name=ORCL )))//where ORCL is the name of the database you created//Sqldeveloper doesn't even have an oracle problem .Workaround: Use the netmgr command to open the post-Oracle Net Configuration->local->listeners->listener->add address, protocal:tcpIP address at Port host:oracle:1521
Ubuntu 14.04 64bit Installation Oracle 11g R2