Вы находитесь на странице: 1из 58

PRACTICA I- INSTALACION ORACLE LINUX

Pre-Installation Testing Media

3.2) Click OK to Test the Media, If you dont wanna test go directly to Step 3.6

3.3) Click OK or Press Enter if Test is Highlighted

3.4) Wait for it to Finish

3.5) Click OK

3.6) Click CONTINUE or Press Enter after you select CONTINUE

3.7) Click SKIP or Press Enter after you select SKIP

4) Starting Linux Installation 4.1) Click NEXT

4.2) Select English and Click NEXT

4.3) Choose for Keyboard

4.4) Select YES to Continue. No need to worry as you are on a virtual new hard disk. Click Yes to Erase all data.

4.5) I am not going by the default options here. Choosing a custom layout to create new mount points and giving SWAP & TEMP more space.

4.6) Nothing created so far , So it shows all 100 GB in free space. Space 100 GB is not yet allocated to the virtual hard disk.

4.7) Choosing 100 MB for Boot partition

4.8) Choosing 5192 MB/ 5 GB for SWAP You can go for 4096 as well.

4.9) Choosing 5192 MB/ 5 GB for /tmp You can go for 4096 as well.

4.10) Allocating 20480 MB/20 GB to / (root) partition to hold the OS software.

4.11) Allocating 61440 MB/60 GB to /u01 for my future software installations.

4.12) Seeing what is going to be created

4.13) Click NEXT

4.14) Click NEXT

4.15) Choose your TIME ZONE

4.16) choose your ROOT Password

4.17) I choose customize later as there are different set of RPMs required for different purposed. You can clone this VM for your purpose and Install required extra RPMs.

4.18) Click NEXT

4.19) Now system will format all the partitions we created and Begin the Installation.

4.20) Once Installation is OVER you will see it asking for a REBOOT.

4.21) Click FORWARD

4.22) Choose option YES and Click FORWARD

4.23) Choose Firewall DISABLED and Click FORWARD

4.24) Choose SELinux DISABLED and Click FORWARD

4.24) Click FORWARD

4.25) Choose DATE & TIME

4.26) Create a USER

4.27) Test Your Sound Card

4.28) I am not installing any Additional CD at this movement.

4.29) The Welcome Screen. Login with your credentials.

4.30) You can check the Primary Memory consumption out of 2 GB we given and Secondary Memory (Partition Wise) Status.

Congratulations !!! Your LAB Virtual Machine is Ready for Testing Purpose. 2- Mediante las herramientas yum y rpm instalar los siguientes paquetes

binutils-2.17.50.0.6 compat-libstdc++-33-3.2.3 elfutils-libelf-0.125 elfutils-libelf-devel-0.125 elfutils-libelf-devel-static-0.125 gcc-4.1.2 gcc-c++-4.1.2 glibc-2.5-24 glibc-common-2.5

glibc-devel-2.5 glibc-headers-2.5 kernel-headers-2.6.18 ksh-20060214 libaio-0.3.106 libaio-devel-0.3.106 libgcc-4.1.2 libgomp-4.1.2 libstdc++-4.1.2 libstdc++-devel-4.1.2 make-3.81

sysstat-7.0.2 libXp

PRACTICA II- INSTALACION BASE DE DATOS

Preinstallation Requirements login as root Memory RAM: At least 4 GB [root@di-rep-db ~]# grep MemTotal /proc/meminfo MemTotal: 4344304 kB

swap space The following table describes the relationship between installed RAM and the configured swap space requirement: RAM Swap Space Between 4 GB and 8 GB 2 times the size of RAM Between 8 GB and 32 GB 1.5 times the size of RAM More than 32 GB 32 GB To determine the size of the configured swap space, enter the following command: [root@di-rep-db ~]# grep SwapTotal /proc/meminfo SwapTotal: 10860752 kB

To determine the available RAM and swap space, enter the following command: [root@di-rep-db ~]# free total Mem: Swap: used free 4215960 289044 shared 128344 4055260 buffers 0 cached 13892 3913024 4344304 10860752

-/+ buffers/cache:

0 10860752

