search
HomeOperation and MaintenanceDockerdocker installation and configuration oracle

docker installation and configuration oracle

Aug 26, 2021 pm 04:09 PM
dockeroracle

I have read a lot of articles on docker installing oracle on the Internet. Since there are many images, I tried several images without success. The image below is one that I installed successfully. I recorded the installation process. I hope Can help everyone.

Installation steps:

1. Use the following command to search for the image:

$ docker search oracle

2. Pull the image directly:

$ docker pull jaspeen/oracle-xe-11g  #因为版本不同有的可能是jaspeen/oracle-11g

3. After the download is completed, run the image file:

$ docker run -p 1521:1521 --name oracle_11g -d --restart=always jaspeen/oracle-xe-11g

4. Enter the usage to check whether the image is started.

$ docker ps -a

The default for the newly installed one is startup. Okay, if it does not start, use the following command to start

$ docker start oracle

docker installation and configuration oracle

5. Go into the oracle container to set the dba password, etc. You can operate sql directly in it:

$ docker exec -it oracle_11g /bin/bash
root@a96767712314:/#

After entering Oracle:

(1), Oracle is installed by default Under the oracle user, execute:

su oracle

(2) and find the directory where the sqlplus command is located. This image is in:

/u01/app/oracle/product/11.2.0/xe/bin 下
 cd /u01/app/oracle/product/11.2.0/xe/bin
 ./sqlplus / as sysdba

( 3) Change the DBA password:

alter user sys identified by newpassword;
alter user system identified by newpassword;

Now you can log in through the DBA account, or you can use tools to log in, the default SID: XE

(4). Generally, it is impossible to give a DBA account to others, so you must create an account for them: Create a new user: User name is admin and password is password

 create user admin identified by password;

(5). After creation, you will find You can't log in because you don't have authorization, so you need to authorize the login permission:

grant create session to admin

6. Stop or start the service in Docker

docker stop oracle       #停止oracle
docker start oracle       #启动oracle

7. Check the running container

docker ps

After the docker container oracle database is installed, we need to do some daily operations. Use the connection tool to connect and find some problems. The following commands will be used frequently.

Log in as system user

connect as dba;

Give admin the permission to create views

grant create view to admin;

Give admin the permission to query any table

grant select any teble to admin;

Give admin the permission to query any dictionary

grant select any dictionary to admin;

Use the sys account to give the admin account the permission to create synonym

grant create synonym to admin;

The above steps are what I have installed successfully. Follow the above Just install it step by step. If you don't understand anything, please leave a message. Thank you for your support. Hope this helps everyone.

Related recommendations: "docker tutorial"

The above is the detailed content of docker installation and configuration oracle. 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
Kubernetes vs. Docker: Understanding the RelationshipKubernetes vs. Docker: Understanding the RelationshipMay 12, 2025 am 12:16 AM

The relationship between Docker and Kubernetes is: Docker is used to package applications, and Kubernetes is used to orchestrate and manage containers. 1.Docker simplifies application packaging and distribution through container technology. 2. Kubernetes manages containers to ensure high availability and scalability. They are used in combination to improve application deployment and management efficiency.

Docker: The Container Revolution and Its ImpactDocker: The Container Revolution and Its ImpactMay 10, 2025 am 12:17 AM

Docker solves the problem of consistency in software running in different environments through container technology. Its development history has promoted the evolution of the cloud computing ecosystem from 2013 to the present. Docker uses Linux kernel technology to achieve process isolation and resource limitation, improving the portability of applications. In development and deployment, Docker improves resource utilization and deployment speed, supports DevOps and microservice architectures, but also faces challenges in image management, security and container orchestration.

Docker vs. Virtual Machines: A ComparisonDocker vs. Virtual Machines: A ComparisonMay 09, 2025 am 12:19 AM

Docker and virtual machines have their own advantages and disadvantages, and the choice should be based on specific needs. 1.Docker is lightweight and fast, suitable for microservices and CI/CD, fast startup and low resource utilization. 2. Virtual machines provide high isolation and multi-operating system support, but they consume a lot of resources and slow startup.

Docker's Architecture: Understanding Containers and ImagesDocker's Architecture: Understanding Containers and ImagesMay 08, 2025 am 12:17 AM

The core concept of Docker architecture is containers and mirrors: 1. Mirrors are the blueprint of containers, including applications and their dependencies. 2. Containers are running instances of images and are created based on images. 3. The mirror consists of multiple read-only layers, and the writable layer is added when the container is running. 4. Implement resource isolation and management through Linux namespace and control groups.

The Power of Docker: Containerization ExplainedThe Power of Docker: Containerization ExplainedMay 07, 2025 am 12:07 AM

Docker simplifies the construction, deployment and operation of applications through containerization technology. 1) Docker is an open source platform that uses container technology to package applications and their dependencies to ensure cross-environment consistency. 2) Mirrors and containers are the core of Docker. The mirror is the executable package of the application and the container is the running instance of the image. 3) Basic usage of Docker is like running an Nginx server, and advanced usage is like using DockerCompose to manage multi-container applications. 4) Common errors include image download failure and container startup failure, and debugging skills include viewing logs and checking ports. 5) Performance optimization and best practices include mirror optimization, resource management and security improvement.

Kubernetes and Docker: Deploying and Managing Containerized AppsKubernetes and Docker: Deploying and Managing Containerized AppsMay 06, 2025 am 12:13 AM

The steps to deploy containerized applications using Kubernetes and Docker include: 1. Build a Docker image, define the application image using Dockerfile and push it to DockerHub. 2. Create Deployment and Service in Kubernetes to manage and expose applications. 3. Use HorizontalPodAutoscaler to achieve dynamic scaling. 4. Debug common problems through kubectl command. 5. Optimize performance, define resource limitations and requests, and manage configurations using Helm.

Docker: An Introduction to Containerization TechnologyDocker: An Introduction to Containerization TechnologyMay 05, 2025 am 12:11 AM

Docker is an open source platform for developing, packaging and running applications, and through containerization technology, solving the consistency of applications in different environments. 1. Build the image: Define the application environment and dependencies through the Dockerfile and build it using the dockerbuild command. 2. Run the container: Use the dockerrun command to start the container from the mirror. 3. Manage containers: manage container life cycle through dockerps, dockerstop, dockerrm and other commands.

Docker and Linux: Building Portable ApplicationsDocker and Linux: Building Portable ApplicationsMay 03, 2025 am 12:17 AM

How to build portable applications with Docker and Linux? First, use Dockerfile to containerize the application, and then manage and deploy the container in a Linux environment. 1) Write a Dockerfile and package the application and its dependencies into a mirror. 2) Build and run containers on Linux using dockerbuild and dockerrun commands. 3) Manage multi-container applications through DockerCompose and define service dependencies. 4) Optimize the image size and resource configuration, enhance security, and improve application performance and portability.

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 Article

Hot Tools

EditPlus Chinese cracked version

EditPlus Chinese cracked version

Small size, syntax highlighting, does not support code prompt function

SublimeText3 English version

SublimeText3 English version

Recommended: Win version, supports code prompts!

PhpStorm Mac version

PhpStorm Mac version

The latest (2018.2.1) professional PHP integrated development tool

Dreamweaver Mac version

Dreamweaver Mac version

Visual web development tools

Safe Exam Browser

Safe Exam Browser

Safe Exam Browser is a secure browser environment for taking online exams securely. This software turns any computer into a secure workstation. It controls access to any utility and prevents students from using unauthorized resources.