


下载本文档
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
【移动应用开发技术】微信公众账号开发者认证之uwsgi结合web.py的示例分析
[root@mail
~]#
uname
-aLinux
2.6.18-128.el5xen
#1
SMP
Wed
Jan
21
11:12:42
EST
2009
x86_64
x86_64
x86_64
GNU/Linux[root@mail
~]#
cat
/etc/redhat-release
CentOS
release
5.3
(Final)
Python
Version:
[root@mail
~]#
pythonPython
2.7.5
(default,
Jun
14
2013,
18:21:34)
[GCC
4.1.2
20080704
(Red
Hat
4.1.2-44)]
on
linux2Type
"help",
"copyright",
"credits"
or
"license"
for
more
information
uwsgi
Version:
uWSGI
1.4.9
web.py
Version:
web.py-0.37tar
xvf
Python-2.7.5.tgz
cd
Python-2.7.5
./configure
&&
make
all
&&
make
install
&&
make
distclean
mv
/usr/bin/python
/usr/bin/python.bak
ln
-sv
/usr/local/bin/python2.7
/usr/bin/python
sed
-i
s@/usr/bin/python@/usr/bin/python2.4@
/usr/bin/yum
tar
zxvf
uwsgi-1.4.9.tar.gz
cd
uwsgi-1.4.9
python
uwsgiconfig.py
--build
python
setup.py
install
tar
zxvf
web.py-0.37.tar.gz
cd
web.py-0.37
python
setup.py
installimport
web
import
hashlib
urls
=
(
'/','index'
)
class
index:
def
GET(self):
token='shiji'
sign
=
web.input()
tmplist
=
[token,sign.timestamp,sign.nonce]
tmplist.sort()
tmpstr
=
"%s%s%s"%tuple(tmplist)
tmpstr
=
hashlib.sha1(tmpstr).hexdigest()
if
tmpstr
==
sign.signature:
return
sign.echostr
else:
return
None
app
=
web.application(urls,globals())
application
=
app.wsgifunc()[root@mail
html]#
uwsgi
-s
:9000
-w
webinput
***
Starting
uWSGI
1.4.9
(64bit)
on
[Mon
Jun
17
17:19:16
2013]
***
compiled
with
version:
4.1.2
20080704
(Red
Hat
4.1.2-44)
on
17
June
2013
17:15:20
os:
Linux-2.6.18-128.el5xen
#1
SMP
Wed
Jan
21
11:12:42
EST
2009
nodename:
machine:
x86_64
clock
source:
unix
pcre
jit
disabled
detected
number
of
CPU
cores:
8
current
working
directory:
/usr/local/nginx/html
detected
binary
path:
/usr/local/bin/uwsgi
uWSGI
running
as
root,
you
can
use
--uid/--gid/--chroot
options
***
WARNING:
you
are
running
uWSGI
as
root
!!!
(use
the
--uid
flag)
***
***
WARNING:
you
are
running
uWSGI
without
its
master
process
manager
***
your
processes
number
limit
is
61234
your
memory
page
size
is
4096
bytes
detected
max
file
descriptor
number:
52100
lock
engine:
pthread
robust
mutexes
uwsgi
socket
0
bound
to
TCP
address
:9000
fd
3
Python
version:
2.7.5
(default,
Jun
14
2013,
18:21:34)
[GCC
4.1.2
20080704
(Red
Hat
4.1.2-44)]
***
Python
threads
support
is
disabled.
You
can
enable
it
with
--enable-threads
***
Python
main
interpreter
initialized
at
0xfe30520
your
server
socket
listen
backlog
is
limited
to
100
connections
mapped
72424
bytes
(70
KB)
for
1
cores
***
Operational
MODE:
single
process
***
WSGI
app
0
(mountpoint='')
ready
in
0
seconds
on
interpreter
0xfe30520
pid:
10775
(default
app)
***
uWSGI
is
running
in
multiple
interpreter
mode
***
spawned
uWSGI
worker
1
(and
the
only)
(pid:
10775,
cores:
1)
13712480011371460796shiji
[pid:
10775|app:
0|req:
1/1]
71
()
{34
vars
in
616
bytes}
[Mon
Jun
17
17:19:43
2013]
GET
/?signature=915c123b81282828ae1eecdc202336d07dfc15d8&echostr=5889465363321509055×tamp=1371460796&nonce=1371248001
=>
generated
4
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 二零二五年度二手房买卖合同交易双方信息保密修订版24
- 二零二五年度车辆维修保养费用担保协议
- 二零二五年度海洋油气田安装工程施工服务协议
- 2025版HSE风险评估与管理合同范本
- 2025版牧民草原放牧权租赁合同
- 2025版餐饮业品牌推广合作合同范本
- 二零二五年度高品质保温材料采购销售合同模板
- 二零二五年度风力发电机组安装施工合同
- 二零二五年度智能办公楼租赁服务及配套设施合同
- 二零二五年度车贷居间服务合同电子版下载及使用规定
- 车辆悬架空气弹簧产品生产技术现状
- 现场观摩会策划方案
- 酒店安全培训
- IATF16949-2016版质量体系培训
- 装卸工安全培训课件
- 安全与急救学习通超星期末考试答案章节答案2024年
- 高位截瘫护理查房
- 酒店贵重物品寄存室管理制度
- 2024图书约稿合同范本
- 人教版(2024)八年级上册物理第2章《声现象》单元测试卷(含答案解析)
- 【正版授权】 ISO 13408-5:2006 EN Aseptic processing of health care products - Part 5: Sterilization in place
评论
0/150
提交评论