Add Swap space if needed. System Architecture Verify that the processor architecture matches the Oracle software release that you want to install. [root@di-rep-db ~]# uname -m

x86_64

Disk Space Disk space requirements The following tables describe the disk space requirements on Linux x86: Installation Type Software (GB) Data (GB) Enterprise Edition 4.35 1.68 Standard Edition 3.73 1.48 Operating System (Distribution) and kernel Check that you have the minimal operating system and kernel. Minimal Distribution Oracle Linux 4 Update 7 Oracle Linux 5 Update 2 Oracle Linux 5 Update 5 (only if using Oracle Unbreakable Enterprise Kernel) [root@di-rep-db ~]# cat /etc/enterprise-release Enterprise Linux Enterprise Linux Server release 5.5 (Carthage) [root@di-rep-db ~]# uname -r 2.6.18-194.el5 Minimal Kernel 2.6.9 or later 2.6.18 or later (compatible with Red Hat Enterprise kernel) 2.6.32-100.0.19 or later

Network Setup DNS Verify the value of the DNS configuration file /etc/resolv.conf. The nameserver must be not set or set to a valid DNS server and you can add the two time-out parameters. Disable secure linux Disable secure linux by editing the /etc/selinux/config file, making sure the SELINUX flag is set as follows:

SELINUX=disabled Alternatively, this alteration can be done using the GUI tool. Operating System Groups Log in as root. Installation Groups Create OS groups. /usr/sbin/groupadd -g 501 dba Creating the Oracle Inventory Group When you install Oracle software on the system for the first time, Oracle Universal Installer creates the oraInst.loc file. If the oraInst.loc file does not exist, then create the Oracle Inventory group by entering the following command: # /usr/sbin/groupadd oinstall

Software Owners The software owner is used to own and start the installation of an oracle database. You have typically two software owner: oracle, for the database software and grid for the Oracle Restart owner user. Creation As we install a single database, we need only the oracle user. To create it, enter a command similar to the following: [root@@di-rep-db ~]# /usr/sbin/useradd -u 501 -g oinstall -G dba oracle In the preceding command:

The -u option specifies the user ID. Using this command flag is optional, as you can allow the system to provide you with an automatically generated user ID number. However, you must make note of the oracle user ID number, as you require it later during preinstallation. The -g option specifies the primary group, which must be the Oracle Inventory groupfor example, oinstall The -G option specifies the secondary groups, which include the OSDBA group, and the OSOPER group. Verify your user: [root@di-rep-db /]# id oracle uid=501(oracle) gid=502(oinstall) groups=502(oinstall),501(dba),505(oper) Set the password of the oracle user: [root@di-rep-db /]# passwd oracle Changing password for user oracle. New UNIX password: BAD PASSWORD: it is WAY too short Retype new UNIX password: passwd: all authentication tokens updated successfully.

Installation Fixup Scripts During installation, for certain prerequisite check failures, you can click Fix & Check Again to generate a fixup script (runfixup.sh). You can run this script as a root user to complete the required preinstallation steps. The fixup script does the following: Checks and sets kernel parameters to values required for successful installation, including: Shared memory parameters Semaphore parameters Open file descriptor and UDP send/receive parameters Sets permissions on the Oracle Inventory directory.

Reconfigures primary and secondary group memberships for the installation owner, if necessary, for the Oracle Inventory directory, and for the operating system privileges groups. Sets up virtual IP and private IP addresses in /etc/hosts. Sets shell limits to required values, if necessary. Installs the Cluster Verification Utility packages (cvuqdisk rpm). Using fixup scripts will not ensure that all the prerequisites for installing Oracle Database are satisfied. You must still verify that all the preinstallation requirements are met to ensure a successful installation. Shell limits To improve the performance of the software, you must increase the following shell limits for the Oracle installation owners: Shell Limit Maximum number of open file descriptors Maximum number of processes available to a single user Maximum size of the stack segment of Item in limits.conf nofile nproc stack Hard Limit at least 65536 at least 16384 at least 10240 KB, and at Soft Limit at least 1024 at least 2047 at least 10240

