We help IT Professionals succeed at work.

install oracle

nobleit
nobleit asked
on
I was trying to install oracle 11g in my linux machine..
And I am following this particular link..

http://sabdarsyed.blogspot.com/2007/08/installation-of-oracle-11g-on-linux-red.html

for installation..

but

What is wrong here

[root@ind ~]# su - root
[root@ind ~]# mkdir –p /u01/11gStage
mkdir: cannot create directory `–p': File exists
mkdir: cannot create directory `/u01/11gStage': File exists
[root@ind ~]# chown –R oracle:dba /u01/11gStage
chown: `–R': invalid user
[root@ind ~]#

invalid user..
Comment
Watch Question

Most Valuable Expert 2012
Distinguished Expert 2019
Commented:
For your version of Linux read the man page for mkdir and chown for the valid parameters.  I always thought -p and -R were pretty standard but maybe not.
Most Valuable Expert 2011
Top Expert 2012

Commented:
have you created the oracle user?  look in /etc/passwd to see if the oracle account exists
johnsoneSenior Oracle DBA

Commented:
I'll bet you cut an pasted those commands from somewhere.  My guess is that those are not real dash characters.  Try typing those 2 commands by hand.

Author

Commented:
This is the output of    /etc/passwd

root:x:0:0:root:/root:/bin/bash
bin:x:1:1:bin:/bin:/sbin/nologin
daemon:x:2:2:daemon:/sbin:/sbin/nologin
adm:x:3:4:adm:/var/adm:/sbin/nologin
lp:x:4:7:lp:/var/spool/lpd:/sbin/nologin
sync:x:5:0:sync:/sbin:/bin/sync
shutdown:x:6:0:shutdown:/sbin:/sbin/shutdown
halt:x:7:0:halt:/sbin:/sbin/halt
mail:x:8:12:mail:/var/spool/mail:/sbin/nologin
news:x:9:13:news:/etc/news:
uucp:x:10:14:uucp:/var/spool/uucp:/sbin/nologin
operator:x:11:0:operator:/root:/sbin/nologin
games:x:12:100:games:/usr/games:/sbin/nologin
gopher:x:13:30:gopher:/var/gopher:/sbin/nologin
ftp:x:14:50:FTP User:/var/ftp:/sbin/nologin
nobody:x:99:99:Nobody:/:/sbin/nologin
nscd:x:28:28:NSCD Daemon:/:/sbin/nologin
vcsa:x:69:69:virtual console memory owner:/dev:/sbin/nologin
rpc:x:32:32:Portmapper RPC user:/:/sbin/nologin
mailnull:x:47:47::/var/spool/mqueue:/sbin/nologin
smmsp:x:51:51::/var/spool/mqueue:/sbin/nologin
pcap:x:77:77::/var/arpwatch:/sbin/nologin
ntp:x:38:38::/etc/ntp:/sbin/nologin
dbus:x:81:81:System message bus:/:/sbin/nologin
avahi:x:70:70:Avahi daemon:/:/sbin/nologin
sshd:x:74:74:Privilege-separated SSH:/var/empty/sshd:/sbin/nologin
rpcuser:x:29:29:RPC Service User:/var/lib/nfs:/sbin/nologin
nfsnobody:x:65534:65534:Anonymous NFS User:/var/lib/nfs:/sbin/nologin
haldaemon:x:68:68:HAL daemon:/:/sbin/nologin
avahi-autoipd:x:100:101:avahi-autoipd:/var/lib/avahi-autoipd:/sbin/nologin
xfs:x:43:43:X Font Server:/etc/X11/fs:/sbin/nologin
apache:x:48:48:Apache:/var/www:/sbin/nologin
oprofile:x:16:16:Special user account to be used by OProfile:/home/oprofile:/sbin/nologin
gdm:x:42:42::/var/gdm:/sbin/nologin
sabayon:x:86:86:Sabayon user:/home/sabayon:/sbin/nologin
Most Valuable Expert 2011
Top Expert 2012

Commented:
looks like you haven't created the oracle user yet

you can't give oracle ownership of anything if oracle doesn't exist
Most Valuable Expert 2011
Top Expert 2012
Commented:
while su'd to root


useradd oracle   -- this will create the account

passwd oracle    -- this will prompt you to set the oracle password

Most Valuable Expert 2011
Top Expert 2012

Commented:
if you don't have the oracle user account, you might not have the dba group either


as root....

groupadd dba


then add the oracle user you created earlier to the dba group

useradd -G dba oracle
johnsoneSenior Oracle DBA

Commented:
Also, look at the errors you are getting, it is not recognizing the - options as options.  The - is not recognized at all.  You should manually type the commands in rather than cut and pasting them.
Most Valuable Expert 2011
Top Expert 2012
Commented:
-p and -R options are legal in linux,

the -R problem is because oracle isn't a valid user.

the -p option allows you to create a directory including parent, and if the directory already exists then exit without error.
It does not allow you to create a directory over an existing file though.

Author

Commented:
please give me a nice link to install oracle 11g in linux please
johnsoneSenior Oracle DBA
Commented:
No, read the error message.

The -R is not a problem because oracle is not a valid user, -R  is a problem because it doesn't recognize the -.

chown: `–R': invalid user

If it recognized the -R, it would say oracle is an invalid user, not -R.

The oracle user needs to be created, but there is something else wrong as well.

Same thing with the -p

