您的位置:首页 > 数据库 > Oracle

linux环境下oracle 10 R2安装详细步骤

2013-11-10 11:06 591 查看
 

创建oracle用户以及用户组:

[root@localhost~]# groupadd oinstall

[root@localhost~]# groupadd dba

[root@localhost~]# useradd -m -g oinstall -G dba oracle

[root@localhost~]# passwd oracle

Changing passwordfor user oracle.

New UNIX password:

BAD PASSWORD: itis based on a dictionary word

Retype new UNIXpassword:

Sorry, passwordsdo not match.

New UNIX password:

BAD PASSWORD: itis based on a dictionary word

Retype new UNIXpassword:

passwd: allauthentication tokens updated successfully.

为该 /oracle 目录更改组属性(更改权限):

[root@localhost~]# chown -R oracle:oinstall /oracle

chown: cannotaccess `/oracle': No such file or directory

[root@localhost~]# mkdir /oracle

[root@localhost~]# chown -R oracle:oinstall  /oracle

[root@localhost~]# chmod -R 775 /oracle

**************************************************************************************************************

进行win和linux下文件(oracle安装包)互享:

 

启动linux的ftp与windows进行ping通

[root@localhost~]# service vsftpd status

vsftpd is stopped

[root@localhost~]# service vsftpd start

Starting vsftpdfor vsftpd:                               [  OK  ]

ftp资源互享

[root@localhostServer]# service vsftpd status

vsftpd (pid 4965)is running...

[root@localhostServer]# su - oracle

[oracle@localhost~]$ ifconfig

-bash: ifconfig:command not found

[oracle@localhost~]$ su - root

Password:

[root@localhost~]# ifconfig

eth0      Link encap:Ethernet  HWaddr 00:0C:29:56:C5:F6

          inet addr:192.168.181.129  Bcast:192.168.181.255  Mask:255.255.255.0

          inet6 addr:fe80::20c:29ff:fe56:c5f6/64 Scope:Link

          UP BROADCAST RUNNING MULTICAST  MTU:1500 Metric:1

          RX packets:261 errors:0 dropped:0overruns:0 frame:0

          TX packets:79 errors:0 dropped:0overruns:0 carrier:0

          collisions:0 txqueuelen:1000

          RX bytes:26789 (26.1 KiB)  TX bytes:16379 (15.9 KiB)

          Interrupt:67 Base address:0x2024

 

lo        Link encap:Local Loopback

          inet addr:127.0.0.1  Mask:255.0.0.0

          inet6 addr: ::1/128 Scope:Host

          UP LOOPBACK RUNNING  MTU:16436 Metric:1

          RX packets:3902 errors:0 dropped:0overruns:0 frame:0

          TX packets:3902 errors:0 dropped:0overruns:0 carrier:0

          collisions:0 txqueuelen:0

          RX bytes:3662230 (3.4 MiB)  TX bytes:3662230 (3.4 MiB)

 

[root@localhost~]# su -  oralce

su: user oralcedoes not exist

You have mail in/var/spool/mail/root

[root@localhost~]# su -  oracle

[oracle@localhost~]$ ls

10201_database_linux32_10g.zip

[oracle@localhost~]$ cp 10201_database_linux32_10g.zip /u01

cp: cannot createregular file `/u01/10201_database_linux32_10g.zip': Permission denied

[oracle@localhost~]$ unzip 10201_database_linux32_10g.zip

*****************************************************************************************************************************************

 

**********************************************************************************************************************************************

进行oracle包检

rpm -q binutilscompat-db control-center gcc\

> gcc-c++glibc-common gnome-libs libstdc++\

>libstdc++-devel make pdksh xscreensaver libaio openmotif21

检查物理内存以及磁盘空间

[root@localhostServer]# grep MemTotal /proc/meminfo

MemTotal:       904068 kB

[root@localhostServer]# grep SwapTotal /proc/meminfo

SwapTotal:     1574328 kB

[root@localhostServer]# df -h

Filesystem            Size  Used Avail Use% Mounted on

/dev/sda6             2.0G  510M 1.4G  28% /

/dev/sda11             15G  166M  14G   2% /u01

/dev/sda9             996M   34M 910M   4% /tmp

/dev/sda8             996M   34M 911M   4% /opt

/dev/sda5             2.0G   36M 1.9G   2% /home

/dev/sda3             2.0G  100M 1.8G   6% /var

/dev/sda2             4.9G  3.3G 1.4G  72% /usr

/dev/sda1             494M  19M  451M   4% /boot

tmpfs                 442M     0 442M   0% /dev/shm

/dev/hdc              2.8G  2.8G    0 100% /media/RHEL_5.4 i386 DVD

 

使用ipcs -lm 命令查看当前分配的共享内存段的情况:

[root@localhostServer]# ipcs -lm

 

------ SharedMemory Limits --------

max number ofsegments = 4096

max seg size(kbytes) = 4194303

max total sharedmemory (kbytes) = 1073741824

min seg size(bytes) = 1

*******************************************************************************************************************************************

 

 

设置socket数据发送以及接受缓冲区的大小

net.ipv4.tcp_rmem 用于指定socket数据发送缓冲区的最小值,默认值及最大值。

net.ipv4.tcp_wmem 用于指定socket数据接收缓冲区的最小值,默认值及最大值



******************************************************************************************************************************************

配置文件

[root@localhost~]# vi /etc/sysctl.conf

添加以下内容:

kernel.shmall =2097152

--系统可以使用的内存页的最大数量

kernel.shmmax =2147483648

--单个共享内存段的最大大小,单位是字节

kernel.shmmni =4096

--内存页的大小

# semaphores:semmsl, semmns, semopm, semmni

kernel.sem = 25032000 100 128

fs.file-max =65536

net.ipv4.ip_local_port_range= 1024 65000

net.core.rmem_default=262144

net.core.rmem_max=262144

net.core.wmem_default=262144

net.core.wmem_max=262144

运行下面的命令使得内核参数生效:

/sbin/sysctl -p

 

[root@localhost~]# vi /etc/security/limits.conf

行末添加以下内容:

#use for oracle

* soft nproc 2047

* hard nproc 16384

* soft nofile 1024

* hard nofile65536

 

[root@localhost~]# vi /etc/pam.d/login

行末添加以下内容:

session requiredpam_limits.so

 

[root@localhost~]# mkdir -p /u01/app/oracle

[root@localhost~]# chown -R oracle:oinstall /u01

[root@localhost~]# vi /etc/redhat-release

改为:redhat-4

 

[root@localhost~]# su - oracle

[oracle@localhost~]$ vi .bash_profile

增加下列内容:

exportORACLE_BASE=/u01/app/oracle

exportORACLE_HOME=$ORACLE_BASE/10.2.0/db_1

exportORACLE_SID=orcl

exportPATH=$PATH:$ORACLE_HOME/bin

exportLD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib

 

*******************************************************************************************************************************************

解压oracle

unzip10201_database_linux32_10g.zip

再以root运行:xhost +

最后进入database文件夹内

[root@localhost~]# ./runInstaller

 
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: