中间件搭建
-
阿里云镜像加速配置
mkdir -p /etc/docker cat > /etc/docker/daemon.json <<EOF { "registry-mirrors": ["https://uyah70su.mirror.aliyuncs.com"] } EOF
-
搭建docker
yum install -y docker-ce-19.03.5-3.el7.x86_64.rpm docker-ce-cli-19.03.5-3.el7.x86_64.rpm containerd.io-1.2.6-3.3.el7.x86_64.rpm
启动:systemctl start docker
版本查看:docker version
停止:systemctl stop docker
systemctl enable docker 显示出的docker.service路径
vim /usr/lib/systemd/system/docker.service ExecStart=/usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock --graph /data/docker
systemctl disable docker
systemctl enable docker
systemctl daemon-reload
systemctl start docker
开启动网络转发功能,默认会自动开启
查看:为1是开启的cat /proc/sys/net/ipv4/ip_forward
手动开启:
vim /etc/sysctl.conf net.ipv4.ip_forward = 1
sysctl -p #生效
安装docker-compose,运行命令:
cd /usr/local/bin
mv docker-compose-Linux-x86_64 docker-compose
chmod +x /usr/local/bin/docker-compose
检查,运行
docker-compose --version
导入镜像
docker load -i jodogne-orthanc-plugins.tar
docker load -i ohif-viewer.tar
把相关文件放入到相关文件夹下
cd /opt/docker/orthanc/ 放入orthanc.json
vim /opt/docker/orthanc/orthanc.json #文件存储位置 "StorageDirectory" : "/var/lib/orthanc/db", #修改不校验密码 "AuthenticationEnabled" : false, 结尾添加 #有用mysql存储修改 #mysql数据库 "MySQL" : { #使用mysql存储文件索引 "EnableIndex" : true, #使用mysql存储dicom文件 "EnableStorage" : false, #mysql主机ip "Host" : "120.79.142.131", #链接端口 "Port" : 65112, #对于本地主机上的UNIX,Linux设置为空 "UnixSocket" : "", #库名 "Database" : "orthanc", #用户 "Username" : "root", #密码 "Password" : "bin861UTL493", "Lock" : false }
cd /opt/docker/ohif 放入app-config.js、default.conf
vim /opt/docker/ohif/app-config.js #这个指向orthanc-plugins的8042端口 wadoUriRoot: 'http://192.168.66.244/wado', qidoRoot: 'http://192.168.66.244/dicom-web', wadoRoot: 'http://192.168.66.244/dicom-web', vim /opt/docker/ohif/default.conf #这个指向orthanc-plugins的8042端口 location /wado { proxy_pass http://ip:8042/wado; } location /dicom-web { proxy_pass http://ip:8042/dicom-web;
修改启动文件
orthanc-pluginsvim /opt/docker/orthanc/docker-compose.yml version: '2' services: orthanc-plugins: image: jodogne/orthanc-plugins:latest restart: always container_name: orthanc-plugins volumes: - /data/code/dicom/orthanc-plugins/:/var/lib/orthanc/db - /opt/docker/orthanc/orthanc.json:/etc/orthanc/orthanc.json - /opt/docker/orthanc/libOrthancWebViewer.so:/usr/local/share/orthanc/plugins/libOrthancWebViewer.so - /opt/docker/orthanc/libOrthancWebViewer.so.mainline:/usr/local/share/orthanc/plugins/libOrthancWebViewer.so.mainline ports: - "8042:8042" expose: - "8042" Ohif
vim /opt/docker/ohif/docker-compose.yml version: '2' services: ohif: image: ohif/viewer:latest restart: always container_name: ohif volumes: - /opt/docker/ohif/app-config.js:/usr/share/nginx/html/app-config.js - /opt/docker/ohif/default.conf:/etc/nginx/conf.d/default.conf ports: - "443:443" - "80:80" expose: - "80" - "443"
启动
docker-compose -f /opt/docker/orthanc/docker-compose.yml up -d
docker ps -a
访问:ip:8042 账号密码:orthanc/orthanc
docker-compose -f /opt/docker/ohif/docker-compose.yml up -d
docker ps -a
访问:ip:80
喜欢的亲可以关注点赞评论哦!以后每天都会更新的哦!本文为小编原创文章;
文章中用到的文件、安装包等可以加小编联系方式获得;
欢迎来交流小编联系方式VX:CXKLittleBrother
进入运维交流群