找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索
广告投放联系QQ68610888
查看: 9034|回复: 35

[N1盒子] 【原创】N1 安装GoodERP企业管理系统

[复制链接]
发表于 2018-10-14 12:47 | 显示全部楼层 |阅读模式
本帖最后由 烟屁股 于 2018-10-14 12:57 编辑

GoodERP(odoo 10.0)是基于Python和Node.js的前后端开发的开源软件,网上现有安装教程都是AMD64架构,也就是X86 PC服务器教程,咱们的N1是ARM架构,不能用。
既然是基于Python的,想跑在N1盒子上面,那就可以使用Python虚拟机来部署,废话不多说,开干!

软件环境,我选择了Armbian_5.44_S9xxx_Debian_stretch_3.14.29_server_20180729,目前看来,4.18.7版本还是一个beta版,问题多多,选择回避。

首先安装依赖包,楼主很懒,下面的命令行都是网上抄的,将就看,将就用
用root用户名和密码,putty登录
  1. sudo apt update && sudo apt -y upgrade

  2. sudo apt install libpng-dev

  3. sudo apt-get install python3 python-dev python3-dev \
  4.      build-essential libssl-dev libffi-dev \
  5.      libxml2-dev libxslt1-dev zlib1g-dev \
  6.      python3-pip

  7. sudo apt install git python-pip build-essential python-dev libxslt-dev libzip-dev libldap2-dev libsasl2-dev node-less

  8. sudo apt install -y curl wget git vim unzip python python-setuptools libjpeg-dev
复制代码
安装NodeJS
  1. curl -sL https://bootstrap.pypa.io/get-pip.py | sudo -E python -

  2. curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -

  3. sudo apt-get install -y nodejs

  4. sudo npm config set registry https://registry.npm.taobao.org

  5. sudo npm install -g less
复制代码
再来安装几个依赖包
  1. sudo apt-get install python-lxml

  2. sudo apt-get install wkhtmltopdf

  3. sudo apt-get -y install -f --no-install-recommends

  4. sudo apt autoremove
复制代码
安装PostgreSQL数据库服务
  1. sudo apt-get install -y postgresql postgresql-server-dev-9.6
复制代码
切换root用户名,需要输入root密码
  1. su
复制代码
安装Python 2.7虚拟机
  1. pip install virtualenv
复制代码
添加用户,用户名是gooderp,用户目录是/opt/gooderp
  1. useradd -m -d /opt/gooderp -U -r -s /bin/bash gooderp
复制代码
PostgreSQL数据库,添加用户gooderp
  1. sudo su - postgres -c "createuser -s gooderp"
复制代码
切换用户到 gooderp,并切换目录到/opt/gooderp
  1. su gooderp

  2. cd
复制代码
git下载GoodERP
  1. git clone http://github.com/osbzr/gooderp_addons;
  2. git clone http://github.com/osbzr/base
复制代码
建立一个Python虚拟机,虚拟机的目录gooderp-venv
  1. virtualenv gooderp-venv
复制代码
激活虚拟机操作
  1. source gooderp-venv/bin/activate
复制代码
安装GoodERP运行所需要的环境依赖软件
  1. pip install -r base/requirements.txt

  2. pip install simplejson httplib2
复制代码
退出虚拟机环境
  1. deactivate
复制代码
创建一个GoodERP运行设置文件,以下代码,请全部“一次性”复制,然后粘帖,执行
  1. cat <<EOF | tee ~/gooderp.conf
  2. [options]
  3. db_user = gooderp
  4. db_password = good
  5. addons_path = /opt/gooderp/gooderp_addons
  6. logfile = /opt/gooderp/gooderp.log
  7. EOF
复制代码
退出gooderp用户,返回root用户
  1. exit
复制代码
创建一个gooderp.service文件,来让GoodERP可以开机自启动
  1. nano /etc/systemd/system/gooderp.service
复制代码

