网站建设分几种,智诚外包网,网站建设者属于广告经营者吗,网站开发费用报价oracle容器的使用
1.下载oracle容器
1.1拉取容器
docker pull registry.cn-hangzhou.aliyuncs.com/helowin/oracle_11g拉取国内镜像#xff0c;该镜像大小为2.99G#xff0c;已经集成了oracle环境#xff0c;拉取完可以直接用#xff0c;推荐使用这款oracle镜像
1.2查看…oracle容器的使用
1.下载oracle容器
1.1拉取容器
docker pull registry.cn-hangzhou.aliyuncs.com/helowin/oracle_11g拉取国内镜像该镜像大小为2.99G已经集成了oracle环境拉取完可以直接用推荐使用这款oracle镜像
1.2查看是否拉取成功
docker images
2.运行oracle容器
docker run -d -it -p 1521:1521 --name oracle11g --restartalways registry.cn-hangzhou.aliyuncs.com/helowin/oracle_11g 持久化启动方式如下
docker run -d -it -p 1521:1521 --name oracle --restartalways --mount sourceoracle_vol,target/home/oracle/app/oracle/oradata registry.cn-hangzhou.aliyuncs.com/helowin/oracle_11g3.配置oracle数据库
3.1进入oracle数据库
docker exec -it [容器名/容器id] bash3.2修改环境变量
3.2.1切换到root
su root密码为helowin
3.2.2编辑vi/etc/profile
在尾部添加如下内容
# oracle home目录
export ORACLE_HOME/home/oracle/app/oracle/product/11.2.0/dbhome_2
# oracle 服务名或者 SID名要记住这个名字helowin它是naivcat登录的重要选项
export ORACLE_SIDhelowin
# oracle环境变量
export PATH$ORACLE_HOME/bin:$PATHexport ORACLE_HOME/home/oracle/app/oracle/product/11.2.0/dbhome_2 export ORACLE_SIDhelowin export PATH$ORACLE_HOME/bin:$PATH最后使用指令source /etc/profile使环境变量立即生效
3.2.3创建软连接
使用命令
ln -s $ORACLE_HOME/bin/sqlplus /usr/bin3.2.4登录oracle
1.切换oracle用户
su - oracle#登录
sqlplus /nolog#连接
conn /as sysdba3.2.5修改sys system用户密码
alter user system identified by需要设置的密码;alter user sys identified by 需要设置的密码;alter profile default limit PASSWORD_LIFE_TIME UNLIMITED;3.2.6创建用户可选根据需要
用一个具有dba权限的用户登录sysdba)然后输入以下语句
create user 用户名 identified by 密码;grant connect,resource,dba to test;4.连接