


What 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”命令进行安装。
本教程操作环境: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
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
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='sqlplus / as sysdba' export PS1="[\`whoami\`@\`hostname\`:"'\$PWD]\$ ' EOF
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
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
进入/soft/database开始安装Oracle软件:
./runInstaller -jreLoc /etc/alternatives/jre_1.8.0
上传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
点击再次检查,忽略swap警告:
解决方案:
su - oracle sed -i 's/^\(\s*\$(MK_EMAGENT_NMECTL)\)\s*$/\1 -lnnz11/g' $ORACLE_HOME/sysman/lib/ins_emagent.mk
执行完点击retry重试:
root用户下执行脚本:
/u01/app/oraInventory/orainstRoot.sh /u01/app/oracle/product/11.2.0/db/root.sh
reboot重启主机。
5、创建数据库
1)打开监听
su - oracle lsnrctl start lsnrctl status
2、连接VNC远程工具或者直接打开虚拟机图形化界面
dbca
这里填写数据库实例名称和dbname,本次填写orcl。
不安装EM工具。
这里输入SYS和SYSTEM用户的密码,需要记住。
这里选择前面建好的/oradata目录用来存放数据文件。
不开启闪回日志,不开启归档日志,可以建好库之后再手动修改。
数据库内存分配,选择手动分配,占用物理内存70%左右。
block_size根据实际情况选择,一旦建库无法修改,默认8K。
字符集根据需要进行选择,默认AL32UTF8。
等待建库完成即可。
6、连接数据库
确保监听正常启动,并监听数据库
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,'lucifer'); commit;
2)通过PL/SQL连接test用户
相关推荐:《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!

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

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

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics



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).

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.

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).

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 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.

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

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.

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.
