首页 > 数据库 >Linux部署Oracle 12c

Linux部署Oracle 12c

时间:2023-05-04 21:22:25浏览次数:47  
标签:libstd 12c c++ devel oracle yum install Linux Oracle

需求描述

如何从Oracle官网上下载Oracle数据库之前的版本,例如Oracle12c?目前官网上进去只找到了21和18,那其他的版本呢?如何找到并下载?

解决方法

1 在Oracle Software Delivery Cloud里搜索oracle database 12c

:链接地址为:

/*https://edelivery.oracle.com/osdc/faces/SoftwareDelivery
1asdsd

2 查看下载项(如果View Items是灰色的,从步骤1重新开始)

下载

3 选择12c的操作系统类型

12

4 同意协议

12

5 点击下载按钮

12

6 获得下载工具(exe)后,设置安装路径进行下载

12

7 打开下载后的文件

12

服务器配置

1.首先用服务器的root身份安装依赖包(如果直接是root用户登录的就直接执行下边的,如果不是就打开终端先执行su - root命令然后输入密码在终端里是不显示的)

yum -y install binutils 
yum -y install compat-libcap1 
yum -y install compat-libstdc++-33 
yum -y install compat-libstdc++-33*.i686 
yum -y install elfutils-libelf-devel 
yum -y install gcc 
yum -y install gcc-c++ 
yum -y install glibc*.i686 
yum -y install glibc 
yum -y install glibc-devel 
yum -y install glibc-devel*.i686 
yum -y install ksh 
yum -y install libgcc*.i686 
yum -y install libgcc 
yum -y install libstdc++ 
yum -y install libstdc++*.i686 
yum -y install libstdc++-devel 
yum -y install libstdc++-devel*.i686 
yum -y install libaio 
yum -y install libaio*.i686 
yum -y install libaio-devel 
yum -y install libaio-devel*.i686 
yum -y install make 
yum -y install sysstat 
yum -y install unixODBC 
yum -y install unixODBC*.i686 
yum -y install unixODBC-devel 
yum -y install unixODBC-devel*.i686 
yum -y install libXp
上述操作可以多做几遍没关系确保安装成功了,做完在测试下看看安装成功了没
rpm -q binutils compat-libcap1 compat-libstdc++ gcc gcc-c++ glibc glibc-devel ksh libaio libaio-devel libgcc libstdc++ libstdc++-devel libXi libXtst make sysstat unixODBC unixODBC-devel  
提示“package compat-libstdc++ is not installed”这个包报错,请用yum install 包名进行安装。
例如:yum install compat-libstdc++-33
 [root@localhost yum.repos.d]# yum -y install compat-libstdc++-33
Loaded plugins: fastestmirror, langpacks
Repository base is listed more than once in the configuration
Repository updates is listed more than once in the configuration
Repository extras is listed more than once in the configuration
Repository centosplus is listed more than once in the configuration
Loading mirror speeds from cached hostfile
 * base: ftp.sjtu.edu.cn
 * extras: ftp.sjtu.edu.cn
 * updates: ftp.sjtu.edu.cn
Package compat-libstdc++-33-3.2.3-72.el7.x86_64 already installed and latest version
Nothing to do

2.建立用户和组:

groupadd oinstall
groupadd dba
groupadd oper
useradd -g oinstall -G dba,oper oracle

oracle

echo "123456" | passwd --stdin oracle    

3.创建安装目录:

创建目录

mkdir -p /opt/orcl/app/oracle/product/12.1.0/db_1

分配用户目录权限

chown -R oracle:oinstall /opt/orcl/app

给目录分配权限

chmod -R 775 /opt/orcl/app

4.修改内核参数vim /etc/sysctl.conf,添加:(如果没有vim就用vi编辑器)

fs.aio-max-nr = 1048576
fs.file-max = 6815744
kernel.shmall = 2097152
kernel.shmmax = 4294967295
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
改好后,使之生效
sysctl -p
kernel.shmmax = 4294967295 这个地方因为每个人机器不一样所以填的可能也不一样,到时候看check那一步的时候推荐值是多少再改成多少就行。

5.改文件限制:vim /etc/security/limits.conf,添加:

oracle     soft    nproc     2047
oracle     hard    nproc     16384
oracle     soft    nofile    1024
oracle     hard    nofile    65536
oracle     soft    stack     10240

6.以及vim /etc/pam.d/login,添加:

session required pam_limits.so

7.修改ulimit: vim /etc/profile,添加:

if [ $USER = "oracle" ]; then
 if [ $SHELL = "/bin/ksh" ]; then
ulimit -p 16384 ulimit -n 65536a
else
ulimit -u 16384 -n 65536
fi
fi

8.修改环境变量,vim ~oracle/.bash_profile,添加:

ORACLE_BASE=/opt/orcl/app/oracle  
ORACLE_HOME=$ORACLE_BASE/product/12.1.0/db_1  
ORACLE_SID=orcl  
export ORACLE_BASE ORACLE_HOME ORACLE_SID  
PATH=$ORACLE_HOME/bin:$PATH  

9.如果你的centos有自带的openjdk就卸载掉没有就不用管

yum remove *openjdk*
再安装正常版本的jdk去oracle官网下载Linux版的jdk8,然后到下载的目录执行

12

例如:rpm -ivh jdk-8u144-linux-x64.rpm

10.开放服务器的1521端口

firewall-cmd --zone=public --add-port=1521/tcp --permanent
firewall-cmd --reload
返回success代表成功期间可能会提示输入root密码

做完以上操作之后重启服务器

开始安装oracle12c

1.重启完服务器用oracle这个用户登录服务器(我们在服务器配置的第二步里已经创建了一个名为oracle的用户密码为123456)

2.进入到安装包目录

cd /opt/orcl/app/oracle

3.解压安装包

unzip linuxx64

4.进入到解压目录

cd /opt/orcl/app/oracle/database

5.运行安装命令

./runInstaller

6.取消电子邮件

12

7.创建数据库和配置

12

8.选择服务器版本

12

9.安装单实例数据库

12

10.使用典型安装

12

11.安装位置选择

12

12

12.安装

12

13.执行两个脚本

12

执行脚本直接回车,执行过程中也直接回车

[root@localhost ~]# /opt/orcl/app/oraInventory/orainstRoot.sh
Changing permissions of /opt/orcl/app/oraInventory.
Adding read,write permissions for group.
Removing read,write,execute permissions for world.

Changing groupname of /opt/orcl/app/oraInventory to oinstall.
The execution of the script is complete.
[root@localhost ~]# /opt/orcl/app/oracle/product/12.1.0/db_1/root.sh
Performing root user operation.

The following environment variables are set as:
    ORACLE_OWNER= oracle
    ORACLE_HOME=  /opt/orcl/app/oracle/product/12.1.0/db_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 script.
Now product-specific root actions will be performed.


12

12

安装完毕。

安装过程中可能会碰到的问题

1.swap size问题没有检查交换空间

安装数据库所需要的交换空间

问题解决

可用RAM 所需交换空间
在1GB到2GB之间 内存大小的1.5倍
在2GB到16GB之间 等于RAM的大小

标签:libstd,12c,c++,devel,oracle,yum,install,Linux,Oracle
From: https://www.cnblogs.com/JianZuo/p/17372542.html

相关文章

  • Linux内核调试的方式以及工具集锦
    原文链接 https://blog.csdn.net/gatieme/article/details/68948080  ......
  • Linux配置添加自定义shell脚本需要的PATH
    Linux添加自定义shell脚本记录下,便于之后复习使用。1.确定一个目录e.g.#到达用户目录cd~#创建一个bin文件夹来放脚本文件mkdirbincd./binpwd得到的是/root/bin2.把这个路径放到PATH中cd~#可以用ls-a看一看有没有.branrc文件vim~/.bashrc#编辑最后加入......
  • 倒序输出文件中的文本(英文文本,Linux环境)
    /*倒序显示文本内容:linux环境*/#include<stdio.h>#include<stdlib.h>#defineSLEN81intmain(void){char*file="hello.txt";charch;FILE*fp;longcount,last;if((fp=fopen(file,"rb"))==NULL){//只......
  • Linux 安装MySql
    Linux安装MySql1.下载mysqlhttps://downloads.mysql.com/archives/community/下载之后使用文件传输工具传输到你的服务器上 2.安装mysql1.创建mysql文件夹mkdir/soft/mysql创建文件夹cd/soft/mysql进入 2.解压文件夹在该目录下再创建一个文件夹,并且将安装......
  • [Linux资源] 鸟哥的私房菜
    鸟哥的Linux私房菜--基础学习篇目录http://vbird.dic.ksu.edu.tw/linux_basic/linux_basic.php?utm_source=jobboleblog鸟哥的Linux私房菜--服务器架设篇目录http://vbird.dic.ksu.edu.tw/linux_server/?utm_source=jobboleblog......
  • 兼容 windows 和 Linux 的fgets文件读取方式(判断文件尾)
    /*检测文件尾范例使用fgets读取文件*//*范例:检测文件尾,windows和linux,unix平台兼容版本*/#include<stdio.h>#include<stdlib.h>#defineBUFSIZE100intmain(void){FILE*f;charstr[BUFSIZE];char*result;//读方式打开文件hello.txt,如果文件不......
  • 如何在Linux检查并使用串口
    原文译至:http://www.cyberciti.biz/faq/find-out-linux-serial-ports-with-setserial/如何根据不同的需求(如modem,连接空的module或连接到一个dumb终端)在Linux下检查并配置串口呢?Linux提供了各种工具,Linux使用ttySx作为一个串口设备的名称。例如,COM1(DOS/Windows名字)是t......
  • [每天一个Linux小技巧] Linux下 截图
    方法一:使用firefox截图:Ctrl+Shift+C方法二:使用Linux自带的工具:screenshot方法三:使用PrtScn键截全屏,使用Alt+PrtScn键截取焦点所在的窗口。文件默认保存在$PWD/图片下。参考:http://jingyan.baidu.com/article/f71d6037639c6f1ab641d124.html......
  • Linux下如何找到程序中是否有dlopen的库
    嵌入式系统开发下,有时候要对库进行一些处理.比如这个库没有被用到就可以被移除,但是一般情况下没有去判断dlopen的库信息,所以会造成误删除的情况.这个bash脚本用来搜索指定目录或指定文件是否有使用dlopen的库及可执行文件.注意:该脚本因为是通过对二进制文件的分析实......
  • linux模块驱动编写示例
    2023-05-04关键字:该驱动可通过dts配置属性,可在/dev创建节点,支持对/dev下的节点进行标准IO读写以及ioctl读写。dts如下:ir_cut{status="okay";compatible="chorm,ir-cut";gpios=<&gpf0GPIO_ACTIVE_HIGH>,<&gpf1GPIO_ACTIVE_LOW>;}; ......