Oracle 11g for Ubuntu installation a __oracle

Source: Internet
Author: User
Tags addgroup chmod dba mkdir

The Oracle 11g database provides a Linux x86 version, but the supported Linux versions are only red Hat,novell and Solaris, Debian and Ubuntu are not supported, so installing under Ubuntu is relatively cumbersome, Please follow the method step-by-step installation, do not be impatient, every step must be taken seriously (I began to pretend to be a little anxious, with their own method to simplify a few steps, the results ....) Installation failed-_-b). My system: Ubuntu 8.04 Desktop (32-bit) Memory: 896M (originally 1G, divided 128M to video card) This article is "Installing Oracle 11g on Ubuntu 8.04 LTS (Hardy Heron)" article translation and Annotation, is written by a foreign ox, the original: Http://www.pythian.com/blogs/968/installing-oracle-11g-on-ubuntu-804-lts-hardy-heron If you do not want to read the E-text can see my translation: Black text is the original translation, the red Word is my annotation, blue for the terminal input and output (reprinted annotated Source:) A total of 9 steps: Step 1 Download and install the Ubuntu 8.04 Hardy Heron (x86-32 bit) version. Slightly. Step 2 Downloads Oracle 11g:download Oracle 11g for Linux (x86, 32-bit). Now do not rush to extract, a while I will tell you where the decompression. Step 3 modifies the default settings for x server, the system-> Administration-> Login window for the Point menu, the Security tab, and cancel the Deny TCP connections to the Xserver (Deny TCP connection to x server), reboot Xserver (or reboot the system). Then on the terminal input: user@hardy:~$ xhost +127.0.0.1 127.0.0.1 being added to access control List Step 4 opens the terminal and converts it to Superuser: (Note that this is in sudo su-and It's not sudo-s for a reason: sudo su-converts a user to Superuser and a new session (an empty session) instead of the current session as Sudo-sDeliver a new superuser, reducing the potential impact and harm of environment variables. user@hardy:~$ sudo su-[sudo] password for user:root@hardy:~# apt-get update ... root@hardy:~# apt-get ... root@hardy:~# Reboot Step 5 installs some of the necessary tools with apt: user@hardy:~$ sudo su-[sudo] password for user:root@hardy:~# apt-get Build-essential libaio1 gawk ksh libmotif3 alien Libtool ... lsb-rpm step 6 after loading those tools, all we need to do is modify some of the Ubuntu/b In/sh default connection, do not skip this step, otherwise there will be many errors installed. root@hardy:~# cd/bin root@hardy:/bin# ls-l/bin/sh lrwxrwxrwx 1 root root 4 2008-04-28 19:59/bin/sh-> Dash Root@har dy:/bin# ln-sf bash/bin/sh root@hardy:/bin# ls-l/bin/sh lrwxrwxrwx 1 root root 4 2008-05-01 22:51/bin/sh-> bash as Do you want to know why Ubuntu uses the dash as the default shell, and look at this: a detailed explanation of the why dash is the defaults system shell. Step 7 adds users and groups, and modifies some configurations. This step is very important. If you are not very sure, do not change casually. (added line number for ease of interpretation): root@hardy:/bin# CD root@hardy:~# pwd/root root@hardy:~# addgroup oinstall Group ' adding L ' (GID 1001) ... Done. Modified root@hardy:~# AddGroup dba adding Group ' DBA ' (GID 1002) ... Done. root@hardy:~# addgroup Nobody adding group ' nobody ' (GID 1003) ... Done. root@hardy:~# usermod-g Nobody nobody-root@hardy:~# useradd-g oinstall-g dba-p password-d/home/oracle-s/bin/ Bash Oracle root@hardy:~# passwd-l Oracle Password changed. root@hardy:~# mkdir/home/oracle root@hardy:~# chown-r oracle:dba/home/oracle-root@hardy:~# ln-s/usr/bin/awk /bin/awk root@hardy:~# ln-s/usr/bin/rpm/bin/rpm root@hardy:~# ln-s/usr/bin/basename/bin/basename : ~# mkdir/etc/rc.d root@hardy:~# for i in 0 1 2 3 4 5 6 S; Do ln-s/etc/rc$i.d/etc/rc.d/rc$i.d; Done root@hardy:~# mkdir-p/u01/app/oracle root@hardy:~# chown-r oracle:dba/u01-root@hardy:~# lines 04-12: increased Add the users and groups we need line 13: Let the nobody user's group become nobody so that the Oracle installer will not go wrong. The Ubuntu default nobody group is Nogroup. lines 14-18: Create an Oracle user and lock down users to prevent others from logging on to the system through an Oracle user. Note that the Oracle user's home directory is not the same as oracle_home. lines 19-23: Create a connection to some of the tools required by the Oracle installer. Because the Oracle installer is red HAt the ready, so some of the tools are not the same location as Ubuntu. Finally, on lines 24-25, creates the Oracle_base directory. Step 8 modifies some system default values. These modifications will increase the number of system file descriptors, increase the shared memory size, and modify some network subsystem parameters. Whether these changes will affect your system is unknown to me. Add the following to the end of the/etc/sysctl.conf file: Fs.file-max = 65535 Kernel.shmall = 2097152 Kernel.shmmax = 2147483648 Kernel.shmmni = 4096 Kernel.sem = 32000 128 net.ipv4.ip_local_port_range = 1024 65535 Net.core.rmem_default = 1048576 Net.core.rmem_ma x = 1048576 Net.core.wmem_default = 262144 Net.core.wmem_max = 262144 Add the following to the end of the/etc/security/limits.conf file: Oracle Soft N Proc 2047 Oracle Hard nproc 16383 Oracle Soft nofile 1023 Oracle hard Nofile 65535 in order to force the use of what we added just now, we add the following to the/etc/pam.d/lo Gin end of File: Session required/lib/security/pam_limits.so session required pam_limits.so and then through the command: sysctl-p let just add the thing to take effect: root@hardy:~# sysctl-p KERNEL.PRINTK = 4 4 1 7 kernel.maps_protect = 1 fs.inotify.max_user_watches = 524288 vm.mmap_min_a DDR = 65536 Net.ipv4.conf.default.rp_filter = 1 Net.ipv4.conf.all.rp_filter = 1 Fs.file-max = 65535 Kernel.shmall = 209715 2 KErnel.shmmax = 2147483648 Kernel.shmmni = 4096 Kernel.sem = 32000-128 net.ipv4.ip_local_port_range = 1024 65535 NE T.core.rmem_default = 1048576 Net.core.rmem_max = 1048576 Net.core.wmem_default = 262144 Net.core.wmem_max = 262144 root@h ardy:~# Step 9 Now we will unzip the ORACLE11G installation package that we just downloaded to the/home/oracle/install/directory. Then enter the directory, set the display parameters, start the installation: root@hardy:~# cd/home/oracle root@hardy:/home/oracle# chown-r oracle:dba Install :/home/oracle# su-oracle Your account has expired; Please contact your system Administrator Su:user account has expired (ignored) oracle@hardy:~$ export display=127.0.0.1:0 .0 oracle@hardy:~$ pwd/home/oracle oracle@hardy:~$ ls-l Total 4 drwxr-xr-x 6 Oracle DBA 4096 2007-09-18 18:50 Install or acle@hardy:~$ CD Install oracle@hardy:~/install$ ls-l total drwxr-xr-x oracle DBAs 4096 2007-08-06 16:02 Doc Drwxr-x R-x 5 Oracle DBA 4096 2007-08-03 13:28 install drwxr-xr-x 2 Oracle DBA 4096 2007-09-18 18:52 response-rwxr-xr-x 1 Oracle DBA 2911 2007-08-03 13:28 runinStaller drwxr-xr-x Oracle DBA 4096 2007-08-03 13:27 stage-rw-r--r--1 Oracle DBA 4835 2007-08-06 18:19 welcome.html or acle@hardy:~/install$./runinstaller-ignoresysprereqs entered the same installer for Oracle after entering the above command (OUI), don't worry, Continue with this step-by-step installation of this article: note: After the Oui installation, it is not really complete installation, but also the final finishing work (in the end), and it is necessary to do the work. Point (Next) next. Modify specify operating System group name: "DBA" and then click "Next". Follow the diagram above to set the next point. Select "Enterprise Edition" and then next. Antu settings, next. Continue to the next step. Wait for the system to check, and don't worry about errors and warnings. Tick all non-"succeeded" that are checked to the next step. Select "Install Software only", and so on after loading and then through the DBCA to install the database, next. You can also choose Create a database in this step to install the databases. Set all groups to: DBA, next. Now you can point to "Install": The process will wait a long time, and the system slows down, so you'd better take a book and have a cup of coffee. Sometimes the system will become very slow, like to crash, this do not tube, and so he slowly installed. In this step do not remember to point "OK", need to do the following: (another terminal, with sudo su-switch to superuser) root@hardy:~#/u01/app/orainventory/orainstroot.sh changing Permissions Of/u01/app/orainventory to 770. changing groupname of/u01/app/orainventory to DBA. The execution of the script is complete root@hardy:~#/u01/app/oracle/product/11.1.0/db_1/root.sh Running Oracle 11g root. SH script ... The FolloWing environment variables are set as:oracle_owner= ORACLE oracle_home=/u01/app/oracle/product/11.1.0/db_1 Enter the ful L pathname of the Local bin directory: [/usr/local/bin]: copying Dbhome to/usr/local/bin ... Copying oraenv To/usr/local/bin ... Copying coraenv To/usr/local/bin ... Creating/etc/oratab file ... Entries'll be added to The/etc/oratab file as needed by database Configuration Assistant when a The database is created Fin Ished running generic part of root.sh script. Now product-specific root actions would be performed. Finished product-specific root actions. root@hardy:~# Well, you can click "OK" when you finish this. Ann Point "Exit" Exit Oui, now can congratulate you, Oui installation complete: But don't worry, remember that we still have to do the finishing work. To set access permissions for database folders and Oratab files: (Be sure to add this, otherwise there will be some minor problems in use) $ sudo chown-r oracle:dba/u01/app/oracle/* $ sudo chmod-r g+w/u01/app/o racle/* $ sudo chown oracle:dba/etc/oratab $ sudo chmod g+w/etc/oratab Then, add the following sentence in the/etc/profile file: Export oracle_home=/u0 1/app/oracle/product/11.1.0/db_1 export path= $PATH:/u01/app/oracle/product/11.1.0/db_1/bIn the Create an Oracle 11g database startup script, the name can be called: oracledb, create a file under/u01/app/oracle/product/11.1.0/db_1/bin: OracleDB, Content: #!/bin/bash # #/etc/init.d/oracledb # # Run-level Startup script for the Oracle Listener and instances # IT relies on the information o N/etc/oratab Export oracle_base=/u01/app/oracle export oracle_home=/u01/app/oracle/product/11.1.0/db_1 export ORACLE _ownr=oracle export path= $PATH: $ORACLE _home/bin if [!-F $ORACLE _home/bin/dbstart-o!-d $ORACLE _home] then echo "Oracl E startup:cannot start "Exit 1 fi Case" "in Start" # Oracle Listener and Instance startup Echo-n "Starting Oracle:" Su $ORACLE _ownr-c "$ORACLE _home/bin/lsnrctl start" su $ORACLE _ownr-c "$ORACLE _home/bin/dbstart $ORACLE _home" Touch/var /lock/oracle echo "OK";; STOP) # Oracle Listener and instance shutdown echo-n shutdown Oracle: "su $ORACLE _ownr-c" $ORACLE _home/bin/lsnrctl sto P "su $ORACLE _ownr-c" $ORACLE _home/bin/dbshut $ORACLE _home "Rm-f/var/lock/oracle echo" OK "; Reload|restart) $ stop $ start;;*) echo "Usage: ' basename $ ' start|stop|restart|reload" Exit 1 ESAC Exit 0 Modify script for executable: root@hardy:~# chmod a+x/u01/app/or Acle/product/11.1.0/db_1/bin/oracledb If you want to boot the Oracle 11g database automatically, do the following: root@hardy:~# ln-s/u01/app/oracle/ Product/11.1.0/db_1/bin/oracledb/etc/init.d/oracledb root@hardy:~# sudo sysv-rc-conf--level 2345 oracledb on If there is no sysv-rc-conf command, then apt-get one. Finally, add your own username to the DBA group: root@hardy:~# usermod-g dba-a User is ready, and Oracle 11g is installed. Once you re logged in, you can use Oracle's commands. You can add listener through the NETCA and add the database through DBCA. Test for installation success: (Oracle_sid=heron is the value you set when installing) oracle@hardy:~$ export Oracle_sid=heron oracle@hardy:~$ sqlplus '/as sysdba ' Sql*plus:release 11.1.0.6.0-production on Mon 5 02:39:27 2008 Copyright (c) 1982, 2007, Oracle. All rights reserved. Connected to:oracle Database 11g Enterprise Edition release 11.1.0.6.0-production with the partitioning, OLAP, Data Min ing and real application testing options sql> If you see the results above, you can prove that your Oracle installation was successful.

Related Article

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.