Linux oracle 如何安装,Linux 安装Oracle详细步骤

今天爱分享给大家带来Linux 安装Oracle详细步骤,希望对大家能够有所帮助。

1、环境准备

注意:当前Linux为CentOS-6.10-x86_64-bin-DVD1.iso

界面:使用图形界面

内存:4GB

硬盘:20GB

连接:SecureCRT,上传文件(rz命令)需要安装:yum -y install lrzsz

2、下载程序

32位需要下载(需要登录账号):

http://download.oracle.com/otn/linux/oracle11g/R2/linux_11gR2_database_1of2.zip

http://download.oracle.com/otn/linux/oracle11g/R2/linux_11gR2_database_2of2.zip

64位需要下载(需要登录账号):

http://download.oracle.com/otn/linux/oracle11g/R2/linux.x64_11gR2_database_1of2.zip

http://download.oracle.com/otn/linux/oracle11g/R2/linux.x64_11gR2_database_2of2.zip

5280cb7a110478cfa8d98d9e3b044a7d.png

3、解压程序

上传

326104a05074a7ea59d01648f9d068dc.png

解压

unzip linux.x64_11gR2_database_1of2.zip

unzip linux.x64_11gR2_database_2of2.zip

4d2bf5ab4e250cab3b0a3329443395d0.png

注意:unzip可能会提示没有这个命令,那就需要我们安装一下了

yum -y install zip

yum -y install unzip

4、移动软件

[root@caochenlei ~]# mkdir -p /usr/local/oracle

[root@caochenlei ~]# mv database/ /usr/local/oracle

5、域名映射

查看当前系统主机名:

[root@caochenlei ~]# hostname

caochenlei

查看当前系统的IP地址:

[root@caochenlei ~]# ifconfig

在末尾添加以下内容:

127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4

::1 localhost localhost.localdomain localhost6 localhost6.localdomain6

192.168.112.129 caochenlei

6、关闭selinux

[root@caochenlei ~]# vi /etc/selinux/config

设置SELINUX=disabled

5f8cdb9cb34d66dca77e73b069756602.png

临时关闭一下selinux:

[root@caochenlei ~]# setenforce 0

7、关闭防火墙

[root@caochenlei ~]# service iptables stop

[root@caochenlei ~]# chkconfig iptables off

8、安装依赖包

[root@caochenlei ~]# yum install -y binutils compat-libcap1 compat-libstdc++-33 gcc gcc-c++ glibc glibc-devel ksh libgcc libstdc++ libstdc++-devel libaio libaio-devel make sysstat unixODBC-devel pdksh java-1.8.0-openjdk*

9、添加新用户

[root@caochenlei ~]# groupadd oinstall

[root@caochenlei ~]# groupadd dba

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

[root@caochenlei ~]# passwd oracle

10、修改内核文件

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

在末尾添加以下内容:

fs.aio-max-nr = 1048576

fs.file-max = 6815744

kernel.shmall = 2097152

kernel.shmmax = 536870912

kernel.shmmni = 4096

kernel.sem = 250 32000 100 128

net.ipv4.ip_local_port_range = 9000 65500

net.core.rmem_default = 262144

net.core.rmem_max = 4194304

net.core.wmem_default = 262144

net.core.wmem_max = 1048576

更新一下文件以生效:

[root@caochenlei ~]# sysctl -p

11、修改用户限制

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

在末尾添加以下内容:

oracle soft nproc 4096

oracle hard nproc 65536

oracle soft nofile 4096

oracle hard nofile 65536

修改完成后重启服务器:

[root@caochenlei ~]# reboot

12、创建安装目录

[root@caochenlei ~]# mkdir -p /data/oracle/product/11.2.0

[root@caochenlei ~]# mkdir -p /data/oracle/oradata

[root@caochenlei ~]# mkdir -p /data/oracle/inventory

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

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

13、设置环境变量

切换到oracle用户下:

[root@caochenlei ~]# su - oracle

[oracle@caochenlei ~]$ vi .bash_profile

在末尾添加以下内容:

ORACLE_BASE=/data/oracle

ORACLE_HOME=$ORACLE_BASE/product/11.2.0

ORACLE_SID=orcl

PATH=$PATH:$ORACLE_HOME/bin

export ORACLE_BASE ORACLE_HOME ORACLE_SID PATH

更新一下文件以生效:

[oracle@caochenlei ~]$ source .bash_profile

14、安装应用程序

这一步需要在虚拟机里进行,因为会弹出窗体程序

[oracle@caochenlei response]$ cd /usr/local/oracle/database/

[oracle@caochenlei database]$ LANG=en_US ./runInstaller

用户安装截图:

0ab5b8f0f3e694462361239fafa4b465.png

194d9aca51f373f34f8b4f028ec61aca.png

eae0afd0a74adf89910c523407c13dab.png

273833546cb98eb77c522e6dc48023a0.png

405e1410c67264a0ecf1458fe8a87b1f.png

696d3e8cd7b1e01c1bf5a5ff2d77b3bd.png

abf7e8a3dc9346f7563d55964f43b1c1.png

e004a6da7b421fbf24e7f72245784fe9.png

57d16661a0ba23d1695f308dd27dac65.png

e981c8c555aab8a16a6fb8b3d1cc5d74.png

d53f97eb3d1e066e75ad3c7c7a5056f1.png

79ae16c84063649075e29437d97d1259.png

8e5f008f9ed7001fa776cf53a28d185c.png

d66b3c71b1665e26d88b6b770f1e1944.png

5fb21f4db691d8d4e3467195c67df396.png

c843f185bc2277f9e18ab17e086fc94c.png

c18e780eeed1be494c8e869efaa8935c.png

eebd7fcac00fd817eb539a97ce2b2689.png

fe206d99b64b0f1d22de6f74ff44465e.png

745b76bc6733455fed59c03b4605e0dd.png

eed38882b7928acdcc23bb0e8e2f337d.png

d481668afec41f354b1da103d00b4a68.png

e7159a9013ab80e0609c60f0e952daeb.png

554152d57a05dc18553615fbe2268766.png

144493e595b4b083cc3cf09f7fcc7ed3.png

然后提示要执行两个脚本,使用root执行,可以使用SecureCRT重新新建一个连接进行

[root@caochenlei ~]# sh /data/oracle/inventory/orainstRoot.sh

Changing permissions of /data/oracle/inventory.

Adding read,write permissions for group.

Removing read,write,execute permissions for world.

Changing groupname of /data/oracle/inventory to oinstall.

The execution of the script is complete.

[root@caochenlei ~]# sh /data/oracle/product/11.2.0/dbhome_1/root.sh

Running Oracle 11g root.sh script...

The following environment variables are set as:

ORACLE_OWNER= oracle

ORACLE_HOME= /data/oracle/product/11.2.0/dbhome_1

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.

执行完成,点ok,安装成功

c2f3eb302527c089e6aa30e48edacc08.png

fd3bd74674149bb25f26027ec9cd04db.png

  • 3
    点赞
  • 15
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值