the process most 32768 KB KB To increase the shell limits: Depending on your environment, make the following changes for all Oracle installation owners. The steps below only show the user oracle. Kernel Parameters I. Environment: ================ 1. Modify your kernel settings in /etc/sysctl.conf (RedHat) as follows. If the current value for any parameter is higher than the value listed in this table, do not change the value of that parameter. Range values (such as net.ipv4.ip_local_port_range) must match exactly. kernel.shmall = physical RAM size / pagesize For most systems, this will be the value 2097152. To view the pagesize, run getconf PAGE_SIZE kernel.shmmax = 1/2 of physical RAM, but not greater than 4GB. This would be the value 2147483648 for a system with 4Gb of physical RAM.

kernel.shmmni = 4096 kernel.sem = 250 32000 100 128 fs.file-max = 512 x processes (for example 6815744 for 13312 processes) fs.aio-max-nr = 1048576 net.ipv4.ip_local_port_range = 9000 65500 a.) The runInstaller (OUI) checks may expect this to be the old guidance of "1024 65000". The new guidance from Oracle development is "9000 65500". Please allow the runInstaller (OUI) to proceed with the new guidance from Oracle development. net.core.rmem_default = 262144 net.core.rmem_max = 4194304 net.core.wmem_default = 262144 net.core.wmem_max = 1048576 2. To activate these new settings into the running kernel space, run the "sysctl -p" command as root. 3. Set Shell Limits for the oracle User. Assuming that the "oracle" Unix user will perform the installation, do the following: a.) Add the following settings to /etc/security/limits.conf oracle soft nproc 2047 oracle hard nproc 16384 oracle soft nofile 1024 oracle hard nofile 65536 b.) Add or edit the following line in the /etc/pam.d/login file, if it does not already exist: session required pam_limits.so c.) Add the following lines to /etc/profile: if [ $USER = "oracle" ]; then if [ $SHELL = "/bin/ksh" ]; then ulimit -u 16384 ulimit -n 65536

else ulimit -u 16384 -n 65536 fi fi 4. The gcc-4.1.2 and gcc-c++-4.1.2 RPM items above will ensure that the correct gcc / g++ versions are installed. It is also required that you ensure that these correct gcc / g++ versions are active, and in-use. Ensure that the commands "gcc --version" and "g++ --version" each return "4.1.x". 5. The hostname command should return the fully qualified hostname as shown below: % hostname hostname.domainname 6. If any Java packages are installed on the system, unset the Java environment variables, for example JAVA_HOME. 7. The oracle account used to install Oracle 11.2.0.1, should not have the Oracle install related variables set by default. For example setting ORACLE_HOME, PATH, LD_LIBRARY_PATH to include Oracle binaries in .profile, .login file and /etc/profile.d should be completely avoided. a.) Setting $ORACLE_BASE (not $ORACLE_HOME) is recommended, since it eases a few prompts in the OUI runInstaller tool. b.) following the succesful install, it is recommended to set $ORACLE_HOME, and to set $PATH to include $ORACLE_HOME/bin at the beginning of the $PATH string. 8. By default, RHEL 5 x86 Linux is installed with SELinux as "enforcing". This is fine for the 11gR2 installation process. However, to subsequently run "sqlplus", switch SELinux to the "Permissive" mode. See NOTE 454196.1, "./sqlplus: error on libnnz11.so: cannot restore segment prot after reloc" for more details. II. Environment Variables Add the following lines to /home/oracle/.bash_profile export ORACLE_BASE=/oracle/app/oracle export ORACLE_HOME=$ORACLE_BASE/product/11.2.0/db_home1

