Chinaunix首页 | 论坛 | 博客
  • 博客访问: 562027
  • 博文数量: 61
  • 博客积分: 2438
  • 博客等级: 大尉
  • 技术积分: 871
  • 用 户 组: 普通用户
  • 注册时间: 2010-07-28 08:04
文章分类
文章存档

2013年(1)

2012年(8)

2011年(15)

2010年(37)

分类: LINUX

2013-03-08 10:47:51

摘自etherpad.org的about:
Etherpad lite allows you to edit documents collaboratively in real-time, much like a live multi-player online editor, allowing you to write articles, proposals, press releases and the like, together with your friends, your fellow students or your colleagues, working on the same document at the same time. It even supports rich text editing! Additionally, Etherpad lite provides access to all data through a well-documented HTTP API and supports import/export to many major data exchange formats. The built-in plugin system makes extending the core functionality a breeze, regardless of whether you're adding support for inserting images or videos or allowing users to collaborate on tables.

这里我就不用我拙劣的英语水平给大家翻译了,一句话说就是它能够提供一个多人同时在线的文档编辑,而且可以记录修改的痕迹。

进入正题,我们要如何去搭建一个这样的服务?
首先从github上把它clone下来:`git clone git://github.com/ether/etherpad-lite.git`
etherpad的github中README.md给我们了一个很好的安装教程,这里我们主要是针对linux下的安装。
按照文档中所说的步骤进行,中间是不会有什么问题的,这个我这里亲自测试过。

需要的软件安装完毕后可以运行了看下效果了,不过这个有些不爽的是你直接./run.sh时它需要你输入一句话,所以在运行时我们可以直接./run.sh --root,这样就不会有这个提示了。然后在浏览器中输入127.0.0.1:9001/。这里的9001是指的端口号。

我们先不用管这些配置文件,按照默认的走。(因为它的文件都是用js写的,我也看不懂,所以就没有配置它,如果哪位童鞋会的话,那就可以自己定制了。)

不是说可以多人同时编辑的么,在这会你发现在别的机器上是无法访问的,例如你搭建的ip是192.168.100.123,在本机的浏览器中输入"192.168.100.123:9001"是可以访问的,但是在一个局域网内的其他机器上却是不能访问的。这里应该是9001这个端口的一些问题。

回过头来看下这个服务是如何运行起来的,在run.sh中最后有这么一句"node node_modules/ep_etherpad-lite/node/server.js $*",我们可以看到它是用node这个服务跑起来的,我们开始应该是安装过一个nodejs的软件,在网上search一下node websocket就可以找到一些资料。

点击(此处)折叠或打开

  1. /sbin/iptables -I INPUT -p tcp --dport 8081 -j ACCEPT //这行名令是修改iptables信息开放8081端口
  2. /etc/rc.d/init.d/iptables save // 这行命令保存修改的信息
  3. service iptables restart //重新启动iptables使修改生效

这里我们只需将8081修改为我们的9001就ok了,执行完之后,再重新运行run.sh,然后在一个局域网的另外机器上试试"192.168.100.123:9001",是不是就有了我们想要的结果. :)

当然,etherpad是可以进行大量的定制,从而打造适合你的一个多人在线文档编辑,这个用来记录会议,或者讨论记录是非常赞的。

这次级先到这里了,如果大家有什么问题的话,欢迎给我留言。或者email: qiaozqjhsy@gmail.com

转载:

阅读(4593) | 评论(0) | 转发(0) |
0

上一篇:系统调用日志收集系统(二)

下一篇:没有了

给主人留下些什么吧!~~