Saturday, May 30, 2015

Linux 7 Oracle12c Installation

Published on Mar 31, 2014
Learn How to install the latest release for oracle database i.e 12C. watch the step by step installation in the above video.

Click the below link for all the commands and steps

http://www.technologylair.org/2014/06...

Step 1 - Edit Host Files - /etc/hosts

127.0.0.1 localhost.localdomain localhost
192.168.0.210 oracle_12C.localdomain oracle_12C


Step 2 - Edit Kernel Parameters /etc/sysctl.conf

fs.file-max = 6815744
kernel.sem = 250 32000 100 128
kernel.shmmni = 4096
kernel.shmall = 1073741824
kernel.shmmax = 4398046511104
net.core.rmem_default = 262144
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 1048576
fs.aio-max-nr = 1048576
net.ipv4.ip_local_port_range = 9000 65500

sysctl -p - apply changes 


Step 3 - Edit Limits file - /etc/security/limits.conf

oracle soft nofile 1024
oracle hard nofile 65536
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft stack 10240
oracle hard stack 32768


Step 4 - Install dependencies 


yum install binutils -y
yum install compat-libcap1 -y
yum install compat-libstdc++-33 -y
*yum install compat-libstdc++-33.i686 -y
yum install gcc -y
*yum install gcc-c++ -y
yum install glibc -y
yum install glibc.i686 -y
yum install glibc-devel -y
*yum install glibc-devel.i686 -y
*yum install ksh -y
yum install libgcc -y
yum install libgcc.i686 -y
yum install libstdc++ -y
yum install libstdc++.i686 -y
*yum install libstdc++-devel -y
*yum install libstdc++-devel.i686 -y
yum install libaio -y
yum install libaio.i686 -y
*yum install libaio-devel -y
*yum install libaio-devel.i686 -y
yum install libXext -y
yum install libXext.i686 -y
yum install libXtst -y
*yum install libXtst.i686 -y
yum install libX11 -y
yum install libX11.i686 -y
yum install libXau -y
yum install libXau.i686 -y
yum install libxcb -y
yum install libxcb.i686 -y
yum install libXi -y
*yum install libXi.i686 -y
yum install make -y
yum install sysstat -y
yum install unixODBC -y
*yum install unixODBC-devel -y


Step 5 - Add Groups and Users 

groupadd -g 54321 oinstall
groupadd -g 54322 dba
groupadd -g 54323 oper

useradd -u 54321 -g oinstall -G dba,oper oracle
passwd oracle

Step 6 - /etc/security/limits.d/90-nproc.conf

# Change this
* soft nproc 1024

# To this
* - nproc 16384

Step 7 - Set SELINUX

SELINUX=permissive

run the command after edit setenforce Permissive


Step 8 - Stop Firewall 

# service iptables stop
# chkconfig iptables off


Step 9 - Create directories for oracle Installation 

mkdir -p /oracle/product/12.1.0/db_1
chown -R oracle:oinstall /oracle
chmod -R 775 /oracle


Step 10 - xhost +

Step 11 - Edit bash profile for oracle user /home/oracle/.bash_profile


# Oracle Settings
export TMP=/tmp
export TMPDIR=$TMP

export ORACLE_HOSTNAME=oracle_12C.localdomain
export ORACLE_UNQNAME=db1
export ORACLE_BASE=/oracle
export ORACLE_HOME=$ORACLE_BASE/product/12.1.0/­db_1
export ORACLE_SID=db1

export PATH=/usr/sbin:$PATH
export PATH=$ORACLE_HOME/bin:$PATH

export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/u­sr/lib
export CLASSPATH=$ORACLE_HOME/jlib:$ORACLE_HOME­/rdbms/jlib


Step - 12 Extract Installation Files 

unzip linuxamd64_12c_database_1of2.zip
unzip linuxamd64_12c_database_2of2.zip


Step - 13 Start the Oracle Universal Installer

./runInstaller


Post Installation

dit the "/etc/oratab" file setting the restart flag for each instance to 'Y'

cdb1:/u01/app/oracle/product/12.1.0/db_1­:Y

Technology Lair : www.technologylair.org
Subscribe : http://www.youtube.com/subscription_c...
For More Videos : http://www.youtube.com/user/technolog...
For Video Tutorials :http://www.youtube.com/playlist?list=...
For Android : http://www.youtube.com/playlist?list=...
For Linux : https://www.youtube.com/playlist?list...
Kalam e Iqbal : http://www.youtube.com/playlist?list=...
Like us on Facebook : https://www.facebook.com/technologylair
Tweet us : http://twitter.com/technologylair
Follow us : https://plus.google.com/u/0/118196883...
Pin us : http://www.pinterest.com/technologylair/

Oracle Management Agent : Table 3-2 Package Requirements

WARNING:

