What needs to be installed to log in to oracle on linux

青灯夜游
Release: 2023-02-17 11:38:03
Original
1920 people have browsed it

linux登录oracle需要安装:1、Oracle依赖包,从Oracle官方文档即可获取;2、Oracle软件。Oracle软件的安装方法:1、上传Oracle软件包并解压;2、进入Oracle安装目录,执行“./runInstaller -jreLoc /etc/alternatives/jre_1.8.0”命令进行安装。

What needs to be installed to log in to oracle on linux

本教程操作环境:linux7.3系统、Dell G3电脑。

1、安装Oracle依赖包

如下依赖包从Oracle官方文档推荐获取:

yum install -y bc \
binutils \
compat-libcap1 \
compat-libstdc++-33 \
gcc \
gcc-c++ \
elfutils-libelf \
elfutils-libelf-devel \
glibc \
glibc-devel \
ksh \
libaio \
libaio-devel \
libgcc \
libstdc++ \
libstdc++-devel \
libxcb \
libX11 \
libXau \
libXi \
libXtst \
libXrender \
libXrender-devel \
make \
net-tools \
nfs-utils \
smartmontools \
sysstat \
e2fsprogs \
e2fsprogs-libs \
fontconfig-devel \
expect \
unzip \
openssh-clients \
readline* \
psmisc --skip-broken
Copy after login

检查是否安装成功:

rpm -q bc binutils compat-libcap1 compat-libstdc++-33 gcc gcc-c++ elfutils-libelf elfutils-libelf-devel glibc glibc-devel ksh libaio libaio-devel libgcc libstdc++ libstdc++-devel libxcb libX11 libXau libXi libXtst libXrender libXrender-devel make net-tools nfs-utils smartmontools sysstat e2fsprogs e2fsprogs-libs fontconfig-devel expect unzip openssh-clients readline
Copy after login

What needs to be installed to log in to oracle on linux

Linux7需要手动安装compat-libstdc++依赖包:

rpm -ivh compat-libstdc++-33-3.2.3-72.el7.x86_64.rpm
Copy after login

2、创建Oracle安装目录

mkdir -p /u01/app/oracle/product/11.2.0/db
mkdir -p /u01/app/oraInventory
mkdir -p /oradata
chown -R oracle:oinstall /oradata
chown -R oracle:oinstall /u01/app
chmod -R 775 /u01/app
Copy after login

What needs to be installed to log in to oracle on linux

3、配置用户环境变量

cat <<EOF >>/home/oracle/.bash_profile
################OracleBegin#########################
umask 022
export TMP=/tmp
export TMPDIR=\$TMP
export NLS_LANG=AMERICAN_AMERICA.AL32UTF8
export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=/u01/app/oracle/product/11.2.0/db
export ORACLE_HOSTNAME=orcl
export ORACLE_TERM=xterm
export TNS_ADMIN=\$ORACLE_HOME/network/admin
export LD_LIBRARY_PATH=\$ORACLE_HOME/lib:/lib:/usr/lib
export ORACLE_SID=orcl
export PATH=/usr/sbin:\$PATH
export PATH=\$ORACLE_HOME/bin:\$ORACLE_HOME/OPatch:\$PATH
alias sas=&#39;sqlplus / as sysdba&#39;
export PS1="[\`whoami\`@\`hostname\`:"&#39;\$PWD]\$ &#39;
EOF
Copy after login

What needs to be installed to log in to oracle on linux

4、Oracle软件安装

1)、Oracle软件包上传

[root@orcl soft]# ll
-rw-r--r--. 1 root root 1395582860 May 31 16:56 p13390677_112040_Linux-x86-64_1of7.zip
-rw-r--r--. 1 root root 1151304589 May 31 16:56 p13390677_112040_Linux-x86-64_2of7.zip
Copy after login

What needs to be installed to log in to oracle on linux

2)、解压Oracle软件安装包

需要按顺序解压1,2安装包:

cd /soft
unzip -q p13390677_112040_Linux-x86-64_1of7.zip
unzip -q p13390677_112040_Linux-x86-64_2of7.zip

##授权/soft给oracle读写权限
chown -R oracle:oinstall /soft
Copy after login

