Tuesday 26 June 2012

Oracle 11g: Oracle Database 11g installation on Fedora 17


This is shows the details on installing Oracle 11g XE(Express Edition) on Fedora 17 Linux OS.
  1. Download the file oracle-xe-11.2.0-1.0.x86_64.rpm.zip from otn.oracle.com
  2. Login in as root user:
    $ su - root
    Password:
    [root@srilinux ~]#

  3. Edit the /etc/sysctl.conf and make sure below entries are updated:
    # cat /etc/sysctl.conf
    kernel.shmmax = 4294967295
    kernel.shmmni = 4096
    kernel.shmall = 2097152
    fs.file-max = 6815744
    # semaphores: semmsl, semmns, semopm, semmni
    kernel.sem = 250 32000 100 128
    net.ipv4.ip_local_port_range = 9000 65500

  4. Then run the command sysctl to update the system from sysctl.conf file.
    [root@srilinux ~]# /sbin/sysctl -p

  5. Append this to your limits file:
    [root@srilinux ~]# cat /etc/security/limits.conf
    *        hard    nofile        65535
    *        soft    nofile        4096

  6. After updating the above file you would need to reboot your system for the values to take effect.
  7. Unzip the Oracle 11g Database from the specified directory to  a target directory "stage"
    [root@srilinux ~]# unzip /run/media/srikanth/20A4B2DEA4B2B61E/OBIEE11g/oracle-xe-11.2.0-1.0.x86_64.rpm.zip -d stage

  8. Then goto the extracted location and install the .rpm file as show below:
    # cd  stage/Disk1

  9. You can run the below command to verify that your oracle rpm file isn't missing any other dependencies:
    [root@srilinux Disk1]# rpm -ivh --test oracle-xe-11.2.0-1.0.x86_64.rpm
    Preparing...                ########################################### [100%]
    The run the below command as root, to staring installing the rpm onto your system.
    [root@srilinux Disk1]# rpm -ivh oracle-xe-11.2.0-1.0.x86_64.rpm
    Preparing...                ########################################### [100%]
       1:oracle-xe              ########################################### [100%]
    Executing post-install steps...
    You must run '/etc/init.d/oracle-xe configure' as the root user to configure the database.

  10. Then as mention to to the final configuration execute oracle-xe configure:
    [root@srilinux Disk1]# /etc/init.d/oracle-xe configure
    Oracle Database 11g Express Edition Configuration
    -------------------------------------------------
    This will configure on-boot properties of Oracle Database 11g Express
    Edition.  The following questions will determine whether the database should
    be starting upon system boot, the ports it will use, and the passwords that
    will be used for database accounts.  Press <Enter> to accept the defaults.
    Ctrl-C will abort.

    Specify the HTTP port that will be used for Oracle Application Express [8080]:
    Specify a port that will be used for the database listener [1521]:
    Specify a password to be used for database accounts.  Note that the same
    password will be used for SYS and SYSTEM.  Oracle recommends the use of
    different passwords for each database account.  This can be done after
    initial configuration:
    Confirm the password:

    Do you want Oracle Database 11g Express Edition to be started on boot (y/n) [y]:y

    Starting Oracle Net Listener...Done
    Configuring database...Done
    Starting Oracle Database 11g Express Edition instance...Done
    Installation completed successfully.
    [root@srilinux Disk1]#




  11. Then goto the "Applications" and select the "Firewall Configuration" Icon to open Firewall tool as show below:
  12. Click the Red "Disable" button.



  13. Click the "Yes" button then "File"-> "Exit" to exit the Firewall tool.






Notes:

The SEMMSL Parameter
This parameter defines the maximum number of semaphores per semaphore set.

The SEMMNS Parameter
This parameter defines the total number of semaphores (not semaphore sets) for the entire Linux system. A semaphore set can have more than one semaphore, and as the semget(2) man page explains, values greater than SEMMSL * SEMMNI makes it irrelevant. The maximum number of semaphores that can be allocated on a Linux system will be the lesser of: SEMMNS or (SEMMSL * SEMMNI).


The SEMOPM Parameter
This parameter defines the maximum number of semaphore operations that can be performed per semop(2) system call (semaphore call). The semop(2) function provides the ability to do operations for multiple semaphores with one semop(2) system call. Since a semaphore set can have the maximum number of SEMMSL semaphores per semaphore set, it is often recommended to set SEMOPM equal to SEMMSL.


The SEMMNI Parameter
This parameter defines the maximum number of semaphore sets for the entire Linux system.

Setting SHMMAX Parameter
This parameter defines the maximum size in bytes of a single shared memory segment that a Linux process can allocate in its virtual address space. For example, if you use the RHEL 3 smp kernel on a 32-bit platform (x86), then the virtual address space for a user process is 3 GB. If you use the RHEL 3 hugemem kernel on a 32-bit platform (x86), then the virtual address space for a user process is almost 4GB. Hence, setting SHMMAX to 4 GB - 1 byte (4294967295 bytes) on a smp kernel on a 32-bit architecture won't increase the maximum size of a shared memory segment to 4 GB -1. Even setting SHMMAX to 4 GB - 1 byte using the hugemem kernel on a 32-bit architecture won't enable a process to get such a large shared memory segment. In fact, the upper limit for a shared memory segment for an Oracle 10g R1 SGA using the hugemem kernel is roughly 3.42 GB (~3.67 billion bytes) since virtual address space is also needed for other things like shared libraries. This means if you have three 2 GB shared memory segments on a 32-bit system, no process can attach to more than one shared memory segment at a time. Also note if you set SHMMAX to 4294967296 bytes (4*1024*1024*1024=4GB) on a 32-bit system, then SHMMAX will essentially bet set to 0 bytes since it wraps around the 4GB value. This means that SHMMAX should not exceed 4294967295 on a 32-bit system. On x86-64 platforms, SHMMAX can be much larger than 4GB since the virtual address space is not limited by 32 bits.

Setting SHMMNI Parameter
This parameter sets the system wide maximum number of shared memory segments.

Setting SHMALL Parameter
This parameter sets the total amount of shared memory pages that can be used system wide. Hence, SHMALL should always be at least ceil(shmmax/PAGE_SIZE).



Summary:
We need to disable the Firewall on the Linux system so that others can connect to our database port: 1521.



No comments:

Post a Comment