Showing posts with label IT. Show all posts
Showing posts with label IT. Show all posts

Wednesday, January 21, 2015

How to increase ulimit in Linux

I've got this ulimit error while installing Oracle EM 12c cloud control.
It said that they expect value of 4096 and my value is only 1024.

Here is what I did to rectify this issue:
1. login as root

2. change sysctl.conf file
vi /etc/sysctl.conf

add on the last row this syntax:
fs.file-max = 5120

save

3. change limits.conf
vi /etc/security/limits.conf

add in this sytax:
*          soft     nproc          5119
*          hard     nproc          5119
*          soft     nofile         5119
*          hard     nofile         5119

save

4. reboot your system

and now when you run this command:
ulimit -a
you will see that "open file" is reflected as 5119.

Hope it helps to solve your issue as well.

another link that is helpful as well is
http://stackoverflow.com/questions/34588/how-do-i-change-the-number-of-open-files-limit-in-linux

Tuesday, January 20, 2015

PRVF-0002 : Could not retrieve local nodename

When I install Oracle DB 12cR1 on Oracle Linux 6, I encountered this error: "PRVF-0002 : Could not retrieve local nodename"

When you check the hostname it is correct, but somehow I still received this error message.

What you need to do:
1. check your hostname
      on linux type in: hostname
      Take note the hostname output. For this blog purpose, I use mydb12c for my hostname.
2. amend /etc/hosts
      vi /etc/hosts
      add in your local nodename
      before
      27.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4
      ::1        localhost localhost.localdomain localhost6 localhost6.localdomain6

      after
      27.0.0.1   mydb12c mydb12c.local localhost localhost.localdomain localhost4 localhost4.localdomain4


      ::1         mydb12c mydb12c.local localhost localhost.localdomain localhost6 localhost6.localdomain6

And now it runs smoothly. Yippieeee

Side note, in the event you want to change your hostname, you can change in this file "/etc/sysconfig/network":
vi /etc/sysconfig/network
change the HOSTNAME to your desire name

System need to be rebooted.

To add existing user to groups in linux environment

OK, now we know how to add new user to the group. but what if you have an existing user and want to add to new group?
If you want to add existing user to a group and this group become the primary group for the user following is the syntax:
usermod -g

Example:
usermod -g dba oracle

What if you want to add this user to several group?
usermod -G
Take note: groupname is separated with comma and without space


Example:
usermod -G dba,dgdba,backupdba oracle

To check if it is registered successfully, use this command:
cat /etc/gshadow

Take note: System need to be rebooted.

Add user to a group in linux environment

After adding group, you need to add in user to the group.
Following is how to add a new user to the group:
useradd -g dba oracle
(read: add user "oracle" to "dba" group)

What if you have an existing user and want to add to new group?
See Add existing user to groups

System need to be rebooted.

Add group in Linux / Unix environment

Recently I learn about database and about to practice. But then realize I need to add on some new group for my database in linux / unix environment.

This is the syntax to add group:
groupadd [-g gid [-o]] [-r] [-fgroup

Example:
groupadd dba

If you would like to know more about "groupadd" command, type "man groupadd" (omit the double quote). Following is what you will get:
-----------------------------
GROUPADD(8)               System Management Commands               GROUPADD(8)

NAME
       groupadd - create a new group

SYNOPSIS
       groupadd [options] group

DESCRIPTION
       The groupadd command creates a new group account using the values
       specified on the command line plus the default values from the system.
       The new group will be entered into the system files as needed.

--truncated. You will get full detail when you type "man groupadd".

Music Scales

Scale is a sequence of musical notes with specific order. There are few types of scale such as pentatonic (5 notes) and diatonic (7 notes). ...