export PATH=$ORACLE_HOME/bin:$ORACLE_HOME/OPatch:$PATH export LD_LIBRARY_PATH=$ORACLE_HOME/lib export ORACLE_SID=orcl ADDITIONAL NOTES ---------------1. Supported distributions of the 32-bit (x86) Linux OS can run on on AMD64/EM64T and Intel Processor Chips that adhere to the x86_64 architecture a.) Oracle 32-bit running on AMD64/EM64T with 32-bit OS is supported, and is covered by this NOTE. b.) Oracle 32-bit running on AMD64/EM64T with 64-bit OS is not certified and is not supported. 2. Asynchronous I/O on ext2 and ext3 file systems is supported if your scsi/fc driver supports that functionality. 3. No extra patch is required for the DIRECTIO support for x86. 4. No LD_ASSUME_KERNEL value should be used with the 11gR2 product. Directories Oracle base directory The Oracle base directory is a top-level directory for Oracle software installations. To create an appropriate directory: Check the free disk space on each mounted file system using the following command: # df -h Create the Oracle Base Directory mkdir -p /u01/app/oracle chown -R oracle:oinstall /u01/app/oracle

chmod -R 775 /u01/app/oracle chmod -R 775 /u01/app set the ORACLE_BASE environment variable for the user Oracle to specify the Oracle base directory that you have created. OraInventory The Oracle Inventory directory (oraInventory) stores an inventory of all software installed on the system. mkdir -p /u01/app/oraInventory chown -R oracle:oinstall /u01/app/oraInventory chmod -R 775 /u01/app/oraInventory

Oracle Home Directory The Oracle home directory is the directory where you choose to install the software for a particular Oracle product. Oracle Universal Installer creates this directory path that you specify under the Oracle base directory and then you do not need to create this directory. Hostname on Multi homed/Alias computer You can install Oracle Database on: A multihomed computer. It is associated with multiple IP addresses. This is typically achieved by having multiple network cards on the computer. Each IP address is associated with a host name. In addition, you can set up aliases for the host name. A computer with multiple aliases: it is registered with the naming service under a single IP but with multiple aliases. The naming service resolves any of those aliases to the same computer. Before installing Oracle Database on such a computer, set the ORACLE_HOSTNAME environment variable to the computer whose host name you want to use. Oracle Universal Installer uses the ORACLE_HOSTNAME environment variable setting to find the host name. If ORACLE_HOSTNAME is not set and you are installing on a computer that has multiple network cards, then Oracle Universal Installer determines the host name from the /etc/hosts file.

Example of /etc/hosts file with di-rep-db.hotitem.local as hostname # Do not remove the following line, or various programs # that require network functionality will fail. 127.0.0.1 127.0.0.1 di-rep-db.hotitem.local di-rep-db localhost.localdomain localhost

Clients must be able to access the computer either by using this host name or by using aliases for this host name. To verify this, ping the host name from the client computers using the short name (host name only) and the full name (host name and domain name). Both tests must be successful. Use the following procedure to set the ORACLE_HOSTNAME environment variable. For example, if the fully qualified host name is somehost.us.example.com, then enter the following commands for the Bourne, Bash, or Korn shell: $ ORACLE_HOSTNAME=di-rep-db.hotitem.local $ export ORACLE_HOSTNAME

Installation Follow this article to know how to show a linux remote windows with X: Linux - How to display remote clients (such as firefox, installation screen) with the X Server CygwinX ? Login as oracle Run the installer The installation files are on the hard disk, then we change in the directory to the database directory and enter the runInstaller command. If the installation files are on installation media, enter commands similar to the following, where directory_path is the path of the database directory on the installation media: /directory_path/runInstaller Oracle Universal Installer automatically installs the Oracle-supplied version of the JRE. This version is required to run Oracle Universal Installer and several Oracle assistants. Do not modify the Java Runtime Environment (JRE) except by using a patch provided by Oracle Support Services.

[oracle@di-rep-db ~]$ cd /mnt/kiosque/database [oracle@di-rep-db database]$ ./runInstaller Starting Oracle Universal Installer... Checking Temp space: must be greater than 120 MB. Actual 64696 MB Checking swap space: must be greater than 150 MB. Actual 7659 MB Passed Passed Passed

Checking monitor: must be configured to display at least 256 colors. Actual 16777216 wait ...

Preparing to launch Oracle Universal Installer from /tmp/OraInstall2011-06-15_09-27-30PM. Please

