1、代碼拉?。?/h2> ②、通過終端命令進行clone代碼;
git clone https://github.com/odoo/odoo.git --branch master --depth 1 --single-branch ./odoo12

2、安裝大象(postgresql)數(shù)據(jù)庫:sudo apt-get install -y postgresql# 安裝完會自定生成 postgres用戶 用如下命令登錄sudo -u postgres psql# 創(chuàng)建用戶 此處創(chuàng)建用戶名為‘odoo12’ 密碼為‘123456’create user odoo12 superuser password '123456';  常用命令:
\h:查看SQL命令的解釋,比如\h select。\?:查看psql命令列表。\l:列出所有數(shù)據(jù)庫。\c [database_name]:連接其他數(shù)據(jù)庫。\d:列出當前數(shù)據(jù)庫的所有表格。\d [table_name]:列出某一張表格的結(jié)構(gòu)。\du:列出所有用戶。\e:打開文本編輯器。\conninfo:列出當前數(shù)據(jù)庫和連接的信息。
①、配置大象數(shù)據(jù)庫(postgresql)的遠程訪問: # 進入 /usr/share/postgresql/9.5目錄打開pg_hba.conf.sample 文件(文件所屬目錄根據(jù)創(chuàng)建而定)sudo vi pg_hba.conf.sample 修改前:
 修改后:
 注意:如未修改進行外部訪問在瀏覽器中會出現(xiàn)如下報錯: Uncaught Error: QWeb2: Template 'DashboardMain' not foundUncaught Error: QWeb2: Template 'mail.systray.MessagingMenu' not found
3、修改odoo.conf配置文件:
4、修改完運行odoo-bin,然后在瀏覽器輸入 localhost:8069:此時會出現(xiàn)如下兩種情況: ①、數(shù)據(jù)庫設置,如下圖,恭喜你無BUG:
 ②、無法訪問,出現(xiàn)服務器故障, 如下bug: psycopg2.OperationalError: FATAL: role 'odoo11' does not exist - - -  解決方法:
sudo su - postgres -c 'createuser -s odoo11'
 個人認為出現(xiàn)這樣的原因:是ubuntu當前用戶為odoo11,因此影響的。
5、創(chuàng)建數(shù)據(jù)庫: 注意:當點擊“Create database”時頁面出現(xiàn)雜亂現(xiàn)象,如下圖: 原因:樣式無法加載;
 處理方法:
pip install libsass #在環(huán)境下安裝 libsass包 配置完成如下:
|