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 用户名/密码

相关推荐
hugerat6 分钟前
在AI的帮助下,用C++构造微型http server
linux·c++·人工智能·http·嵌入式·嵌入式linux
ha20428941941 小时前
Linux操作系统学习记录之----自定义协议(网络计算器)
linux·网络·学习
想唱rap1 小时前
MYSQL在ubuntu下的安装
linux·数据库·mysql·ubuntu
糖~醋排骨1 小时前
DHCP服务的搭建
linux·服务器·网络
huohaiyu1 小时前
网络中的一些基本概念
运维·服务器·网络
BryceBorder1 小时前
SCAU--数据库
数据库·oracle·dba
dust_and_stars1 小时前
ubuntu24使用apt安装VS-code-server code-server
linux·服务器·windows
码农小韩2 小时前
基于Linux的C++学习——循环
linux·c语言·开发语言·c++·算法
ling-452 小时前
Linux-day09 11
linux·运维·服务器
202321336054 刘2 小时前
Linux常用命令分类整理
linux·运维·数据库