将下面的内容全部复制,然后粘帖到文件中,CTRL+X,然后Y键,保存退出
  1. [Unit]
  2. Description=gooderp
  3. Requires=postgresql.service
  4. After=network.target postgresql.service

  5. [Service]
  6. Type=simple
  7. SyslogIdentifier=gooderp
  8. PermissionsStartOnly=true
  9. User=gooderp
  10. Group=gooderp
  11. ExecStart=/opt/gooderp/gooderp-venv/bin/python /opt/gooderp/base/odoo-bin -c /opt/gooderp/gooderp.conf
  12. StandardOutput=journal+console

  13. [Install]
  14. WantedBy=multi-user.target
复制代码
让自启动配置文件生效
  1. sudo systemctl daemon-reload

  2. sudo systemctl enable gooderp.service
复制代码
启动GoodERP
  1. sudo systemctl start gooderp.service
复制代码
查看GoodERP启动后的状态是否正常
  1. sudo systemctl status gooderp.service
复制代码
部署过程完毕!


另外,在使用当中,在“创建用户”时,会出现报错信息,需要修改一个js文件,按下面的方法操作,文件路径
  1. /opt/gooderp/base/odoo/addons/web_editor/static/src/js/transcoder.js
复制代码
找到第12行
  1. if (sheets[i].rules) {
复制代码
修改为
  1. if (sheets[i].hasOwnProperty('rules')) {
复制代码

完工!

打开浏览器,输入N1的IP:8069
  1. http://192.168.1.xxx:8069/
复制代码

又可以玩了!

最后说一句:N1真特么超值!





我的恩山、我的无线 The best wifi forum is right here.
 楼主| 发表于 2018-10-14 13:02 | 显示全部楼层
附送一张运行截图

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?立即注册

×
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2018-10-14 13:02 | 显示全部楼层
真特么会玩
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2018-10-14 13:11 | 显示全部楼层
老哥们花里胡哨的,真滴会玩啊
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2018-10-14 14:01 | 显示全部楼层
先收藏备用了
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2018-10-14 14:03 | 显示全部楼层
不明觉厉(  )
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2018-10-14 14:06 | 显示全部楼层
虽然用不到,但还是为大佬的折腾精神点赞。
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2018-10-14 14:14 | 显示全部楼层
纠正一下,cPython 不存在虚拟机,那叫解释器,英文 Python Interpreter,PyPy 才有虚拟机。
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2018-10-14 15:02 | 显示全部楼层
你们真会玩
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2018-10-14 15:06 | 显示全部楼层
http://bin.entware.net/aarch64-k ... -1_aarch64-3.10.ipk


entware 不是都直接安装这些东西的吗?怎么还会像楼主这样麻烦
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2018-10-14 15:31 | 显示全部楼层
这个敢这样玩不一般受得
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2018-10-14 17:40 | 显示全部楼层
直接安装odoo吧,gooderp貌似资源少一些
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2018-10-14 17:43 | 显示全部楼层
装完后运行,是不是卡的一笔?

点评

只是安装功能模块的时候,会觉得有点卡,运行起来,还行  详情 回复 发表于 2018-10-15 11:58
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2018-10-15 08:08 | 显示全部楼层
是不是卡的一笔?
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2018-10-15 11:20 | 显示全部楼层
哈,太感谢兄弟了,真的太牛了!谢谢谢谢!
兄弟啥时候能出个odoo的教程呢,感觉这个资源更多,再次感谢兄弟!

点评

gooderp就是基于odoo 10.0二次开发的,适合于中国用户的版本,我觉得挺好。 软件,最重要在于使用,没有必要追新  详情 回复 发表于 2018-10-15 12:00
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

有疑问请添加管理员QQ86788181|手机版|小黑屋|Archiver|恩山无线论坛(常州市恩山计算机开发有限公司版权所有) ( 苏ICP备05084872号 )

GMT+8, 2024-4-20 10:22

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

| 江苏省互联网有害信息举报中心 举报信箱:js12377 | @jischina.com.cn 举报电话:025-88802724 本站不良内容举报信箱:68610888@qq.com 举报电话:0519-86695797

快速回复 返回顶部 返回列表