Docker安裝Oracle_11g
1.拉取oracle_11g鏡像
1
|
docker pull registry.cn-hangzhou.aliyuncs.com /helowin/oracle_11g |
2.創(chuàng)建oracle11g容器
1
|
docker run -d -p 1521:1521 --name oracle11g registry.cn-hangzhou.aliyuncs.com /helowin/oracle_11g |
3.查看oracle11g容器是否創(chuàng)建成功
1
|
docker ps -a |
4.啟動(dòng)oracle11g容器
1
|
docker start oracle11g |
5.進(jìn)入oracle11g容器進(jìn)行配置
1
|
docker exec -it oracle11g bash |
6.切換到root用戶下進(jìn)行配置
1
|
su root |
密碼為:helowin
7、編輯profile文件配置ORACLE環(huán)境變量
1
|
vi /etc/profile |
8、最后添加以下3行配置
1
2
3
|
export ORACLE_HOME= /home/oracle/app/oracle/product/11 .2.0 /dbhome_2 export ORACLE_SID=helowin export PATH=$ORACLE_HOME /bin :$PATH |
保存 ::wq
讓配置生效:source /etc/profile
9、創(chuàng)建軟連接
1
|
ln -s $ORACLE_HOME /bin/sqlplus /usr/bin |
10、切換到oracle 用戶
1
|
su - oracle |
11、登錄sqlplus并修改sys、system用戶密碼
1
|
sqlplus /nolog |
1
|
conn /as sysdba |
12、修改sys、system用戶密碼并刷新權(quán)限
1
2
3
|
alter user system identified by oracle; alter user sys identified by oracle; ALTER PROFILE DEFAULT LIMIT PASSWORD_LIFE_TIME UNLIMITED; |
退出:exit;
13、查看一下oracle實(shí)例狀態(tài)
1
|
lsnrctl status |
14、用nacivat連接oracle數(shù)據(jù)庫
服務(wù)名:helowin
(一定要填寫helowin)
密碼:oracle(第12步設(shè)置的密碼)
到此這篇關(guān)于Docker安裝Oracle_11g的文章就介紹到這了,更多相關(guān)Docker安裝Oracle_11g內(nèi)容請搜索服務(wù)器之家以前的文章或繼續(xù)瀏覽下面的相關(guān)文章希望大家以后多多支持服務(wù)器之家!
原文鏈接:https://blog.csdn.net/qq_42021376/article/details/115444547