官方文档
https://github.com/HttpRunner/HttpRunnerManager/
使用python3.6.0安装
安装依赖
yum -y install zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel gdbm-devel db4-devel libpcap-devel xz-devel
下载python
wget https://www.python.org/ftp/python/3.6.1/Python-3.6.1.tgz
安装在/usr/local/python3
mkdir -p /usr/local/python3
解压
tar -zxvf Python-3.6.1.tgz
进入解压后的目录,编译安装
cd Python-3.6.1
./configure --prefix=/usr/local/python3
make && make install
建立软连接
ln -s /usr/local/python3/bin/python3 /usr/bin/python3
将python加入PATH中
完成后测试
python3 -V
pip3 -V
切换镜像使用国外镜像会超时报错,并设置超时间
pip3 install -r requirements.txt -i https://pypi.mirrors.ustc.edu.cn/simple --default-timeout=100
如遇到安装mysql依赖报错解决
yum install mysql-devel gcc gcc-devel python-devel
升级pip版本
Command “python setup.py egg_info” failed with error code 1 in /tmp/pip-build-g45m6jmb/cryptography/
启动celery时有报错
AttributeError: module ‘tornado.web’ has no attribute ‘asynchronous’
安装5.1.1的tornado后再启动不会报错
pip3 install tornado==5.1.1
后台启动
nohup python3 manage.py runserver 0.0.0.0:8000 > /dev/null 2>&1 &
nohup python3 manage.py celery -A HttpRunnerManager worker --loglevel=info > /dev/null 2>&1 &
nohup python3 manage.py celery beat --loglevel=info > /dev/null 2>&1 &
在打开报告时有遇到ERR_CONTENT_LENGTH_MISMATCH的报错
但是我又没有使用nginx部署,后来将端口改为8000不报错,猜测可能和nginx有冲突导致
修改了框架里面的js和css,全部下载到本地,运行更加稳定
链接:https://pan.baidu.com/s/13XAQtVJ3eXiN96y7qV5-Vg
提取码:2esx
复制这段内容后打开百度网盘手机App,操作更方便哦