Yearning_Install_demo

pip3 install -r requirements.txt 安装相应python依赖库

python3 manage.py makemigrations core && python3 manage.py migrate core 初始化数据库

echo "from core.models import Account;Account.objects.create_user(username='admin', password='Yearning_admin', group='admin',is_staff=1)" | python3 manage.py shell 添加初始化用户

echo "from core.models import grained;grained.objects.get_or_create(username='admin', permissions={'person': [], 'ddl': '1', 'ddlcon': [], 'dml': '1', 'dmlcon': [], 'dic': '1', 'diccon': [], 'dicedit': '0', 'user': '1', 'base': '1', 'dicexport': '0', 'query': '1', 'querycon': []})" | python3 manage.py shell 初始化权限

echo "from core.models import globalpermissions; globalpermissions.objects.get_or_create(authorization='global', inception={'host': '', 'port': '', 'user': '', 'password': '', 'back_host': '', 'back_port': '', 'back_user': '', 'back_password': ''}, ldap={'type': '', 'host': '', 'sc': '', 'domain': '', 'user': '', 'password': ''}, message={'webhook': '', 'smtp_host': '', 'smtp_port': '', 'user': '', 'password': '', 'to_user': '', 'mail': False, 'ding': False}, other={'limit': '', 'con_room': ['AWS', 'Aliyun', 'Own', 'Other'], 'foce': '', 'multi': False, 'query': False, 'sensitive_list': [], 'sensitive': ''})" | python3 manage.py shell 初始化动态配置信息

cp -rf Yearning/webpage/dist/* $NGINX_HOME/html/ 复制编译好的静态文件到nginx html目录下(如自行更改Nginx静态路径地址则将静态文件复制到对应静态文件目录下)

systemctl start nginx 启动nginx

$PYTHON_HOME/bin/gunicorn settingConf.wsgi:application -c gunicorn.conf 启动django

默认账号: admin 密码:Yearning_admin

你可能感兴趣的:(Yearning_Install_demo)