install oracle 11g for linux

wangkxxe發表於2009-02-25

prepare an oracle install document
some , as vi.... that copy from document
but in this document some parameters are wrong , such as /etc/sysctl.conf net.core.rmem_default = 4194304(this is right)

[root@centos4 /]# groupadd oinstall
[root@centos4 /]# groupadd dba
[root@centos4 /]# useradd oracle
[root@centos4 /]# 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@centos4 /]# cd /
[root@centos4 /]# mkdir -p /myusr1/oracle
[root@centos4 /]# userdel oracle
[root@centos4 /]# useradd -g oinstall -G dba -d /myusr1/oracle oracle
[root@centos4 /]# 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@centos4 /]#
[root@centos4 /]# chown -R oracle:oinstall myusr1
[root@centos4 /]# id nobody
uid=99(nobody) gid=99(nobody) groups=99(nobody)     ----檢查預設nobody是否存在

[root@centos4 /]# vi /etc/sysctl.conf
##內容如下
kernel.shmall = 2097152
kernel.shmmax = 2147483648
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
net.ipv4.ip_local_port_range = 1024 65000
net.core.rmem_default = 4194304
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 262144
net.ipv4.tcp_wmem = 262144 262144 262144
net.ipv4.tcp_rmem = 4194304 4194304 4194304

[root@centos4 /]# /sbin/sysctl -p               ---reboot sysctl profile
[root@centos4 /]# vi /etc/security/limits.conf  ---參考安裝文件

[root@centos4 /]# su - oracle
[oracle@centos4 ~]$ pwd
/myusr1/oracle
[oracle@centos4 ~]$ ls -la

[oracle@centos4 ~]$ vi .bash_profile          ---增加
ORACLE_BASE=/myusr1
ORACLE_HOME=/myusr1/oracle
ORACLE_SID=wangke
PATH=$ORACLE_HOME/bin/:$PATH

export ORACLE_BASE ORACLE_HOME ORACLE_SID PATH

[oracle@centos4 ~]$ exit
logout
[root@centos4 /]# su - oracle
[oracle@centos4 ~]$ env | grep ORA
ORACLE_SID=wangke
ORACLE_BASE=/myusr1
ORACLE_HOME=/myusr1/oracle

[root@centos4 myusr1]# chown -R oracle:oinstall oraInventory
[root@centos4 myusr1]# chmod 770 oraInventory

[oracle@centos4 ~]$ su - root
Password:
[root@centos4 ~]# /myusr1/oraInventory/orainstRoot.sh
[root@centos4 myusr1]# /myusr1/oraInventory/orainstRoot.sh
Changing permissions of /myusr1/oraInventory to 770.
Changing groupname of /myusr1/oraInventory to oinstall.
The execution of the script. is complete

[root@centos4 myusr1]# /myusr1/oracle/root.sh
Running Oracle 11g root.sh script...

The following environment variables are set as:
    ORACLE_OWNER= oracle
    ORACLE_HOME=  /myusr1/oracle

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.
[root@centos4 myusr1]#

install software over

-------------------------------------
configure listener

[root@centos4 myusr1]# netca
>>>>>> DEFAULT NEXT


[root@centos4 myusr1]# dbca
>>>>>> character sets choose unicode(al32utf8)

start oracle service

lsnrctl start
sqlplus /nolog
sql>connect / as sysdba
sql>startup

shutdown oracle service

lsnrctl stop
sqlplus /nolog
sql>connect / as sysdba
sql>shutdown immediate

shutdown normal/shutdown immediate/shutdown abort

su - oracle    edit .bash_profile   add  stty erase ^H 

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/12801008/viewspace-557744/,如需轉載,請註明出處,否則將追究法律責任。

相關文章