Since installing Oracle on Linux is very troublesome, and will encounter various problems. I can refer to the manual mode previously written a blog: Install Oracle Database on Linux virtual machines (Ultra full version!)
We really are very easy to use oracle Docker installation.
First, the preparatory work
1. Install docker
yum install -y docker
2. Start Docker Service
systemctl start docker
3. Get Ali cloud oracle mirror
docker pull registry.cn-hangzhou.aliyuncs.com/helowin/oracle_11g
4. Review the acquired image
docker images
Second, the use docker installation oracle
Starting container 1. Mirroring
docker run -p 1521:1521 --name oracle_11g -v /usr/local/cloud/oracle:/home/oracle/app/oracle -d --restart=always registry.cn-hangzhou.aliyuncs.com/helowin/oracle_11g
-p shows a map of the local port and container port, both for the 1521, is the default port of oracle
Taken container name --name
-v persistence operations, format -v <directory host>: <container directories>, acts to mount the local directory to the directory of the container, corresponding to both
-d background container and return the container id
When always Docker --restart = restart automatically start container
2. Check container
docker ps
3. Go to the container
docker exec -it container ID / bin / bash
4. Switch to the root account (after the oracle to enter the account)
su root password: helowin (password are the same)
5. Edit Environment Variables
vi / etc / profile add the following:
export ORACLE_HOME=/home/oracle/app/oracle/product/11.2.0/dbhome_2
export ORACLE_SID=helowin
export PATH=$ORACLE_HOME/bin:$PATH
6. Create a soft link
ln -s $ORACLE_HOME/bin/sqlplus /usr/bin
7. Log in sqlplus and modify the sys, system user password
sqlplus /nolog
conn / as sysdba
change Password:
alter user system identified by YOUR_PASSWORD;
alter user sys identified by YOUR_PASSWORD;
ALTER PROFILE DEFAULT LIMIT PASSWORD_LIFE_TIME UNLIMITED;
8. Use the links Navicat Oracle
Note that the following service name