//Update Apr142013: update console.
感谢@sundaymouse的工作,他在排错的时候对我帮助很大。
Many thanks to @sundaymouse, for his help while debugging.
YouBBS,一个极其简单的BBS。
类似V2EX的风格。
这东西的脾气很有意思,当然,我的windows比这个东西脾气还大。。。给我造成了无尽的苦难。
我git使用的版本是最新的V1.04,以后会和作者同步更新。
YouBBS, a simple BBS programme with a style like V2EX(a famous BBS).
It keeps giving me trouble, well............much less than troubles that my Windows gives me.
Anyway, I will keep updating this with the author.
在Openshift上部署过程:
1.建立一个程序
rhc app create -a (名字) -t php-5.3
2.建立数据库
rhc cartridge add -a (名) -c mysql-5.1
3.配置git,加入一个源
cd (名字)
git remote add upstream -m master git://github.com/superwbd/YouBBS-Openshift.git
git pull -s recursive -X theirs upstream master
(新版也是这么更新的)
4.push上去-
git push
然后运行一下http://(你的地址)/install.php(这一步不能省略!)
请注意:第一个注册用户是管理员。。。所以赶快注册!
1.create a application
rhc app create -a {name you want} -t php-5.3
2.create a database
rhc cartridge add -a {name you want} -c mysql-5.1
3.add a source of git
cd {name you want}
git remote add upstream -m master git://github.com/superwbd/YouBBS-Openshift.git
git pull -s recursive -X theirs upstream master
(same way if there exists any update…)
4.push it
git push
To finish, run (Your Address)/install.php
Warning: The 1st person that register would be made Admin.....So do it quick!
可能的问题:(与软件实际无关)
执行 git push ,直接提示everything-up-to-date。
这时,本地执行:
git add .
git commit -m "随便敲点什么"
这样就可以git push 了。
Problem solving:
When you "git push", it says "everything-up-to-date".
You should:
git add .
git commit -m "Anything you like...."
Now you should be able to "git push".
有问题请在下面反馈。
软件相关,由于没有看代码,而且自己没有用这个东西,所以可能不能给你好的建议。。。请去http://youbbs.sinaapp.com/ 和作者联系。我这里暂时只能解答和部署相关的问题。
有更新了,请在下面留言,我会抽时间把这边的东西更新的。
For problems related deploying, please leave me messages here.
For problems related to daily using, please go to http://youbbs.sinaapp.com/ , which is its official BBS......(Hope you can type Chinese...)
最后一点怨念的吐槽:
这些东西在大庭广众下不敢说,自己的地界就可以说了。。。
砸场子向:
AppFog的问题在于,每次推送,改属性的时候,之前的东西全消失。。。
而且,虽然机房支持多,RAM大一些,但是权限太小,总感觉不过瘾。。。
BAE,SAE吧,要花钱,肉疼。
Openshift就解决了这些问题。
此文联动:(极其建议阅读)
ssunday.info/?p=109 全面配置教程: CentOS配置Etherpad-lite在线文稿编辑服务
www.superwbd3.tk/2013/01/openshift-etherpad/ 详细教程:Openshift 搭建etherpad在线文档协同编辑服务(基于MongoDB)
(感谢@sundaymouse 的工作,他的工作在这个程序的设置部分启发我很多。)
刚才的文章写得很好了。
但是,MongoDB很难备份,这是个大问题。
所以,我fork了一下,把这个东西挪到Mysql上面,这样备份就方便很多了。
大体和前文相同。
1.建立一个程序
rhc app create -a (名字) -t php-5.3
2.建立数据库
rhc app cartridge add -a (名) -c mysql-5.1
3.配置git,加入一个源
cd (名字)
git remote add upstream -m master
git pull -s recursive -X theirs upstream master
(新版也是这么更新的)
4.push上去-
git push
这样就好了。全自动。使用时没有发现问题。
I forked a version of etherpad to run with mysql, for mongodb is not easy to backup.
1.create a application
rhc app create -a {name you want} -t php-5.3
2.create a database
rhc app cartridge add -a {name you want} -c mysql-5.1
3.add a source of git
cd {name you want}
git remote add upstream -m master
git pull -s recursive -X theirs upstream master
(same way if there exists any update...)
4.push it
git push
Now it should be running properly.
(更新:Mysql版本,请移步http://www.superwbd3.tk/2013/01/openshift-etherpad-mysql/ ,那个备份更加方便,不知性能方面会不会有缺失?)
此文联动:(极其建议阅读)
ssunday.info/?p=109 全面配置教程: CentOS配置Etherpad-lite在线文稿编辑服务
本文主要步骤来源自https://github.com/openshift/etherpad-example。
我们认为你已经安装了openshift需要的程序,建立了自己的空间名。
1.建立一个程序
rhc app create -a (名字) -t nodejs-0.6
(能否scale?待考)
2.建立数据库(坑爹的一步)
rhc app cartridge add -a (名) -c mongodb-2.2
3.配置git,加入一个源
cd (名字)
git remote add upstream -m master
git pull -s recursive -X theirs upstream master
(新版也是这么更新的)
4.push上去-
git push
好了,应该就成功了。。。
1G的空间,放纯文本,还是相当能装的。。。
绑定域名:
rhc alias add (名字) www.######.###
(未来折腾计划:加入https支持(累了暂时不折腾) 支持密码(完成,但是受众小,不准备在公开版本做) 换用mysql(完成))
更新:
cloudflare通过设置,可以让直接连接走CDN,但是ssh有可能受影响。。。
现在CDN正常。。。
。。。
cloudflare的域名直连是默认不走CDN的。。。
所以。。。WP里面的域名要设成www开头的绑定的地址。。。
看看这次CDN是否有效吧。。。
好吧。。。WP终于恢复正常了。。。
然后。。。设置固定链接。
然后。。。WP又一次华丽丽地挂了。。。
解决:
把.htaccess文件里面的东西重写一下。。。
CDN开启,不知效果如何,期待~~~
P.S:Openshift修改.htaccess可以直接开启gzip。估计上次是插件闹的。。。
P.S2:CDN是有用的。。。至少能让你网站彻底挂了的时候不至于彻底无法访问。。。
误操作,wp又一次罢工了。
P.S:rm “缺德的文件名” 可以删除带特殊符号的文件。。。。
问题在于,还是500错误。。。
数据库弄不好,所以来旁门左道。
1.删主题:未果。。。。
2.删wp-config.php:不会弄。。。
3.wp_options 31项:链接 未果。。。
4.wp_options 36项:插件 成功~~~
继续折腾。。。
装主题把WP闹罢工了怎么办?
进文件管理。(所以说,一定要装一个备份的脱离wp的文件管理器)
把出问题的主题删了。
进admin。
换个主题。
回来了。
P.S:主题这个东西不要胡闹。。。后果很严重。。。
妈的,误关了页面,幸亏有自动保存,要不亏大了。。。
总结:(Openshift与APPFog比)
Last update:05/02/13
1.容量稍稍大了那么一点点 :
共3G,每个程序1G固定, 对 1G固定
1.5G(还是3G?待考) 比 1G 但是如果只有一个程序,理论可以达到3G
2.单文件大了好多
无限 (估计不会长久的,但是也说不定?)对 2M
3.流量不限,福音
Unlimited 对 50G
4.机房没有选择,只有EC2东岸
EC2东岸 对(EC2东岸弗吉尼亚,EC2新加坡,EC2东欧爱尔兰,HP Openstack东岸拉斯维加斯,MS Azure 南部san antonio(暂不可用),RackspaceDFW南部达拉斯)
5.稳定性估计一样
redhat旗下 对 APPFog(自己就够大了,还把phpfog吃了)
6.有了ssh,管理文件方便多了
ssh支持 对 自己传文件管理系统去。。。
7.刚上手没有appfog那么易用,估计以后会是神器
一上午 对 1.5小时从0开始
(实际上,用好了,openshift比appfog强不是一星半点)
8.支持语言:
Openshift可以自行搭建环境,例如新版Node.js 对 不知道。。。
没差别。。。至少做站没差别。。。
9.内存:
1.5G共享,每模块最多512M 对 总计2G,各程序可调
问题:
appfog设好不能改。。。否则全白费。。。(谁特么想起给WP开这个的?!)
appfog权限小,很多插件用不了。。。
先写这么多。。。
Welcome to WordPress. This is your first post. Login with the username admin and password OpenShiftAdmin to delete this post and begin blogging! (But first, remember to change your password!)