oracle client linux服务器安装教程

p13390677_112040_Linux-x86-64_4of7.zip

安装前,确认/etc/hosts文件已配置正确

cat /etc/hosts

127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4

::1 localhost localhost.localdomain localhost6 localhost6.localdomain6

10.20.32.74 lttestdb --IP 主机名的格式

安装步骤:

1-创建oracle用户及相应组

/usr/sbin/groupadd oinstall

/usr/sbin/groupadd dba

useradd -g oinstall -G dba -u 5700 oracle

echo 'oracle'|passwd --stdin oracle

mkdir -p /u01/app

chown -R oracle:oinstall /u01

chmod -R 775 /u01

创建完成后上传安装包至/home/oracle/

2-配置oracle用户环境变量

su - oracle

vi .bash_profile

添加

export ORACLE_BASE=/u01/app/oracle

export ORACLE_HOME=/u01/app/oracle/product/11.2.0/db_1

export LD_LIBRARY_PATH=$ORACLE_HOME/lib

export PATH=ORACLE_HOME/bin:PATH

stty erase ^h

3-安装rpm包

yum install unzip wget elfutils-libelf* libaio* sysstat* make* libgcc* libstdc* gcc* elfutils* libtool* ncurses* readline* unixODBC* pdksh* compat-libstdc* compat-db* glibc* -y

4-解压安装包并配置安装参数

unzip /home/oracle/p13390677_112040_Linux-x86-64_4of7.zip

chown -R oracle:oinstall /home/oracle/client

sed -i 's/^#.*$//g' /home/oracle/client/response/client_install.rsp

sed -i '/^$/d' /home/oracle/client/response/client_install.rsp

vi /home/oracle/client/response/client_install.rsp

对应参数如下(其中hostname 可查看主机名)

ORACLE_HOSTNAME=lttestdb --服务器主机名

UNIX_GROUP_NAME=oinstall

INVENTORY_LOCATION=/u01/app/oraInventory

SELECTED_LANGUAGES=en,zh_CN

ORACLE_HOME=/u01/app/oracle/product/11.2.0/db_1

ORACLE_BASE=/u01/app/oracle

oracle.install.client.installType=Administrator

5-以oracle用户执行安装程序包

cd /home/oracle/client

./runInstaller -silent -responseFile /home/oracle/client/response/client_install.rsp -ignorePrereq

等待一段时间后,弹出

以root用户执行脚本

/u01/app/oraInventory/orainstRoot.sh

至此,数据库客户端安装完毕,后续根据实际数据库连接串信息,在$ORACLE_HOME/network/admin/tnsnames.ora文件中配置相应连接串信息即可。

登录验证

sqlplus 用户名/密码

相关推荐
椰子今天很可爱13 分钟前
静态库和动态库
linux
檀越剑指大厂29 分钟前
【Linux系列】如何在 Linux 服务器上快速获取公网
linux·服务器·php
共享家952731 分钟前
linux-高级IO(上)
java·linux·服务器
HWL56792 小时前
“preinstall“: “npx only-allow pnpm“
运维·服务器·前端·javascript·vue.js
小米里的大麦4 小时前
022 基础 IO —— 文件
linux
Xの哲學4 小时前
Perf使用详解
linux·网络·网络协议·算法·架构
门前灯4 小时前
Linux系统之iprconfig 命令详解
linux·运维·服务器·iprconfig
tb_first4 小时前
k8sday09
linux·云原生·容器·kubernetes
忧郁的橙子.4 小时前
三、k8s 1.29 之 安装2
linux·运维·服务器
huangyuchi.5 小时前
【Linux系统】动静态库的制作
linux·运维·服务器·动态库·静态库·库的简单制作