開始前請確認是否有安裝 git 及python的版本
git
and python 2.7.10
.
1) 至gitbut 下載 odoo10:
git clone --depth=1 --branch=10.0 https://github.com/odoo/odoo.git
2) 安裝資料庫postgresql 及pgadmin4:Postgresapp
新增PATH,可以使用相關postgresql的語法
至 ~/.bash_profile
增加
export PATH=$PATH:/Applications/Postgres.app/Contents/Versions/latest/bin
3) 安裝pip
sudo easy_install pip
4)安裝nodejs
5) 安裝less
sudo npm install -g less less-plugin-clean-css
如果成功會有以下畫面:
/usr/local/bin/lessc -> /usr/local/lib/node_modules/less/bin/lessc
less-plugin-clean-css@1.5.1 /usr/local/lib/node_modules/less-plugin-clean-css
└── clean-css@3.4.9 (source-map@0.4.4, commander@2.8.1)
less@2.6.0 /usr/local/lib/node_modules/less
├── mime@1.3.4
├── graceful-fs@3.0.8
├── image-size@0.3.5
├── errno@0.1.4 (prr@0.0.0)
├── promise@6.1.0 (asap@1.0.0)
├── source-map@0.4.4 (amdefine@1.0.0)
├── mkdirp@0.5.1 (minimist@0.0.8)
└── request@2.69.0 (aws-sign2@0.6.0, forever-agent@0.6.1, tunnel-agent@0.4.2, oauth-sign@0.8.1, is-typedarray@1.0.0, caseless@0.11.0, stringstream@0.0.5, isstream@0.1.2, json-stringify-safe@5.0.1, extend@3.0.0, tough-cookie@2.2.1, node-uuid@1.4.7, qs@6.0.2, combined-stream@1.0.5, mime-types@2.1.9, form-data@1.0.0-rc3, aws4@1.2.1, hawk@3.1.3, bl@1.0.2, har-validator@2.0.6, http-signature@1.1.1)
6) 安裝相關套件
打開命令例執行: xcode-select --install
打開命令列執行:
brew install autoconf automake libtool
brew install libxml2 libxslt libevent
7)安裝python dependencies, 在命令列中至odoo 10 下載的目錄中找到requirements.txt,再輸入下列語法
sudo easy_install -U setuptools
pip install --user -r requirements.txt
其結果應該如下:
Successfully installed Babel-1.3 Jinja2-2.7.3 Mako-1.0.1 MarkupSafe-0.23 Pillow-2.7.0 PyYAML-3.11 Python-Chart-1.39 Werkzeug-0.9.6 argparse-1.2.1 beautifulsoup4-4.4.1 decorator-3.4.0 docutils-0.12 feedparser-5.1.3 gdata-2.0.18 gevent-1.0.2 greenlet-0.4.7 jcconv-0.2.3 lxml-3.4.1 mock-1.0.1 ofxparse-0.14 passlib-1.6.2 psutil-2.2.0 psycogreen-1.0 psycopg2-2.5.4 pyPdf-1.13 pydot-1.0.2 pyparsing-2.0.1 pyserial-2.7 python-dateutil-1.5 python-ldap-2.4.19 python-openid-2.2.5 python-stdnum-1.2 pytz-2013.7 pyusb-1.0.0b2 qrcode-5.1 reportlab-3.1.44 requests-2.6.0 six-1.4.1 suds-jurko-0.6 vatnumber-1.2 vobject-0.6.6 xlwt-0.7.5
8) 執行odoo ,在odoo 10 的下載目錄中,找到odoo-bin,執行下列命令即可
./odoo-bin
執行結果如下
9) 開啓odoo