What needs to be installed to log in to oracle on linux

进入/soft/database开始安装Oracle软件:

./runInstaller -jreLoc /etc/alternatives/jre_1.8.0
Copy after login

What needs to be installed to log in to oracle on linux

What needs to be installed to log in to oracle on linux

What needs to be installed to log in to oracle on linux

What needs to be installed to log in to oracle on linux

1What needs to be installed to log in to oracle on linux

1What needs to be installed to log in to oracle on linux

1What needs to be installed to log in to oracle on linux

1What needs to be installed to log in to oracle on linux

1What needs to be installed to log in to oracle on linux

What needs to be installed to log in to oracle on linux

上传pdksh-5.2.14-37.el5.x86_64.rpm依赖包,安装:

rpm -e ksh-20120801-142.el7.x86_64
rpm -ivh pdksh-5.2.14-37.el5.x86_64.rpm
Copy after login

1What needs to be installed to log in to oracle on linux

点击再次检查,忽略swap警告:

1What needs to be installed to log in to oracle on linux

1What needs to be installed to log in to oracle on linux

What needs to be installed to log in to oracle on linux

2What needs to be installed to log in to oracle on linux

解决方案:

su - oracle
sed -i &#39;s/^\(\s*\$(MK_EMAGENT_NMECTL)\)\s*$/\1 -lnnz11/g&#39; $ORACLE_HOME/sysman/lib/ins_emagent.mk
Copy after login

执行完点击retry重试:

2What needs to be installed to log in to oracle on linux

2What needs to be installed to log in to oracle on linux

root用户下执行脚本:

/u01/app/oraInventory/orainstRoot.sh
/u01/app/oracle/product/11.2.0/db/root.sh
Copy after login

2What needs to be installed to log in to oracle on linux

2What needs to be installed to log in to oracle on linux

What needs to be installed to log in to oracle on linux

reboot重启主机。

5、创建数据库

1)打开监听

su - oracle
lsnrctl start
lsnrctl status
Copy after login

2What needs to be installed to log in to oracle on linux

2、连接VNC远程工具或者直接打开虚拟机图形化界面

dbca
Copy after login

2What needs to be installed to log in to oracle on linux

2What needs to be installed to log in to oracle on linux

What needs to be installed to log in to oracle on linux

3What needs to be installed to log in to oracle on linux

3What needs to be installed to log in to oracle on linux

这里填写数据库实例名称和dbname,本次填写orcl。

3What needs to be installed to log in to oracle on linux

不安装EM工具。

3What needs to be installed to log in to oracle on linux

这里输入SYS和SYSTEM用户的密码,需要记住。

3What needs to be installed to log in to oracle on linux

这里选择前面建好的/oradata目录用来存放数据文件。

What needs to be installed to log in to oracle on linux

不开启闪回日志,不开启归档日志,可以建好库之后再手动修改。

3What needs to be installed to log in to oracle on linux

3What needs to be installed to log in to oracle on linux

数据库内存分配,选择手动分配,占用物理内存70%左右。

3What needs to be installed to log in to oracle on linux

block_size根据实际情况选择,一旦建库无法修改,默认8K。

What needs to be installed to log in to oracle on linux

字符集根据需要进行选择,默认AL32UTF8。

4What needs to be installed to log in to oracle on linux

4What needs to be installed to log in to oracle on linux

4What needs to be installed to log in to oracle on linux

4What needs to be installed to log in to oracle on linux

等待建库完成即可。

4What needs to be installed to log in to oracle on linux

6、连接数据库

确保监听正常启动,并监听数据库

What needs to be installed to log in to oracle on linux

1)通过数据库主机连接

su - oracle
sqlplus / as sysdba
select sysdate from dual;

##创建数据库用户
create user test identified by test;
grant dba to test;
conn test/test

##创建表
create table test (id number not null,name varchar2(100));
insert into test values (1,&#39;lucifer&#39;);
commit;
Copy after login

2)通过PL/SQL连接test用户

4What needs to be installed to log in to oracle on linux

4What needs to be installed to log in to oracle on linux

相关推荐:《Linux视频教程

The above is the detailed content of What needs to be installed to log in to oracle on linux. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template