3.2.1.1 Verifying UDP and TCP Kernel Parameters


Set the port range high enough to avoid reserved ports for any applications you may intend to use. If the lower value of the range you have is greater than 11,000, and the range is large enough for your anticipated workload, then you can ignore OUI warnings regarding the ephemeral port range.
For example, with IPv4, use the following command to check your current range for ephemeral ports:
$ cat /proc/sys/net/ipv4/ip_local_port_range
32768 61000
In the preceding example, the lowest port (32768) and the highest port (61000) are set to the default range.
If necessary, update the UDP and TCP ephemeral port range to a range high enough for anticipated system workloads, and to ensure that the ephemeral port range starts at 11,000 and above.
For example:
# echo 11000 65500 > /proc/sys/net/ipv4/ip_local_port_range
Oracle recommends that you make these settings permanent. For example, as root, use a text editor to open /etc/sysctl.conf, and add or change to the following: net.ipv4.ip_local_port_range = 11000 65500, and then restart the network (# /etc/rc.d/init.d/network restart). For detailed information on how to automate this ephemeral port range alteration on system restarts, refer to your Linux distribution system administration documentation.


3.1.4 Package Requirements for Oracle Management Agent

  • Ensure that you install only the versions recommended in Table 3-2. Installing any lower or higher versions of the packages might cause the installation to fail.
  • The GCC packages mentioned in this section are required during installation and also after installation, therefore do not deinstall them after installation. During installation, they are required for relinking binaries, and after installation they are required for discovering hosts and for collecting real-time monitoring modules on Linux hosts. Do NOT deinstall any of the GCC packages after installation.
     CHECK installed packaged by

    #rpm -qa --queryformat "%{NAME}-%{VERSION}-%{RELEASE}(%{ARCH})\n" | grep glibc
     
    compat-glibc-2.12-4.el7(x86_64)
    glibc-2.17-78.0.1.el7(i686)
    glibc-common-2.17-78.0.1.el7(x86_64)
    glibc-headers-2.17-78.0.1.el7(x86_64)
    glibc-devel-2.17-78.0.1.el7(x86_64)
    compat-glibc-headers-2.12-4.el7(x86_64)
    glibc-devel-2.17-78.0.1.el7(i686)
    glibc-2.17-78.0.1.el7(x86_64)

    Table 3-2 Package Requirements for Oracle Management Agent
    Platform 32-Bit Packages for 32-Bit Platform 64-Bit Packages for 64-Bit Platform
    Oracle Linux 7.x
    Here, x refers to the version of the Oracle Linux release. For example, Oracle Linux 7.2, where 7 is the release number and 2 is the version number.




    Not Supported
    • make-3.82-21
    • binutils-2.23.52.0.1-16
    • gcc-4.8.2-16
    • libaio-0.3.109-12
    • glibc-common-2.17-55
    • libstdc++-4.8.2-16
    • sysstat-10.1.5-4

    3.2.1.2 Setting Up kernel.shmmax Kernel Parameter

    This section covers the following:
    If OMS and Management Repository Are on Different Hosts
    If you are installing OMS and Management Repository (database) on different hosts, which are running on Linux operating systems (32-bit or 64-bit), then on the OMS host, set the kernel.shmmax parameter to a value 1 byte less than 4 GB or 4294967295.
    Oracle recommends this value to avoid lack of memory issues for other applications and to enable a complete and successful core file generation under any and all circumstances.
    • To verify the value assigned to the kernel.shmmax parameter, run the following command:
      cat /proc/sys/kernel/shmmax
    • To set the value for kernel.shmmax parameter, do the following:
      1. Log in as root.
      2. Open the /etc/sysctl.conf file.
      3. Set the kernel.shmmax parameter to 4294967295.
      By setting the value in the /etc/sysctl.conf file, the value persists even when you restart the system.
      On SUSE Linux Enterprise Server systems, do the following:
      1. Run the following command to ensure that the system reads the /etc/sysctl.conf file when it restarts:
        # /sbin/chkconfig boot.sysctl on
      2. Run the following command to change the current values of the kernel parameters:
        # /sbin/sysctl -p
    If OMS and Management Repository Are on the Same Host
    If you are installing OMS and Management Repository (database) on the same host, which is running on a Linux operating system (32-bit or 64-bit), then set the kernel.shmmax parameter to a value prescribed in the Oracle Database Installation Guide 11g Release 2 (11.2) for Linux.











Thursday, May 28, 2015

How Do I Run Firefox Remotely On Server?

HowTo: Run Firefox From The Command Line

How do I run Firefox browser from the Linux command line (shell prompt)? How to run Firefox from command line on Linux based server?

You can use command line as follows with special arguments to start Mozilla firefox.

Firefox Start Browser

To open the browser, enter:
$ firefox
OR
$ /usr/bin/firefox

Firefox Open URL

To open URL in a new tab, enter:
$ /usr/bin/firefox -new-window http://www.cyberciti.biz/
To open URL in a new window, enter:
$ /usr/bin/firefox www.cyberciti.biz

Firefox Search option

You can search words (term) with your default search engine, enter:
$ /usr/bin/firefox -search "term"
$ /usr/bin/firefox -search "linux add user to group"

Open Firefox Options / Preferences

To open Firefox options/preferences window, enter:
$ /usr/bin/firefox -preferences

Set Firefox As Default Browser

To set the Firefox app as the default browser, enter:
$ /usr/bin/firefox -setDefaultBrowser

How Do I Run Firefox Remotely On Server?

SSH is frequently used to tunnel insecure traffic over the Internet in a secure way. You can login to remote server using the ssh client:
$ ssh -X user@server42.nixcraft.com
To run firefox, enter:
$ /usr/bin/firefox &
$ /usr/bin/firefox www.cyberciti.biz
Tweet itFacebook itGoogle+ itPDF itFound an error/typo on this page?
{ 13 comments… add one }
  • anonymous April 2, 2011, 11:34 am
    hello,
    the shell comand “firefox” does only work if you start in from a e.g. gnome terminal, and gnome is running on this display.
    what is the command if you want start friefox e.g on tty1 , where no desktop is running?
    linux says ” error : no display specified”
    How to specify the display ?
    or does it only work when starting from tty7 (where the desktop is running) in this case i’m wondering about the advantage starting from a shell. because you could also click on the firefox button in front panel.
    thx for advice
    • AnonimousTwo May 5, 2012, 6:32 pm
      You need 2 command lines. (you do not need to be logged as root)
      But first you need :
      To get the X server installed = xserver-xorg
      To get a graphical interface installed : Gnome or KDE or LXDE or XFCE or whatever you want…
      To be located and log on in a TTY console
      The first command line is to set the variable “DISPLAY” to “:0″ by the following :
      username@localhost:~$ export DISPLAY=:0
      To verify your work has been done efficiently you may enter, to see the value of your variable :
      username@localhost:~$ echo $DISPLAY
      You should get :
      :0
      The second one by entering the program name you need to run, iceweasel for exemple :
      username@localhost:~$ /usr/lib/iceweasel/firefox.bin http://www.debian.org &
      NOTA : The sign “&” at the end gives you back the command line available.
      …and it will start firefox on the web page http://www.debian.org in you graphical interface…
      Have fun and thank you !!! So much !!!
  • AnonimousTwo May 5, 2012, 6:46 pm
    My previous topic gives you how to start a graphical software in tty7 from a command line in tty console like tty1 to tty6.
    It’s helpfull to run a software remotly.
    You need to get you desktop environment started.
    By I should know, it’s not possible to start a graphical software from the console without your desktop environment started.
    If you want to navigate on the Internet by a command line software in text mode from the console, you should use “Lynx”
  • Kent Bye September 4, 2012, 12:27 am
    open -a /Applications/Firefox.app http://example.com is what I use from the Mac terminal
  • Gokul January 16, 2013, 5:50 pm
    HI Vivek,
    I removed firefor old version using yum command. And downloaded firefox 18 .tar.bz2.
    Unzipped the tar file in /home/user/firefox.
    [root@localhost firefox]# /usr/bin/firefox
    bash: /usr/bin/firefox: No such file or directory
    Is that any settings i need to do?
    • vijay April 4, 2013, 11:50 am
      you need to install the package and then see the following is present
      /usr/bin/firefox
  • Anonymous May 13, 2013, 10:31 pm
    Hey I was wondering if I could close a tab in terminal? i wanted to run a bash script that opened a particular window and close it. for example i have
    #!/bin/bash
    firefox http://www.google.com –new-window
    now i’m stuck with an open window i want to close. Is there a way to do it in terminal?
  • c December 20, 2013, 6:47 am
    Open new tab:
    $ /usr/bin/firefox -new-window http://www.cyberciti.biz/
    change new-window for new-tab
  • gopu January 20, 2014, 6:32 pm
    How to keep alive firefox from ssh command. actually i want to keep alive firefox & open tabs after vnc viewer off. i m using skype form vps vnc viewer & skype via http://www.plus.im. so i want to know how to keep alive that firefox pages.
    thanks.
  • gopu January 22, 2014, 11:53 am
    solve this problem with skype/vnc/ubuntu.
  • Tyler August 15, 2014, 6:48 pm
    Dear Editor,
    under Firefox Open URL, -new-window is used to open a new window and will not open a tab. Simple typo anyone could make. :)
  • stanislav January 20, 2015, 11:15 pm
    #!/bin/bash
    if ps aux | grep “midori” | grep -v grep ; then env DISPLAY=:0 midori ; fi
    do nothing :(