Odoo 中文社区

    • Register
    • Login
    • Search
    • Categories
    • Tags
    • Popular
    • Users
    • Groups
    1. Home
    2. firerain

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

    由于系统升迁的原因,本论坛部分较早期的内容存在格式和链接损坏失效的问题,并非本论坛系统本身的缺陷,望谅解

    本社区没有维护任何QQ群讨论组,任何与本社区同名的QQ群讨论组的言论与本社区无关!

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

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

    F
    • Profile
    • Following 0
    • Followers 0
    • Topics 2
    • Posts 3
    • Best 0
    • Controversial 0
    • Groups 0

    firerain

    @firerain

    0
    Reputation
    102
    Profile views
    3
    Posts
    0
    Followers
    0
    Following
    Joined Last Online

    firerain Unfollow Follow

    Latest posts made by firerain

    • 官方命令行安装的odoo,配套的postgresql监听本地所有ip

      事情是这样,在内网建了一个odoo服务器,然后用psql查库实在是查烦了。还不想每次查库都要登入web界面去查,于是就在自己的机器上装了个pgadmin的windows版,用来直接连接数据库。
      但是,用官方命令行安装的odoo,带出来的postgresql只监听127.0.0.1的5432端口,所以需要做以下修改:
      感谢OpenERP应用群的广西-黄老师提供方案
      首先修改/etc/postgresql/9.3/main/postgresql.conf
      里边儿原来有#listen_addresses = 'localhost',原来的文件中已经就是注释掉了,那么默认就只监听127.0.0.1
      注释符号去掉,改成listen_addresses = '*' ,指定监听所有IP
      然后在 /etc/postgresql/9.3/main/pg_hba.conf这里走了点儿弯路,原来以为这里是指定监听的地址,后来发现理解错误,这里指定的是能够上来访问的客户端的地址
      加一行
      host    all            all            172.16.1.1/32            trust
      这一行的意思是,在172.16.1.1这台机器上,可以使用任何用户直接登入,不校验密码
      官方命令行安装的odoo,默认带了俩登入角色,odoo和postgres,这俩用户都可以登入,所以在172.16.1.1这台机器上用这俩用户的哪个都能登入。

      posted in Odoo 开发与实施交流
      F
      firerain
    • RE: Ubuntu 14.04安装EtherPad并以服务启动

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

      posted in Odoo 开发与实施交流
      F
      firerain
    • Ubuntu 14.04安装EtherPad并以服务启动

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

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


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

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


      3. 然后安装git-core

      sudo apt-get install git-core 
      


      4. 切到刚才新建立的etherpad用户

      sudo su - etherpad -s /bin/bash 
      


      5. 从源码安装node.js

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

      ``` cd node ```
      目前node.js的最新版是v0.12.7,checkout这个版本
      ``` git checkout v0.12.7 ```
      ``` mkdir ~/local ```
      ``` ./configure –-prefix=$HOME/local/node ```
      复制上边儿那行时,请务必注意prefix前边儿是不是两个横线全部复制了
      ``` make ```
      如果提示没有make,就用apt-get安装一下make。这步时间巨长,在我的VPS上跑了大概15分钟。
      ``` make install ```
      添加环境变量
      ``` echo ‘export PATH=$HOME/local/node/bin:$PATH’ >> ~/.profile ```
      ``` echo ‘export NODE_PATH=$HOME/local/node:$HOME/local/node/lib/node_modules’ >> ~/.profile ```
      安装nmp
      ``` curl -L http://npmjs.org/install.sh | sh ```
      6. 终于可以正式开始安装etherPad了,有点小激动
      ``` cd ~ ```
      ``` git clone git://github.com/ether/etherpad-lite.git ```
      ``` cd etherpad-lite ```
      ``` bin/run.sh ```
      如果没问题,那么这时候你的9001端口已经可以访问了。这个实例是使用dirtyDB,然后没有配置管理员用户名密码的。
      接下来,配置etherPad自动运行
      Ctrl+C,把刚才的程序结束掉
      7. 图省事,切回root
      ``` su root ```
      打开 /etc/profile文件,最后添加下边儿两行
      ``` export PATH="$HOME/local/node/bin:$PATH" ```
      ``` export NODE_PATH="$HOME/local/node:$HOME/local/node/lib/node_modules" ```
      8. 建日志相关的目录
      ``` mkdir /var/log/etherpad-lite ```
      ``` chown etherpad /var/log/etherpad-lite ```
      ``` chown -R etherpad /var/log/etherpad-lite ```
      9. 建服务,这步非常非常的奇怪,文件必须以.conf结尾,否则就跑不起来
      ``` sudo vi /etc/init.d/etherpad-lite.conf ```
      把下边儿的内容粘进去,调试这个文件调试得满眼都是眼泪,不细说了……
      ```
      #!/bin/sh

      ### BEGIN INIT INFO
      # Provides:          etherpad-lite
      # Required-Start:    $local_fs $remote_fs $network $syslog
      # Required-Stop:    $local_fs $remote_fs $network $syslog
      # Default-Start:    2 3 4 5
      # Default-Stop:      0 1 6
      # Short-Description: starts etherpad lite
      # Description:      starts etherpad lite using start-stop-daemon
      ### END INIT INFO
      PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/opt/etherpad/local/node/bin
      LOGFILE=/var/log/etherpad-lite/etherpad-lite.log
      EPLITE_DIR=/opt/etherpad/etherpad-lite
      EPLITE_BIN=bin/safeRun.sh
      USER=etherpad
      GROUP=etherpad
      DESC=EtherpadLite
      NAME=etherpad-lite

      set -e

      . /lib/lsb/init-functions

      start() {
        echo "Starting $DESC... "

          start-stop-daemon --start --chuid "$USER:$GROUP" --background --make-pidfile --pidfile /var/run/$NAME.pid --exec $EPLITE_DIR/$EPLITE_BIN -- $LOGFILE || true
        echo "done"
      }
      #We need this function to ensure the whole process tree will be killed
      killtree() {
          local _pid=$1
          local _sig=${2-TERM}
          for _child in $(ps -o pid --no-headers --ppid ${_pid}); do
              killtree ${_child} ${_sig}
          done
          kill -${_sig} ${_pid}
      }
      _stop() {
        echo "Stopping $DESC... "
        if test -f /var/run/$NAME.pid; then
          while test -d /proc/$(cat /var/run/$NAME.pid); do
            killtree $(cat /var/run/$NAME.pid) 15
            sleep 0.5
          done
          rm /var/run/$NAME.pid
        fi
        echo "done"
      }
      status() {
        status_of_proc -p /var/run/$NAME.pid "" "etherpad-lite" && exit 0 || exit $?
      }
      case "$1" in
        start)
            start
            ;;
        stop)
          _stop
            ;;
        restart)
            _stop
            start
            ;;
        status)
            status
            ;;
        😉
            echo "Usage: $NAME {start|stop|restart|status}" >&2
            exit 1
            ;;
      esac

      exit 0
      ```
      保存退出
      10. 设定文件可执行权限
      ``` chmod +x /etc/init.d/etherpad-lite.conf ```
      11. 试一下
      ``` service etherpad-lite.conf start ```

      如果没问题,那么打开/etc/rc.local文件,在exit 0 前面加上
      ``` service etherpad-lite.conf start ```

      重启看看吧。
      posted in Odoo 开发与实施交流
      F
      firerain