1. solve cross-domain problems && Chinese display problems
from flask import Flask, url_for, request, render_template, redirect
from flask_cors import * #新增
from datetime import timedelta, datetime
import hashlib
import pymysql
import re
import recommend
app = Flask(__name__)
# 配置
app.config['DEBUG'] = True
app.config['SEND_FILE_MAX_AGE_DEFAULT'] = timedelta(seconds = 1)
# 解决跨域问题:No 'Access-Control-Allow-Origin' header is present on the requested resource.
CORS(app, supports_credentials=True)
# 解决中文显示的问题
app.config['JSON_AS_ASCII'] = False
2. do have documents, but not in the terminal upgrade
Restart terminal (update path)
3. Run the file does not have permission (permission denied)
chmod +x ...
4. centos decompression failed spark .tgz
tar -xzf spark .... tgz fail
Check this with file compression package, found to be in html format
Solution: windows unzip, upload
5. No XXX.sh in cnetos run spark upgrade
In centos terminal file is .sh, but the spark for the .cmd file format
Solution: Direct Input XXX.cmd to run