search
HomeOperation and MaintenanceLinux Operation and MaintenanceWhat needs to be installed to log in to oracle on linux

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

检查是否安装成功:

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

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

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

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

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

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

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

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

./runInstaller -jreLoc /etc/alternatives/jre_1.8.0

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

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

执行完点击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

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

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

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

dbca

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;

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!

Statement
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
What is Maintenance Mode in Linux? ExplainedWhat is Maintenance Mode in Linux? ExplainedApr 22, 2025 am 12:06 AM

MaintenanceModeinLinuxisaspecialbootenvironmentforcriticalsystemmaintenancetasks.Itallowsadministratorstoperformtaskslikeresettingpasswords,repairingfilesystems,andrecoveringfrombootfailuresinaminimalenvironment.ToenterMaintenanceMode,interrupttheboo

Linux: A Deep Dive into Its Fundamental PartsLinux: A Deep Dive into Its Fundamental PartsApr 21, 2025 am 12:03 AM

The core components of Linux include kernel, file system, shell, user and kernel space, device drivers, and performance optimization and best practices. 1) The kernel is the core of the system, managing hardware, memory and processes. 2) The file system organizes data and supports multiple types such as ext4, Btrfs and XFS. 3) Shell is the command center for users to interact with the system and supports scripting. 4) Separate user space from kernel space to ensure system stability. 5) The device driver connects the hardware to the operating system. 6) Performance optimization includes tuning system configuration and following best practices.

Linux Architecture: Unveiling the 5 Basic ComponentsLinux Architecture: Unveiling the 5 Basic ComponentsApr 20, 2025 am 12:04 AM

The five basic components of the Linux system are: 1. Kernel, 2. System library, 3. System utilities, 4. Graphical user interface, 5. Applications. The kernel manages hardware resources, the system library provides precompiled functions, system utilities are used for system management, the GUI provides visual interaction, and applications use these components to implement functions.

Linux Operations: Utilizing the Maintenance ModeLinux Operations: Utilizing the Maintenance ModeApr 19, 2025 am 12:08 AM

Linux maintenance mode can be entered through the GRUB menu. The specific steps are: 1) Select the kernel in the GRUB menu and press 'e' to edit, 2) Add 'single' or '1' at the end of the 'linux' line, 3) Press Ctrl X to start. Maintenance mode provides a secure environment for tasks such as system repair, password reset and system upgrade.

Linux: How to Enter Recovery Mode (and Maintenance)Linux: How to Enter Recovery Mode (and Maintenance)Apr 18, 2025 am 12:05 AM

The steps to enter Linux recovery mode are: 1. Restart the system and press the specific key to enter the GRUB menu; 2. Select the option with (recoverymode); 3. Select the operation in the recovery mode menu, such as fsck or root. Recovery mode allows you to start the system in single-user mode, perform file system checks and repairs, edit configuration files, and other operations to help solve system problems.

Linux's Essential Components: Explained for BeginnersLinux's Essential Components: Explained for BeginnersApr 17, 2025 am 12:08 AM

The core components of Linux include the kernel, file system, shell and common tools. 1. The kernel manages hardware resources and provides basic services. 2. The file system organizes and stores data. 3. Shell is the interface for users to interact with the system. 4. Common tools help complete daily tasks.

Linux: A Look at Its Fundamental StructureLinux: A Look at Its Fundamental StructureApr 16, 2025 am 12:01 AM

The basic structure of Linux includes the kernel, file system, and shell. 1) Kernel management hardware resources and use uname-r to view the version. 2) The EXT4 file system supports large files and logs and is created using mkfs.ext4. 3) Shell provides command line interaction such as Bash, and lists files using ls-l.

Linux Operations: System Administration and MaintenanceLinux Operations: System Administration and MaintenanceApr 15, 2025 am 12:10 AM

The key steps in Linux system management and maintenance include: 1) Master the basic knowledge, such as file system structure and user management; 2) Carry out system monitoring and resource management, use top, htop and other tools; 3) Use system logs to troubleshoot, use journalctl and other tools; 4) Write automated scripts and task scheduling, use cron tools; 5) implement security management and protection, configure firewalls through iptables; 6) Carry out performance optimization and best practices, adjust kernel parameters and develop good habits.

See all articles

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

MantisBT

MantisBT

Mantis is an easy-to-deploy web-based defect tracking tool designed to aid in product defect tracking. It requires PHP, MySQL and a web server. Check out our demo and hosting services.

mPDF

mPDF

mPDF is a PHP library that can generate PDF files from UTF-8 encoded HTML. The original author, Ian Back, wrote mPDF to output PDF files "on the fly" from his website and handle different languages. It is slower than original scripts like HTML2FPDF and produces larger files when using Unicode fonts, but supports CSS styles etc. and has a lot of enhancements. Supports almost all languages, including RTL (Arabic and Hebrew) and CJK (Chinese, Japanese and Korean). Supports nested block-level elements (such as P, DIV),

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

DVWA

DVWA

Damn Vulnerable Web App (DVWA) is a PHP/MySQL web application that is very vulnerable. Its main goals are to be an aid for security professionals to test their skills and tools in a legal environment, to help web developers better understand the process of securing web applications, and to help teachers/students teach/learn in a classroom environment Web application security. The goal of DVWA is to practice some of the most common web vulnerabilities through a simple and straightforward interface, with varying degrees of difficulty. Please note that this software

ZendStudio 13.5.1 Mac

ZendStudio 13.5.1 Mac

Powerful PHP integrated development environment