zoukankan      html  css  js  c++  java
  • (转载)CentOS6下 源代码方式安装openERP7.0

    CentOS6下 源代码方式安装openERP7.0

    安装背景 :CPU32 bit,CentOS 6.4版本,openERP7.0,linux shell为bash,PostgreSQL9.2

    1. CentOS 的安装选项有最小化安装、基本服务器安装、虚拟主机安装等等的,这里采用的是基本服务器安装

    2、安装postgresql9.2 

    如果有其他版本的pgsql的话,可以通过命令卸载 #yum remove postgres 

    #su root   用root用户来安装, 中间会切换用户!

    #mkdir  /tmp

    #cd /tmp 这是系统的临时目录,里面的文件不重要,即使误删危害也不大,所以推荐在tmp目录下做临时性操作

    #rpm -Uvh http://yum.pgrpms.org/9.2/redhat/rhel-6-i386/pgdg-centos92-9.2-6.noarch.rpm

    64bit的cpu 请用下面的rpm
    #rpm -Uvh http://yum.pgrpms.org/9.2/redhat/rhel-6-x86_64/pgdg-centos92-9.2-6.noarch.rpm 

    #yum -y install postgresql92 postgresql92-server postgresql92-libs postgresql92-contrib postgresql92-devel //使用yum安装相关依赖包
    #service postgresql-9.2 initdb //初始化pg数据库
    #service postgresql-9.2 start //启动pg服务
    #chkconfig postgresql-9.2 on //将pg启动服务加入CentOS的启动列表,相当于windows里面的启动项

    #su – postgres //切换到postgres用户,该用户为安装pg时安装包自动创建的,它是pg默认的超级用户,在该用户环境下有一些管理命令
    -bash-4.1(postgres)$createuser –superuser openerp //创建一个叫openerp的超级用户(此时创建的用户只是数据库的用户,openerp在操作系统中并不存在,请注意其中的区别)

    3.安装openerp

    #rpm -ivh http://dl.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm  //从网络上安装epel包, 32bit的就安装这个

    #rpm -ivh http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm//,x86_64版本的

    请安装后面这个

    #su root  //切换回root

    #yum -y install python-psycopg2 python-lxml PyXML python-setuptools libxslt-python pytz python-matplotlib python-babel python-mako python-dateutil python-psycopg2 pychart pydot python-reportlab python-devel python-imaging python-vobject hippo-canvas-python mx python-gdata python-ldap python-openid python-werkzeug python-vatnumber pygtk2 glade3 pydot python-dateutil python-matplotlib pygtk2 glade3 pydot python-dateutil python-matplotlib python python-devel python-psutil python-docutils makeautomake gcc gcc-c++ kernel-devel byacc flashplugin-nonfree poppler-utils pywebdav //安装OE依赖的库,大部分都是python库,也有一部分其他依赖库
    wget http://gdata-python-client.googlecode.com/files/gdata-2.0.17.zip

    #unzip gdata-2.0.17.zip
    #cd gdata-2.0.17
    #python setup.py install

    #cd /tmp
    #rm -rf openerp* //清理不用的旧的openerp开头的所有文件(慎用)
    #wget http://nightly.openerp.com/7.0/nightly/src/openerp-7.0-latest.tar.gz //下载OE源代码包,准备安装
    #tar xvzf openerp-7.0-latest.tar.gz //解压OE源代码包
    #mkdir /opt/oe7
    #cp -R openerp*/{openerp,install/{openerp-server.init,openerp-server.conf},openerp-server,setup.py} /opt/oe7 //将我们需要的文件拷贝到安装目录
    #adduser openerp //创建openerp用户,它与postgres创建的openerp是关联的
    #chown openerp:openerp /opt/oe7 -R //将OE安装目录下的所有文件所有者设定为openerp用户

    #cd /opt/oe7
    #chmod u+x openerp-server.init //.init文件是oe的一个启动脚本,需要给它设置可执行权限
    #mv openerp-server.init /etc/init.d/oe7server 
    #chkconfig oe7server on //将oe加入CentOS启动列表
    #cp openerp-server.conf /etc //将OE的配置文件拷贝到/etc目录下,如果想自定义配置文件路径可以通过给openerp-server设置选项或者修改openerp-server.init文件里面的路径来实现,这里采用的方法不用做修改,较为简单
    //到这里OE基本上安装完成了,但是启动的时候会报错,主要是仍旧缺少一些依赖包

    #cd /opt/oe7
    #python setup.py install //这个安装程序会自动从网上下载需要的依赖包,并且会创建一些目录,我们只需要保留openerp.egg-info目录,如果删除该目录,OE启动会有警告信息

    #adduser openerp 
    #chown openerp:openerp /opt/oe7 -R //将OE安装目录的所有者递归授予openerp

    #service oe7server start //启动OE,

    报错,原因是执行 /etc/init.d/oe7server的时候,找不到pid文件,用文本编辑器打开/etc/init.d/oe7server

    查看下,发现是PIDFILE=/var/run/openerp/openerp-server.pid 这行引起的,

    那就 用文本编辑器建立一个空的文件,并命名为openerp-server.pid,

    放到指定的目录/var/run/openerp/下面,如果没有相应的目录,手动创建就可以了。

    #chmod 755 openerp-server.pid  //修改读写权限

    #service oe7server restart 

    浏览器中输入127.0.0.1:8069 试试看是不是可以了看到openerp的登陆画面了。

    注意:安装后的模块目录为/usr/lib/python2.6/site-packages/openerp-7.0_20140616_231123-py2.6.egg/openerp/addons

  • 相关阅读:
    LeetCode 811. Subdomain Visit Count (子域名访问计数)
    LeetCode 884. Uncommon Words from Two Sentences (两句话中的不常见单词)
    LeetCode 939. Minimum Area Rectangle (最小面积矩形)
    LeetCode 781. Rabbits in Forest (森林中的兔子)
    LeetCode 739. Daily Temperatures (每日温度)
    三种方式实现按钮的点击事件
    239. Sliding Window Maximum
    14.TCP的坚持定时器和保活定时器
    13.TCP的超时与重传
    12.TCP的成块数据流
  • 原文地址:https://www.cnblogs.com/showker/p/4238149.html
Copyright © 2011-2022 走看看