Foreground: Nothing wants to play Linux, think of the future can deploy their own web project up, and then I want to install an oracle ... I didn't know anything about Linux before, only that the company's projects were deployed on top, and then it took nearly five days from the loading system to the completion of Oracle, because there were other jobs in the middle ... Write this blog is because I read the introduction of the Internet more or less a bit incomplete ... By the way convenient to record
Off the topic, then go to the point.
Preparation material: Virtual machine VIRTUALBOX,CENTOS7 operating system, network (nonsense)
1. Run terminal, download wnameless/oracle-xe-11g
After download (download will be slow, patient wait ...) Be able to do other things)
2. View the containers in Docker: Docker images
There's something in the box, the instructions are already installed.
3. Then run: Docker run-d-P 9090:8080-p 1521:1521 wnameless/oracle-xe-11g A string of numbers and letters in the frame, indicating that the run was successful 9090 : 8080 is the 8080 port of the Oraclexe management interface in the container is mapped to the 9090 port of the local machine, 1521:1521 is the 1521 port of the Oraclexe 1521 port mapping bit native, the Docker ps-a view container, found that Oracle is already inside the
4. Next is the Start container Docker start container ID where container ID is the string I drew in the box below
5. Enter the container Docker exec-ti container ID bashà this container ID or the ID in the
View process PS AX
6. Configure the environment variables (the JDK is configured, this should be understood to configure this)
Find-name Oracle can find the installed Oracle location
Export Oracle_home=./u01/app/oracle/product/11.2.0/xe Set Oracle_home (remember that the path is before/bin)
Export Oracle_sid=hellooracle Set SID
Export path= $PATH: $ORACLE _home/bin Set PATH
7. Enter the Oracle:su–oracle (the successful words will become $)
Oracle SYS administrator logged on with operating system rights: Sqlplus/as SYSDBA
Turn from: 80656780
Docker installs wnameless/oracle-xe-11g and runs (handwriting super verbose)