- Linux下OpenEdge安装及环境配置
- OpenEdge 程序安装
- 运行环境配置
- Docker 安装
- Ubuntu
- CentOS
- Debian 9/Raspberry Pi 3
- Python 开发环境安装
- Ubuntu 18.04 LTS/Debian 9/Raspberry Pi 3
- CentOs
- 指定默认 Python 版本
- Python Runtime 依赖模块安装
- Docker 安装
- 常见问题
Linux下OpenEdge安装及环境配置
OpenEdge 主要使用 Go 语言开发,支持两种运行模式,分别是 docker 容器模式和 native 进程模式。
本文主要介绍 OpenEdge 程序的安装以及运行所需环境的安装与配置。
OpenEdge 程序安装
前往下载页面找到机器对应版本并进行下载,完成后解压到任意目录。(推荐下载最新版程序运行包)
注: 官方下载页面仅提供容器模式程序运行包,如需以进程模式运行,请参考从源码编译相关内容。
运行环境配置
Docker 安装
可通过以下命令进行安装:
curl -sSL https://get.docker.com | sh
支持平台:
x86_64-centos-7x86_64-fedora-28x86_64-fedora-29x86_64-debian-jessiex86_64-debian-stretchx86_64-debian-busterx86_64-ubuntu-trustyx86_64-ubuntu-xenialx86_64-ubuntu-bionicx86_64-ubuntu-cosmics390x-ubuntu-xenials390x-ubuntu-bionics390x-ubuntu-cosmicppc64le-ubuntu-xenialppc64le-ubuntu-bionicppc64le-ubuntu-cosmicaarch64-ubuntu-xenialaarch64-ubuntu-bionicaarch64-ubuntu-cosmicaarch64-debian-jessieaarch64-debian-stretchaarch64-debian-busteraarch64-fedora-28aarch64-fedora-29aarch64-centos-7armv6l-raspbian-jessiearmv7l-raspbian-jessiearmv6l-raspbian-stretcharmv7l-raspbian-stretcharmv7l-debian-jessiearmv7l-debian-stretcharmv7l-debian-busterarmv7l-ubuntu-trustyarmv7l-ubuntu-xenialarmv7l-ubuntu-bionicarmv7l-ubuntu-cosmic
Ubuntu
使用命令
sudo snap install docker // Ubuntu16.04 往后
或
sudo apt install docker.io
即可完成 Docker 安装。
CentOS
使用命令
yum install docker
即可完成 docker 安装。
注意 :
- Docker 安装完成后可通过一下命令查看所安装Docker版本。
docker version
- 官方提供 Dockerfile 为多阶段镜像构建,如后续需自行构建相关镜像,需要安装17.05 及以上版本的 Docker 来build Dockerfile。但生产环境可以使用低版本 Docker 来运行镜像,经目前测试,最低可使用版本为 12.0。
Debian 9/Raspberry Pi 3
使用以下命令完成安装:
curl -sSL https://get.docker.com | sh
更多内容请参考官方文档。
Python 开发环境安装
- OpenEdge 提供了 Python Runtime,支持 Python 2.7 版本的运行。
Ubuntu 18.04 LTS/Debian 9/Raspberry Pi 3
使用如下命令安装 Python 2.7:
sudo apt updatesudo apt upgradesudo apt install python2.7sudo apt install python-pip
CentOs
执行以下命令检查已安装Python版本:
python -V
如果显示未安装,可使用以下命令进行安装:
yum install pythonyum install python-pip
或者通过源码编译安装:
yum install gcc openssl-devel bzip2-develwget https://www.python.org/ftp/python/2.7.15/Python-2.7.15.tgztar xzf Python-2.7.15.tgzmake altinstallcurl "https://bootstrap.pypa.io/get-pip.py" -o "get-pip.py"python2.7 get-pip.py
输入命令查看 Python 版本为 2.7.* 后为安装正确。
指定默认 Python 版本
某些情况下需要指定默认 Python 版本为上述安装版本。通过以下命令完成(重启有效):
alias python=/yourpath/python2.7
Python Runtime 依赖模块安装
按照上述步骤完成 Python 2.7版本的安装后,需要安装 Python Runtime 运行所需模块:
pip install pyyaml protobuf grpcio
常见问题
A. Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Get http://%2Fvar%2Frun%2Fdocker.sock/v1.38/images/json: dial unix /var/run/docker.sock: connect: permission denied
- 提供管理员权限
- 通过以下命令添加当前用户到docker用户组:
sudo usermod -aG docker ${USER}su - ${USER}
如提示没有 docker group,使用如下命令创建新docker用户组后再执行上述命令:
sudo groupadd docker
B. Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
按照问题A解决方案执行后如仍报出此问题,重新启动docker服务即可。
例,CentOs 下启动命令:
systemctl start docker
最后更新于 2018-12-28 10:23:09
原文: https://openedge.tech/docs/setup/Install-OpenEdge-on-Linux
