利用dotCloud提供的免费资源反向代理Dropbox!.note

创建时间:1361358726 修改时间: 1540200664

9957-1540200664303以下操作均是在UBUNTU下进行5780-1540200664304首先要感谢CoX桑提供的源码7182-1540200664304没有CoX桑的源码我就无法部署这个东西3595-1540200664304围观地址8591-1540200664305http://www.v2ex.com/t/28458027true027#003884027http://www.v2ex.com/t/284582994-1540200664309以下操作UBUNTU推介(win下重现操作繁琐的1B)7083-1540200664309快捷键: Ctrl+Alt+T(呼出终端)1629-1540200664310sudo apt-get install python-setuptools && sudo easy_install pip && sudo pip install dotcloud && sudo pip install tornado && sudo pip install dropbox2085-1540200664311(这段命令的部分是我从igfω抄来的)5938-1540200664311上面在配置本次部署所需的依赖7187-1540200664311并且请确定你的Python版本有2.7或者以上713true8066-1540200664312下载一些东西(请记住名称)9684-1540200664314Dropbox SDK2749-1540200664315https://www.dropbox.com/static/developers/dropbox-python-sdk-1.5.1.zip070true070#003884070https://www.dropbox.com/static/developers/dropbox-python-sdk-1.5.1.zip7717-15402006643165017-1540200664316Cox氏提供的源码包9490-1540200664317http://dropbox-dachaji.dotcloud.com/f/dotcloud.tar.gz053true053#003884053http://dropbox-dachaji.dotcloud.com/f/dotcloud.tar.gz6498-15402006643183846-1540200664318然后去注册个Dropbox账号(有的话就不用了)1990-1540200664318http://db.tt/jacpdIw (事先说明这是我个人的推广链接)020true020#003884020http://db.tt/jacpdIw9059-15402006643195037-1540200664319然后去创建一个Dropbox APP1253-1540200664319https://www.dropbox.com/developers/apps039true039#003884039https://www.dropbox.com/developers/apps7723-1540200664320创建时选择Full Dropbox(这个很重要)517true4740-1540200664321这里请记下App key和App secret(填写wsgi.py时会用到)1056-15402006643216895-15402006643227260-1540200664322到https://www.dropbox.com/home/Public136true136#003884136https://www.dropbox.com/home/Public2145-1540200664323随便丢一个文件然后获取直接链接 记下数字ID9144-154020066432359B5E475EF5942B2A65A2153C4C0156C5563041812-1540200664324https://www.dotcloud.com/settings/(这里注册一个dotcloud的账号 并在这个页面获得去申请dotcloud API Key(这里要注册一个账号并在本页面获得APIKey)034true034#003884034https://www.dotcloud.com/settings/7498-1540200664325具体长这样5831-15402006643267AFEEAE29374461EB055C9A55ECF53F3556858821-1540200664327以下对文本进行一些修改8650-1540200664327源码包要改动两处文本(nginx.conf和wsgi.py)2740-1540200664328Dropbox SDK要改动一处文本(example目录下的cli_client.py)3620-1540200664328解压上述两个8858-1540200664328先解压Dropbox SDK然后修改example目录下的cli_client.py6226-1540200664329像这样引号内分别填上App key和App secret保存之4381-154020066433375356246951A4579B2C2FCC8D1AD2CA55561731932-1540200664334好了1067-1540200664334终端里cd 到这个的目录下(ubuntu下和win方式差不多直接把GUI里的文件夹拖到终端里就行了)5177-1540200664334回车8043-1540200664334然后输入python example/cli_client.py432true9795-1540200664336操作正确的会出现8060-1540200664340Dropbox>08true1835-1540200664340再输入9834-1540200664341login05true9128-1540200664341不出所料的话会出现5143-1540200664341url: [url]010true4022-1540200664341Please authorize in the browser. After you're done, press enter.064true6168-1540200664342大意是让你在“链接上右键打开链接”之后批准浏览器请求 最终回车1030-1540200664342这一切操作正确的话9398-1540200664343在Dropbox SDK的根目录下会生成token_store.txt打开它获得你的token5820-1540200664343解压源码包修改nginx.conf和wsgi.py9063-1540200664344F3DA57C2A29744A8BBBD4904EB77AA985563314-15402006643443471A0280D214968A88B6240372BCDD69113-1540200664344同样保存之4697-15402006643458688-1540200664345cd到源码包的目录下8224-1540200664345输入 dotcloud311true6114-1540200664345提示输入api key时,粘贴。等待初始化完成,即终端变成可输入状态。5838-1540200664346输入 dotcloud create 123456(123456是项目的名称 你可以随意取)325true4673-1540200664347输入 dotcloud push 123456323true4240-1540200664347祈祷不要报错4357-1540200664348报错了就用鼠标复制然后扔到翻译机9751-1540200664348没报错?1016-1540200664348你会得到一个url5798-1540200664348这个url就是以上操作的成品了6139-1540200664348等等5990-1540200664348让我们dotcloud info 123456.www 一下327true3572-1540200664349看到了一个ssh账号?1037-1540200664349为我怎么用?2718-1540200664349嘛嘛igfω有讲过哦6977-1540200664350http://qcfyx-xu1314jian.dotcloud.com/