adminset
部署方式
1.github下载安装包,链接(https://github.com/guohongze/adminset)
2.基于docker方式部署
adminset基于python2.7开发
由于第一种方式部署存在python众多版本依赖包安装报错问题,改成python3依然有很多模块缺失的
docker部署的,docker镜像有问题,很多配置文件的路径错误
采取折中的方法:
根据安装包的auto-install.sh脚本内容执行
流程:
1.
docker run -d --name adminset12 --net=host --privileged -v /data/docker:/var/opt -d ppabc/adminset
2.
docker exec -it adminset12 /bin/bash
3.在docker里面执行
/bin/systemctl daemon-reload
/bin/systemctl restart mariadb
/bin/systemctl restart celery
/bin/systemctl restart beat
/bin/systemctl restart mongod
/bin/systemctl restart webssh(根据安装文件webssh安装脚本去重新安装一遍)
/bin/systemctl restart nginx
/bin/systemctl restart sshd
/bin/systemctl restart adminse
根据启动服务报错,创建相关的目录文件
3.拷贝安装包的相关文件到docker隐射的目录,主要是main文件
4.重新安装
pip install -U pip
pip install --ignore-installed enum34==1.1.6
pip install --ignore-installed ipaddress==1.0.18
pip install kombu==4.2.1
pip install celery==4.2.1
pip install billiard==3.5.0.3
pip install pytz==2017.3
5.进去 ......./vendor/django-celery-results-master目录
python setup.py build
python setup.py install
6.安装相关模块
pip install -r requirements.txt
python manage.py makemigrations
python manage.py migrate
遇到报错no wheel,需要安装wheel:
pip install wheel
遇到报错Running setup.py install for python-ldap ... error
yum install openldap
yum install openldap24-libs
yum install openldap-clients(有些不需要)
yum install openldap-devel
yum install openssl-devel
7.重启各个服务
/bin/systemctl daemon-reload
/bin/systemctl restart mariadb
/bin/systemctl restart celery
/bin/systemctl restart beat
/bin/systemctl restart mongod
/bin/systemctl restart webssh
/bin/systemctl restart nginx
/bin/systemctl restart sshd
/bin/systemctl restart adminset
####重点是查看auto.install.sh脚本的内容反复排错
浙公网安备 33010602011771号