Configure Security Updates Next Installation Option You can choose one of this options: Create and Configure a Database: This option creates a new database along with sample schemas. Install Database Software Only: This option only installs the database binaries. To configure database, you must run Oracle Database Configuration Assistant after the software installation. Upgrade an Existing Database: This option installs the software binaries in a new Oracle home. At the end of the installation, you can upgrade the existing database. Choose Create and configure an database. Click Next System Class You can choose one of the following options: Desktop Class: Choose this option if you are installing on a laptop or desktop class system. This option includes a starter database and allows minimal configuration. This option is designed for those who want to get up and running with the database quickly.(The ORACLE_HOSTNAME Environment Variable must be set) Server Class: Choose this option if you are installing on a server class system, such as what you would use when deploying Oracle in a production data center. This option allows for more

advanced configuration options. Advanced configuration options available using this option include Oracle RAC, Automatic Storage Management, backup and recovery configuration, integration with Enterprise Manager Grid Control, and more fine-grained memory tuning, among many others. Choose Server Class and click Next Steps Grip Option: Single instance database installation: This option installs the database and the listener. Install Type: Choose Advanced Install Product Language: English Database Edition: Enterprise Installation Location

Create Inventory

By default, the Oracle Inventory directory is not installed under the Oracle Base directory. This is because all Oracle software installations share a common Oracle Inventory, so there is only one Oracle

Inventory for all users, whereas there is a separate Oracle Base for each user. Configuration Type: General Purpose Database Identifier Configuration Option: Choose Unicode, uncheck the Security and install the Sample Schemas Management Options: Database Control Database Storage: File System (/u01/app/oracle/oradata) Backup and recovery: Don't enable backup Schema Password: pwd for all account Operating System Group (dba, oper)

Prerequisite check. If you don't have enough swap space (minimum 1.5 the total amount of physical memory), check in this article on how to increase it : Linux - Swap / Paging

Configuration script When you run the root.sh script, the script prompts you for the path of the local bin directory and automatically copies the oraenv, coraenv, and dbhome scripts to the directory that you specify. The default local bin directory is /usr/local/bin. If you do not run the root.sh script, then you can manually copy the oraenv or coraenv and dbhome scripts from the $ORACLE_HOME/bin directory to the local

bin directory. [root@di-rep-db database]# /u01/app/oraInventory/orainstRoot.sh Changing permissions of /u01/app/oraInventory. Adding read,write permissions for group. Removing read,write,execute permissions for world. Changing groupname of /u01/app/oraInventory to oinstall. The execution of the script is complete. [root@di-rep-db kiosque]# /u01/app/oracle/product/11.2.0/dbhome_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.2.0/dbhome_1 Enter the full 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 will be added to the /etc/oratab file as needed by Database Configuration Assistant when a database is created Finished running generic part of root.sh script. Now product-specific root actions will be performed. Finished product-specific root actions.

Finish

Try then connect to the database control of the machine using the user name SYSTEM and connect as SYSDBA: https://hostname:1158/em CREATE A DATABASE AN CONFIGURE THE LISTENER # dbca #netca Status verification lsnrctl status emctl status dbconsole

Start lsnrctl start emctl start dbconsole [oracle@di-rep-db ~]$ sqlplus /nolog SQL*Plus: Release 11.2.0.1.0 Production on Mon Sep 13 15:35:43 2010 Copyright (c) 1982, 2009, Oracle. All rights reserved. SQL> startup ORA-01031: insufficient privileges SQL> connect / as sysdba Connected to an idle instance.

SQL> startup ORACLE instance started. Total System Global Area 619360256 bytes Fixed Size Variable Size Database Buffers Redo Buffers Database mounted. Database opened. 1338280 bytes 423625816 bytes 188743680 bytes 5652480 bytes

Database Console [oracle@di-rep-db database]$ emctl status dbconsole Oracle Enterprise Manager 11g Database Control Release 11.2.0.1.0 Copyright (c) 1996, 2009 Oracle Corporation. All rights reserved. https://di-rep-db.hotitem.local:1158/em/console/aboutApplication Oracle Enterprise Manager 11g is running. -----------------------------------------------------------------Logs are generated in directory /u01/app/oracle/product/11.2.0/dbhome_1/di-repdb.hotitem.local_direp/sysman/log

Вам также может понравиться