平台项目 ~ 平台部署环境文档

一 前端部署
  1 安装nginx环境
      yum -y install pcre-devel
      wget http://nginx.org/download/nginx-1.1.10.tar.gz
      tar -zxvf nginx-1.1.10.tar.gz cd nginx-1.1.10
       ./configure make make install
  2 配置nginx环境 l
     listen port;
     server_name ;
    location / { root ; index index.html index.php index.htm; }
  3 启动nginx服务
  4 vue项目进行打包
     npm run build:prod
  5 将打包好的dist目录拷贝到nginx相关配置的root
  6 前端部署完成
  7 sed命令替换相应API接口的IP地址(为部署服务器IP)
    目标为js文件
二 后端部署
 1 模块安装
   生成requirements.txt python -m pip freeze > requirements.txt
   正式环境进行应用 pip3 install -r requirements.txt
 2 源码拷贝 /usr/local/python3/lib/python3.6/site-packages/django目录下
 3 部署inception服务 启动命令 /usr/local/inception-master/builddir/mysql/bin/Inception --defaults-file=/etc/inc.cnf
 4 修改pymysql-cursors.py源码
    1 pymysql 源码修改 cursors.py文件
      def _request_authentication(self):
       if int(self.server_version.split('.', 1)[0]) >= 5: self.client_flag |= CLIENT.MULTI_RESULTS
      注释掉if语句不进行判断
    2 pymysql 源码修改 cursors.py文件 对应错误pymysql.err.InternalError: (2576, 'Must start as begin statement.') 请修改pymysql/cursors.py:338行,将self._show_warnings()这一句注释掉,换成pass,
三启动后端
四进行测试

原文地址:https://www.cnblogs.com/danhuangpai/p/11383195.html