首页 > 编程知识 正文

oracle的安装步骤,linux登录oracle数据库

时间:2023-05-05 15:51:24 阅读:40304 作者:4168

今天我们将为大家提供Linux安装Oracle的详细步骤。 希望能对大家有所帮助。

1、环境准备

注意:目前的Linux是CentOS-6.10-x86_64-彩色蜜粉-DVD1.iso

界面:使用图形界面

内存: 4GB

硬盘: 20GB

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

2、程序下载

32位需要下载(需要登录帐户) :

3358 download.Oracle.com/OTN/Linux/Oracle 11g/R2/Linux _ 11gr2_ database _ 1of2. zip

3358 download.Oracle.com/OTN/Linux/Oracle 11g/R2/Linux _ 11gr2_ database _ 2of2. zip

需要下载64位(需要登录帐户) :

3358 download.Oracle.com/OTN/Linux/Oracle 11g/R2/Linux.x64 _ 11gr2_ database _ 1of2. zip

3358 download.Oracle.com/OTN/Linux/Oracle 11g/R2/Linux.x64 _ 11gr2_ database _ 2of2. zip

3、解冻程序

上传

解冻

unzip Linux.x64 _ 11gr2_ database _ 1of2. zip

unzip Linux.x64 _ 11gr2_ database _ 2of2. zip

注意: unzip可能会提示没有此命令,但这需要我们安装

yum -y install zip

yum-y安装unzip

4、移动软件

[ root @ Cao chenlei~] # mkdir-p/usr/local/Oracle

[ root @ Cao chenlei~] # mv数据库//usr/local/Oracle

5、域名映射

显示当前系统主机名:

[root@caochenlei ~]# hostname

曹成沥

显示当前系统的IP地址:

[root@caochenlei ~]# ifconfig

在末尾添加以下内容:

127.0.0.1 localhost localhost.local domain localhost4localhost4. local domain 4

:1 localhost localhost.local domain localhost6localhost6. local domain 6

192.168.112.129 caochenlei

6、关闭selinux

[根@ Cao chenlei~] # VI/etc/selinux/config

设置SELINUX=disabled

暂时关闭selinux :

[root@caochenlei ~]# setenforce 0

7、关闭防火墙

[ root @ Cao chenlei~] # serviceiptablesstop

[ root @ Cao chenlei~] # chkconfigiptablesoff

8、安装依赖软件包

[ root @ Cao chenlei~] # yum install-y彩色蜜粉utils compat-libcap1compat-libstdc-33 gcc gcc-cglibc-develkshlibgclibstddd

9、添加新用户

[ root @ Cao chenlei~] # groupadd oinstall

[根@ Cao chenlei~] # groupadd DBA

[ root @ Cao chenlei~] # useradd-go install-gdbaoracle

[ root @ Cao chenlei~] # passwd Oracle

10、修改内核文件

[ root @ Cao chenlei~] # VI/etc/sysctl.conf

在末尾添加以下内容:

fs.aio-max-nr=1048576

fs.file-max=6815744

p>

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/彩色的蜜粉

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

用户安装截图:

然后提示要执行两个脚本,使用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 彩色的蜜粉 directory: [/usr/local/彩色的蜜粉]:

Copying dbhome to /usr/local/彩色的蜜粉 ...

Copying oraenv to /usr/local/彩色的蜜粉 ...

Copying coraenv to /usr/local/彩色的蜜粉 ...

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,安装成功

版权声明:该文观点仅代表作者本人。处理文章:请发送邮件至 三1五14八八95#扣扣.com 举报,一经查实,本站将立刻删除。