标签:name head ase python div rom oct root wan
1. 安装nginx:
rpm -ivh http://nginx.org/packages/centos/7/noarch/RPMS/nginx-release-centos-7-0.el7.ngx.noarch.rpm yum install nginx systemctl start nginx.service
查看nginx 是否启动:
curl http://127.0.0.1
出现 Welcome to nginx! nginx 部署成功
<!DOCTYPE html>
<html>
<head>
<title>Welcome to nginx!</title>
2. 安装 falsk :
pip install flask
vim server.py
# -*- coding: utf-8 -*- from flask import Flask app = Flask(__name__) @app.route("/") def hello(): return "Hello Flask!" if __name__ == "__main__": app.run(host=‘0.0.0.0‘, port=80, debug=True)
python server.py
[root@izj6c2quobtad98kx7jgtyz ~]# curl http://127.0.0.1 Hello Flask!
出现 Hello Flask! 成功
3. 安装 uwsgi:
pip install uwsgi
vim uwsgi.ini
[uwsgi] socket = 127.0.0.1:81 pythonpath = /wang/ module = run callable = app processes = 1 threads = 1
未完待续
标签:name head ase python div rom oct root wan
原文地址:http://www.cnblogs.com/dockers/p/7513019.html