- 容器方式部署
- 1. Docker安装
- 2. Docker Compose 安装
- 3. 部署Jasmin
- 4. jCLI登录测试
sudo yum install -y yum-utils sudo yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo sudo yum install docker-ce docker-ce-cli containerd.io systemctl start docker systemctl enable docker
如果是国内服务器的话, 建议还是配置下docker aliyun加速
vim /etc/docker/daemon.json { "registry-mirrors": ["https://9cpn8tt6.mirror.aliyuncs.com"] } ### 重新加载配置并重启docker systemctl daemon-reload systemctl restart docker2. Docker Compose 安装
sudo curl -L "https://github.com/docker/compose/releases/download/1.29.1/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose sudo chmod +x /usr/local/bin/docker-compose ## 验证是否安装成功 docker-compose --version ## 如果不成功的话, 可以添加如下: sudo ln -s /usr/local/bin/docker-compose /usr/bin/docker-compose3. 部署Jasmin
Jasmin 是通过docker-compose 方式部署, 需要jasmin, redis,rabbitmq三个容器。
docker-compose.yml 如下:
version: "3" services: redis: image: redis:alpine restart: unless-stopped rabbit-mq: image: rabbitmq:alpine restart: unless-stopped jasmin: image: jookies/jasmin:0.10 restart: unless-stopped container_name: jasmin volumes: - /var/log/jasmin:/var/log/jasmin ports: - 2775:2775 - 8990:8990 - 1401:1401 depends_on: - redis - rabbit-mq environment: REDIS_CLIENT_HOST: redis AMQP_BROKER_HOST: rabbit-mq
完成之后执行命令拉起jasmin
docker-compose up -d
成功后如下显示:
jCLI使用端口8990监听, 所以telnet 127.0.0.1 8990 能够进入console
关于使用部分,参考官网:
https://docs.jasminsms.com/en/latest/installation/index.html#pypi
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)