openerp安装记录及postgresql数据库问题解决

ubuntu-14.04下openerp安装记录
1、安装PostgreSQL 数据库
    a、安装
         sudo apt-get install postgresql
    安装后ubuntu系统会增加一个名为postgres的用户
    b、设置PostgreSQL数据库用户(以ubuntu系统中的postgres用户进行设置)
        进入postgres用户环境:sudo su postgres
        为数据库创建一个名为openerp的新用户:createuser openerp
        用psql -l命令查看数据库列表
        用psql template1操作查看表格
    c、
2、安装python依赖的包
       sudo apt-get install python-dateutil python-feedparser python-gdata python-ldap python-libxslt1 python-lxml python-mako python-openid python-psycopg2 python-pybabel python-pychart python-pydot python-pyparsing python-reportlab python-simplejson python-tz python-vatnumber python-vobject python-webdav python-werkzeug python-xlwt python-yaml python-zsi
3、安装openerp
       openerp下载网址:http://nightly.odoo.com/7.0/nightly/deb/openerp_7.0-latest-1_all.deb(这个链接用迅雷可以下载,在浏览器上老是报404错误)
       安装:sudo dpkg -i openerp_7.0-latest-1_all.deb
       输出错误信息如下:
       Unpacking openerp (7.0-20140804-231303-1) ...
       dpkg: dependency problems prevent configuration of openerp:
       openerp depends on python-docutils; however:
       Package python-docutils is not installed.
       openerp depends on python-jinja2; however:
       Package python-jinja2 is not installed.
       openerp depends on python-mock; however:
       Package python-mock is not installed.
       openerp depends on python-psutil; however:
       Package python-psutil is not installed.
       openerp depends on python-unittest2; however:
       Package python-unittest2 is not installed.

        dpkg: error processing package openerp (--install):
         dependency problems - leaving unconfigured
        Processing triggers for ureadahead (0.100.0-16) ...
        Errors were encountered while processing:
         openerp

    用以下方式解决:
        sudo apt-get -f install
        重来一次:sudo dpkg -i openerp_7.0-latest-1_all.deb
        安装完成后,openerp已经以openerp用户身份运行。用以下命令查看:
        
4、浏览器客户端登录
    在浏览器上登录http://localhost:8069 
    
按下Create Database按钮后,显示出错信息如下:
    
   其中关键信息如下:
        File "/usr/local/lib/python2.7/dist-packages/openerp-7.0_20140101_002439-py2.7.egg/openerp/sql_db.py", line 226, in execute
          res = self._obj.execute(query, params)
        ProgrammingError: permission denied to create database
    多方查找及折腾之后,分析&猜测应该是postgresql数据库的当前用户,具体说是openerp用户的权限受限,引起此故障
     查看及应对办法操作如下:
    进入操作界面: 
       postgres@zl-VirtualBox:~$ psql template1
    显示用户及属性:
            template1=# \du
           
 上面的openerp一行对应的Attributes为空
  如下操作后:
         postgres@zl-VirtualBox:~$dropuser openerp
         postgres@zl-VirtualBox:~$createuser --createdb --username postgres --createrole --pwprompt openerp
  再次进入操作界面:
        postgres@zl-VirtualBox:~$ psql template1
  显示用户及属性:
        template1=# \du
      
  上面的openerp一行对应的Attributes为Create DB
   客户端重新偿试进入系统:
        
ok

 
posted @ 2016-06-22 15:34  屌丝IT男  阅读(1800)  评论(0编辑  收藏  举报