ubtunu 下oracle 的安装

    技术2022-05-11  38

    2 Before the installation

    2.1 Downloading, libraries installation

    First, we have to get the Oracle 10g RC2 installer for Linux. You have to go on the Oracle site: http://www.oracle.com and download it (you'll have to register) Then type this line to install the necessary libraries :

    sudo apt-get install gcc, make, binutils,libmotif3,lesstif2,rpm,libaio,zip

    After the download, we have to unzip the archive file that we have download:

    unzip fichier_d'installation_oracle.zip

    2.2 Red Hat simulation

    The first thing to do in the system's preparation is to simulate a Red Hat distribution. Don't worry, it's not difficult when you follow the guide. The Red Hat is differenciated by Ubuntu in the directory architecture. So we'll create some symbolic link to simulate the Red Hat architecture:

    sudo ln -s /usr/bin/awk /bin/awksudo ln -s /usr/bin/rpm /bin/rpmsudo ln -s /usr/bin/basename /bin/basename sudo ln -s /etc /etc/rc.d

    To finish with this step, we have to create a file /etc/redhat-release that countain the information of the Red Hat system, this file is scanned by the installer and if it doesn't exist or if the information countained are wrong, the installer will not work:

    sudo gedit /etc/redhat-release

    Copy/Paste the following text:

    Red Hat Linux release 3.0 (drupal)

    2.3 Users / groups Oracle's creation and some modification

    This will simply create the system requirement:

    sudo userdel nobody sudo groupadd oinstall sudo groupadd dba sudo groupadd nobody sudo useradd -g oinstall -G dba -p passwd -d /home/oracle oracle -s /bin/bash sudo useradd -g nobody nobody

    Now, we create the directory where Oracle will be installed

    sudo mkdir -p /u01/app/oraclesudo mkdir -p /u02/oradatasudo chown -R oracle:oinstall /u01 /u02sudo chmod -R 775 /u01 /u02

    At the end of /etc/security/limits.conf add the following:

    * soft nproc 2047 * hard nproc 16384 * soft nofile 1024 * hard nofile 65536

    In the file /etc/pam.d/login, /etc/pam.d/su uncomment the following:

    session required /lib/security/pam_limits.so

    Add this line to /etc/profile

    if [ $USER = "oracle" ]; then ulimit -u 16384 -n 65536 fi

    Add the following lines to the end of /home/oracle/.bashrc (open it in root or oracle user):

    umask 022 PATH=${PATH}:/u01/app/oracle/oracle/product/10.2.0/db_1/bin/ ORACLE_HOME=/u01/app/oracle/oracle/product/10.2.0/db_1/ ORACLE_SID=orcl ORATAB=/etc/oratab ORACLE_HOME_LISTNER=$ORACLE_BASE ORACLE_BASE=$ORACLE_HOME export ORACLE_BASE ORACLE_SID ORATAB ORACLE_HOME ORACLE_HOME_LISTNER

    The system is now correctly configurated. Well going to the next step.

    3 Installation

    3.1 Some more terminal

    Launch a terminal and execute the following:

    cd your_database_dirxhost +sudo susu oracleORACLE_BASE=/u01/app/oracle ORACLE_SID=orclexport ORACLE_BASE ORACLE_SIDunset ORACLE_HOMEunset TNS_ADMINORATAB=/etc/oratabumask 022./runInstaller

    Victory, now you can see that:

    3.2 Graphical mode

    For the graphical mode, no more simply, just follow the instructions if you have no idea of what you are doing, default options works fine.

    Warning : When you'll see the following image, execute the script that it demand to.

    Open a terminal and do (in our case)

    sudo /u01/app/oracle/oracle/product/10.2.0/db_1/oraInventory/orainstRoot.shsudo /u01/app/oracle/oracle/product/10.2.0/db_1/root.sh

    Finally, you have finished the installation:

    4 To finish

    The installation is done, we have to reboot the system to kill some installation's daemons. After, you'll have to do the following to launch the Oracle server:

    $ sudo su oracle Password: enter your sudo password [oracle] $ lsnrctl start LSNRCTL for Linux: Version 10.2.0.1.0 - Production on 19-JAN-2006 13:55:02 Copyright (c) 1991, 2005, Oracle. All rights reserved. Starting /u01/app/oracle/oracle/product/10.2.0/db_1//bin/tnslsnr: please wait... TNSLSNR for Linux: Version 10.2.0.1.0 - Production System parameter file is /u01/app/oracle/oracle/product/10.2.0/db_1/network/admi n/listener.ora Log messages written to /u01/app/oracle/oracle/product/10.2.0/db_1/network/log/l istener.log Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1))) Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=localhost.localdomain)(P ORT=1521))) Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1))) STATUS of the LISTENER ------------------------ Alias LISTENER Version TNSLSNR for Linux: Version 10.2.0.1.0 - Production Start Date 19-JAN-2006 13:55:04 Uptime 0 days 0 hr. 0 min. 0 sec Trace Level off Security ON: Local OS Authentication SNMP OFF Listener Parameter File /u01/app/oracle/oracle/product/10.2.0/db_1/network/adm in/listener.ora Listener Log File /u01/app/oracle/oracle/product/10.2.0/db_1/network/log /listener.log Listening Endpoints Summary... (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1))) (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=localhost.localdomain)(PORT=1521))) Services Summary... Service "PLSExtProc" has 1 instance(s). Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service... The command completed successfully [oracle] $ sqlplus connect as sysdba SQL*Plus: Release 10.2.0.1.0 - Production on Thu Jan 19 13:55:21 2006 Copyright (c) 1982, 2005, Oracle. All rights reserved. Enter password: enter the DB password Connected to an idle instance. SQL> startup ORACLE instance started. Total System Global Area 285212672 bytes Fixed Size 1218992 bytes Variable Size 92276304 bytes Database Buffers 188743680 bytes Redo Buffers 2973696 bytes Database mounted. Database opened. SQL> exit Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production With the Partitioning, OLAP and Data Mining options [oracle] $ isqlplusctl start iSQL*Plus 10.2.0.1.0 Copyright (c) 2003, 2005, Oracle. All rights reserved. Starting iSQL*Plus ... iSQL*Plus started. [oracle] $ emctl start dbconsole TZ set to Indian/Reunion Oracle Enterprise Manager 10g Database Control Release 10.2.0.1.0 Copyright (c) 1996, 2005 Oracle Corporation. All rights reserved. http://localhost.localdomain:1158/em/console/aboutApplication Starting Oracle Enterprise Manager 10g Database Control ........................ started. ------------------------------------------------------------------ Logs are generated in directory /u01/app/oracle/oracle/product/10.2.0/db_1/localhost.localdomain_orcl/sysman/log

    After all of this manipulations, you'll have you own Oracle server installed on a Ubuntu Linux.

     

    最新回复(0)