mkdir: cannot create directory `–p': File exists

If it recognized the -p, it wouldn't be trying to create it as a directory.  From this message, it seems the command was run multiple times and a -p directory was created.  Although, I'm pretty sure that isn't a real -.
Most Valuable Expert 2012
Distinguished Expert 2019

Commented:
As always:  The online docs:
http://docs.oracle.com/cd/E11882_01/install.112/e24321/toc.htm


The link you have is OK.  It just assumed you already had the oracle user and dba group.

As mentioned by the others:  Do not copy/paste commands in from the webpage.

You should also take the time to understand the commands you are using.  Then a lot of the errors would make sense.  For example: chown changes ownership the provided user.  This sort of implies that user must exist first.

Most Valuable Expert 2011
Top Expert 2012

Commented:
>>> please give me a nice link to install oracle 11g in linux please

the link you have seems fine, just a little out of order,  it asks you to execute some steps before ensuring the system is ready.


johnsone is correct,  the -R  isn't being recognized,  however,  based on your /etc/passwd,  I'm also correct, you don't have an oracle user.

so,  create the oracle user and dba groups as I've shown above.

and,  type in the commands as johnsone suggested.


if that doesn't work.  Follow the installation instructions that are in the zip file you downloaded.
I've never used any instructions for Oracle installation other than those Oracle has provided.

Author

Commented:
I am following the existing link..

here is the issue now.

[root@ind etc]# gedit passwd
[root@ind etc]# user add oracle
-bash: user: command not found
[root@ind etc]# useradd oracle
[root@ind etc]# passwd oracle
Changing password for user oracle.
New UNIX password:
BAD PASSWORD: it is based on a dictionary word
Retype new UNIX password:
passwd: all authentication tokens updated successfully.
[root@ind etc]# chown –R oracle:dba /u01/11gStage
chown: `–R': invalid user
[root@ind etc]#
Most Valuable Expert 2011
Top Expert 2012

Commented:
nobleit,

the reason johnsone said to type in the instructions rather than copy/paste is you're picking up illegal characters that "look" like they are correct, but if you typed them in yourself, you'd get the correct ones.

for example....

–R    - wrong
-R     - right

the wrong dash is bigger and hence, not the correct character.
Most Valuable Expert 2011
Top Expert 2012

Commented:
chown –R oracle:dba /u01/11gStage  <<<<  this is wrong

chown -R oracle:dba /u01/11gStage   <<<< this is right  (provided the user,group and path are correct)


don't copy/paste from the article,  TYPE in the commands yourself.
Most Valuable Expert 2012
Distinguished Expert 2019

Commented:
>>[root@ind etc]# useradd oracle


You will still need to add the dba group.  re: http:#a37239675

Author

Commented:
chown: `–R': invalid user
[root@ind etc]# groupadd oracle
groupadd: group oracle exists
[root@ind etc]# groupadd dba
groupadd: group dba exists
[root@ind etc]#

Most Valuable Expert 2012
Distinguished Expert 2019
Commented:
>>chown: `–R': invalid user

Please read the previous posts.  The dash you are using is wrong.

>>groupadd: group oracle exists

You don't need a group called oracle.

>>groupadd: group dba exists

OK then you don't need to add it.

Author

Commented:
[oracle@ind tmp]$ ls
AT&T Communication Manager.lnk  mapping-oracle
database                        mapping-root
gconfd-oracle                   orbit-oracle
gconfd-root                     ssh-UZzUqS4064
keyring-KoRqFO                  virtual-oracle.33gnja
linux_11gR2_database_1of2.zip   VMwareDnD
linux_11gR2_database_2of2.zip   vmware-oracle
lost+found                      vmware-root
[oracle@ind tmp]$ cd database/
[oracle@ind database]$ ls
doc  install  response  rpm  runInstaller  sshsetup  stage  welcome.html
[oracle@ind database]$ ./runInstaller

Error in writing to directory /tmp/OraInstall2011-12-07_02-01-37AM. Please ensure that this directory is writable and has atleast 60 MB of disk space. Installation cannot continue.
: No space left on device
Starting Oracle Universal Installer...

[oracle@ind database]$


At this point where should I fix regarding the space..
Most Valuable Expert 2011
Top Expert 2012

Commented:
this looks like a new question
johnsoneSenior Oracle DBA

Commented:
You can redirect the usage of temporary space during the install by setting the TEMP and TMPDIR environment variable to a location that has suitable space.
Most Valuable Expert 2011
Top Expert 2012

Commented:
nobleit,

it looks like you simply accepted the last post so you close the question, without really thinking about what had been asked and the other contributions.

redirecting TEMP has nothing to do with your original question.

johnsone and I did identify all of the syntax errors and missing accounts/groups needed.  
A split seems in order

Author

Commented:
There was a space issue met ..For some reason I cannot go further with the same issue..
So far all the expert helped and suggested  in that scenario..
Please unblock my account..

I am going to accept one of the suggestio which helped me lot while resolving..
please advice further...

Author

Commented:
This is what happened..When I created the machine.. I gave very few spaces to /tmp and /u01
After creating the machine, I could not install the oracle software and I tried to clean up /tmp and /u01 manually still I could not log in as oracle user even after did all the pre-requisites...
So now that machine no more existing..
So please try to understand me All the experts forgive me all the mistakes..
Now onwards it woud be a new start follow the directions..
I humbly request to unblock all the blocks I have...

Author

Commented:
The wild character issue..
user add

change owner ship using chown in linux helped.

These are the two point that helped me to go forward..