Home Operation and Maintenance Linux Operation and Maintenance What needs to be installed to log in to oracle on linux

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

Feb 17, 2023 am 11:37 AM
oracle 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
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!

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

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

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

How to use docker desktop How to use docker desktop Apr 15, 2025 am 11:45 AM

How to use Docker Desktop? Docker Desktop is a tool for running Docker containers on local machines. The steps to use include: 1. Install Docker Desktop; 2. Start Docker Desktop; 3. Create Docker image (using Dockerfile); 4. Build Docker image (using docker build); 5. Run Docker container (using docker run).

What to do if the docker image fails What to do if the docker image fails Apr 15, 2025 am 11:21 AM

Troubleshooting steps for failed Docker image build: Check Dockerfile syntax and dependency version. Check if the build context contains the required source code and dependencies. View the build log for error details. Use the --target option to build a hierarchical phase to identify failure points. Make sure to use the latest version of Docker engine. Build the image with --t [image-name]:debug mode to debug the problem. Check disk space and make sure it is sufficient. Disable SELinux to prevent interference with the build process. Ask community platforms for help, provide Dockerfiles and build log descriptions for more specific suggestions.

How to view the docker process How to view the docker process Apr 15, 2025 am 11:48 AM

Docker process viewing method: 1. Docker CLI command: docker ps; 2. Systemd CLI command: systemctl status docker; 3. Docker Compose CLI command: docker-compose ps; 4. Process Explorer (Windows); 5. /proc directory (Linux).

What computer configuration is required for vscode What computer configuration is required for vscode Apr 15, 2025 pm 09:48 PM

VS Code system requirements: Operating system: Windows 10 and above, macOS 10.12 and above, Linux distribution processor: minimum 1.6 GHz, recommended 2.0 GHz and above memory: minimum 512 MB, recommended 4 GB and above storage space: minimum 250 MB, recommended 1 GB and above other requirements: stable network connection, Xorg/Wayland (Linux)

MongoDB vs. Oracle: Understanding Key Differences MongoDB vs. Oracle: Understanding Key Differences Apr 16, 2025 am 12:01 AM

MongoDB is suitable for handling large-scale unstructured data, and Oracle is suitable for enterprise-level applications that require transaction consistency. 1.MongoDB provides flexibility and high performance, suitable for processing user behavior data. 2. Oracle is known for its stability and powerful functions and is suitable for financial systems. 3.MongoDB uses document models, and Oracle uses relational models. 4.MongoDB is suitable for social media applications, while Oracle is suitable for enterprise-level applications.

How to switch Chinese mode with vscode How to switch Chinese mode with vscode Apr 15, 2025 pm 11:39 PM

VS Code To switch Chinese mode: Open the settings interface (Windows/Linux: Ctrl, macOS: Cmd,) Search for "Editor: Language" settings Select "Chinese" in the drop-down menu Save settings and restart VS Code

What is vscode What is vscode for? What is vscode What is vscode for? Apr 15, 2025 pm 06:45 PM

VS Code is the full name Visual Studio Code, which is a free and open source cross-platform code editor and development environment developed by Microsoft. It supports a wide range of programming languages ​​and provides syntax highlighting, code automatic completion, code snippets and smart prompts to improve development efficiency. Through a rich extension ecosystem, users can add extensions to specific needs and languages, such as debuggers, code formatting tools, and Git integrations. VS Code also includes an intuitive debugger that helps quickly find and resolve bugs in your code.

vscode cannot install extension vscode cannot install extension Apr 15, 2025 pm 07:18 PM

The reasons for the installation of VS Code extensions may be: network instability, insufficient permissions, system compatibility issues, VS Code version is too old, antivirus software or firewall interference. By checking network connections, permissions, log files, updating VS Code, disabling security software, and restarting VS Code or computers, you can gradually troubleshoot and resolve issues.

See all articles