准备工作:
在虚拟机中安装全新的Ubuntu 18.04.
Ubuntu安装的时候,建议系统用户名叫odoo,密码自己起
以下所有命令行都是在Ubuntu的命令终端中执行.
1.安装Git,python3,Postgresql等环境依赖
sudo apt-get update
sudo apt-get install openssh-server
sudo apt-get install -y git python3.5 postgresql
sudo apt-get install -y nano virtualenv xz-utils wget
sudo apt-get install -y fontconfig libfreetype6 libx11-6
sudo apt-get install -y libxext6 libxrender1 xfonts-75dpi
2.下载安装wkhtmltopdf
wget "http://security.ubuntu.com/ubuntu/pool/main/libp/libpng/libpng12-0_1.2.54-1ubuntu1.1_amd64.deb"
wget "https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.5/wkhtmltox_0.12.5-1.xenial_amd64.deb" -O /tmp/wkhtml.deb
sudo dpkg -i libpng12-0_1.2.54-1ubuntu1.1_amd64.deb
sudo dpkg -i /tmp/wkhtml.deb
sudo apt-get -fy install
3.安装Odoo构建依赖
sudo apt-get install -y gcc
sudo add-apt-repository ppa:deadsnakes/ppa
sudo apt-get install -y python3.5-dev
sudo apt-get install -y libxml2-dev libxslt1-dev
sudo apt-get install -y libevent-dev libsasl2-dev libssl1.0-dev libldap2-dev
sudo apt-get install -y libpq-dev libpng-dev libjpeg-dev
4.配置PostgreSQL,增加创建数据库的超级用户
sudo -u postgres createuser --createdb $(whoami)
5.克隆Odoo基础代码
mkdir ~/odoo-dev
cd ~/odoo-dev
git clone -b 12.0 --depth 1 --single-branch https://github.com/odoo/odoo.git
cd odoo
6.安装Python依赖
sudo apt-get install python3-pip
pip3 install -r requirements.txt
7.启动Odoo服务,注意启动之后的窗口不要关闭
./odoo-bin -d $(whoami)
网友评论