Odoo中文社区可以通过以下两个域名访问:shine-it.net , odoo.net.cn

原论坛用户的基本信息和发帖这里都予以保留,请注意:原论坛用户无需重新注册新用户,但是您的密码需要重置

开发人员可以登录gitter讨论组: http://gitter.im/odoo-china/Talk, 需要github账号

如果您登录系统碰到问题,请在微信公众号留言:

Ubuntu 14.04安装EtherPad并以服务启动



  • 前前后后看了数篇文章,最后好歹终于是成功把EtherPad-lite搭起来了。先说明对Linux并不非常熟,教程有点儿大杂烩的意思,各位将就着看,反正最后肯定能跑起来。稍微整理了一下,过程供各位参考。<br />1. 添加一个用来跑EtherPad-lite的用户:<br />

    sudo adduser --system --home=/opt/etherpad --group etherpad
    

    <br />2. 接下来需要安装Node.js,先把下边儿这堆东西装了<br />

    sudo apt-get install g++ curl libssl-dev apache2-utils 
    

    <br />3. 然后安装git-core<br />

    sudo apt-get install git-core 
    

    <br />4. 切到刚才新建立的etherpad用户<br />

    sudo su - etherpad -s /bin/bash 
    

    <br />5. 从源码安装node.js<br />

    git clone git://github.com/joyent/node.git 
    

    <br />

    cd node
    

    <br />目前node.js的最新版是v0.12.7,checkout这个版本<br />

    git checkout v0.12.7 
    

    <br />

    mkdir ~/local
    

    <br />

    ./configure –-prefix=$HOME/local/node
    

    <br />复制上边儿那行时,请务必注意prefix前边儿是不是两个横线全部复制了<br />

    make
    

    <br />如果提示没有make,就用apt-get安装一下make。这步时间巨长,在我的VPS上跑了大概15分钟。<br />

    make install
    

    <br />添加环境变量<br />

    echo ‘export PATH=$HOME/local/node/bin:$PATH’ &gt;&gt; ~/.profile
    

    <br />

    echo ‘export NODE_PATH=$HOME/local/node:$HOME/local/node/lib/node_modules’ &gt;&gt; ~/.profile
    

    <br />安装nmp<br />

    curl -L http://npmjs.org/install.sh | sh 
    

    <br />6. 终于可以正式开始安装etherPad了,有点小激动<br />

    cd ~
    

    <br />

    git clone git://github.com/ether/etherpad-lite.git
    

    <br />

    cd etherpad-lite
    

    <br />

    bin/run.sh
    

    <br />如果没问题,那么这时候你的9001端口已经可以访问了。这个实例是使用dirtyDB,然后没有配置管理员用户名密码的。<br />接下来,配置etherPad自动运行<br />Ctrl+C,把刚才的程序结束掉<br />7. 图省事,切回root<br />

    su root
    

    <br />打开 /etc/profile文件,最后添加下边儿两行<br />

    export PATH=&quot;$HOME/local/node/bin:$PATH&quot;
    

    <br />

    export NODE_PATH=&quot;$HOME/local/node:$HOME/local/node/lib/node_modules&quot;
    

    <br />8. 建日志相关的目录<br />

    mkdir /var/log/etherpad-lite
    

    <br />

    chown etherpad /var/log/etherpad-lite
    

    <br />

    chown -R etherpad /var/log/etherpad-lite
    

    <br />9. 建服务,这步非常非常的奇怪,文件必须以.conf结尾,否则就跑不起来<br />

    sudo vi /etc/init.d/etherpad-lite.conf
    

    <br />把下边儿的内容粘进去,调试这个文件调试得满眼都是眼泪,不细说了……<br />

    <br />#!/bin/sh<br /><br />### BEGIN INIT INFO<br /># Provides:&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; etherpad-lite<br /># Required-Start:&nbsp; &nbsp; $local_fs $remote_fs $network $syslog<br /># Required-Stop:&nbsp; &nbsp;  $local_fs $remote_fs $network $syslog<br /># Default-Start:&nbsp; &nbsp;  2 3 4 5<br /># Default-Stop:&nbsp; &nbsp; &nbsp; 0 1 6<br /># Short-Description: starts etherpad lite<br /># Description:&nbsp; &nbsp; &nbsp;  starts etherpad lite using start-stop-daemon<br />### END INIT INFO<br />PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/opt/etherpad/local/node/bin<br />LOGFILE=/var/log/etherpad-lite/etherpad-lite.log<br />EPLITE_DIR=/opt/etherpad/etherpad-lite<br />EPLITE_BIN=bin/safeRun.sh<br />USER=etherpad<br />GROUP=etherpad<br />DESC=EtherpadLite<br />NAME=etherpad-lite<br /> <br />set -e<br /> <br />. /lib/lsb/init-functions<br /> <br />start() {<br />&nbsp; echo &quot;Starting $DESC... &quot;<br /> <br />&nbsp; &nbsp; start-stop-daemon --start --chuid &quot;$USER:$GROUP&quot; --background --make-pidfile --pidfile /var/run/$NAME.pid --exec $EPLITE_DIR/$EPLITE_BIN -- $LOGFILE || true<br />&nbsp; echo &quot;done&quot;<br />}<br />#We need this function to ensure the whole process tree will be killed<br />killtree() {<br />&nbsp; &nbsp; local _pid=$1<br />&nbsp; &nbsp; local _sig=${2-TERM}<br />&nbsp; &nbsp; for _child in $(ps -o pid --no-headers --ppid ${_pid}); do<br />&nbsp; &nbsp; &nbsp; &nbsp; killtree ${_child} ${_sig}<br />&nbsp; &nbsp; done<br />&nbsp; &nbsp; kill -${_sig} ${_pid}<br />}<br />_stop() {<br />&nbsp; echo &quot;Stopping $DESC... &quot;<br />&nbsp; if test -f /var/run/$NAME.pid; then<br />&nbsp; &nbsp; while test -d /proc/$(cat /var/run/$NAME.pid); do<br />&nbsp; &nbsp; &nbsp; killtree $(cat /var/run/$NAME.pid) 15<br />&nbsp; &nbsp; &nbsp; sleep 0.5<br />&nbsp; &nbsp; done<br />&nbsp; &nbsp; rm /var/run/$NAME.pid<br />&nbsp; fi<br />&nbsp; echo &quot;done&quot;<br />}<br />status() {<br />&nbsp; status_of_proc -p /var/run/$NAME.pid &quot;&quot; &quot;etherpad-lite&quot; &amp;&amp; exit 0 || exit $?<br />}<br />case &quot;$1&quot; in<br />&nbsp; start)<br />&nbsp; &nbsp; &nbsp; start<br />&nbsp; &nbsp; &nbsp; ;;<br />&nbsp; stop)<br />&nbsp; &nbsp; _stop<br />&nbsp; &nbsp; &nbsp; ;;<br />&nbsp; restart)<br />&nbsp; &nbsp; &nbsp; _stop<br />&nbsp; &nbsp; &nbsp; start<br />&nbsp; &nbsp; &nbsp; ;;<br />&nbsp; status)<br />&nbsp; &nbsp; &nbsp; status<br />&nbsp; &nbsp; &nbsp; ;;<br />&nbsp; *)<br />&nbsp; &nbsp; &nbsp; echo &quot;Usage: $NAME {start|stop|restart|status}&quot; &gt;&amp;2<br />&nbsp; &nbsp; &nbsp; exit 1<br />&nbsp; &nbsp; &nbsp; ;;<br />esac<br /><br />exit 0 <br />
    

    <br />保存退出<br />10. 设定文件可执行权限<br />

    chmod +x /etc/init.d/etherpad-lite.conf
    

    <br />11. 试一下<br />

    service etherpad-lite.conf start
    

    <br /><br />如果没问题,那么打开/etc/rc.local文件,在exit 0 前面加上<br />

    service etherpad-lite.conf start
    

    <br /><br />重启看看吧。



  • 分享的. 即是最棒的........<br /><br />感谢分享...



  • 忘记说了,在odoo里边儿配置时需要的api-key,etherpad-lite安装路径下有一个APIKEY.txt,打开就是了。



  • 很棒的分享