The ultimate guide to install gooderp on ubuntu

Overview###

I admit that there was an error in the previous centos installation. This time, I will re-record the installation process
Note that I use pyenv to manage the version of python

Installation begins

The environment is ubuntu16.04 Alibaba Cloud ecs
First update the system
sudo apt update && sudo apt upgrade
Then remove the old kernel
sudo apt autoremove
Because ubuntu can install the kernel without restarting, you don’t need to restart

New gooderp user###

First create a new user to manage gooderp
groupadd gooderp``useradd -g gooderp gooderp``passwd gooderp
Then let the gooderp user can use the sudo command
visudo
Add in this file
gooderp ALL=(ALL:ALL) ALL
Then switch to gooderp user
su gooderp

Download source package###

First install git
sudo apt install git
Create a new gooderp directory under /home
sudo mkdir /home/gooderp
Modify directory owner
sudo chown -Rf gooderp:gooderp /home/gooderp
Then switch to the gooderp directory to download the source package
cd ~``git clone http://github.com/osbzr/gooderp_addons``git clone http://github.com/osbzr/base

Install nodejs

Because of the environment variables, I didn’t use nvm to manage the nodejs version. I used the apt package management tool to install nodejs directly.
sudo apt install npm
The default nodejs binary file is nodejs instead of node. The project uses node so a link must be established
ln -s /usr/bin/nodejs /usr/bin/node
Then install less
sudo npm install -g less

Install python

First install pyenv
curl -L https://raw.githubusercontent.com/pyenv/pyenv-installer/master/bin/pyenv-installer | bash

Edit .bashrc to join
vim .bashrc

export PATH="/home/gooderp/.pyenv/bin:$PATH"
eval "$(pyenv init -)"
eval "$(pyenv virtualenv-init -)"

Make environment variables take effect
source .bashrc
Install some dependencies so that python can be installed completely, which is the following
sudo apt install zlib1g-dev libreadline-dev libssl-dev libbz2-dev libsqlite3-dev
Install python
pyenv install 2.7.14
Don't forget to switch the python version afterwards, switch from system to 2.7.14
pyenv global 2.7.14
Install dependencies afterwards
pip install -r base/requirements.txt
An error will be reported during installation, I will post my error message
Could not find function xmlCheckVersion in library libxml2. Is libxml2 installed?
Install libxml2-dev
sudo apt install libxml2-dev
Then report an error
src/lxml/includes/etree_defs.h:14:31: fatal error: libxml/xmlversion.h: No such file or directory
Execute the following command
export C_INCLUDE_PATH=/usr/include/libxml2/
Then reported an error
src/lxml/includes/etree_defs.h:23:32: fatal error: libxslt/xsltconfig.h: No such file or directory
Install libxslt-dev
sudo apt install libxslt-dev
Continue to report errors
Modules/errors.h:8:18: fatal error: lber.h: No such file or directory
Install libldap2-dev
sudo apt install libldap2-dev
Continue to report errors
Modules/LDAPObject.c:18:18: fatal error: sasl.h: No such file or directory
Install the following package
sudo apt-get install libsasl2-dev
Finally, the following two libraries are not installed, which may cause css style problems
pip install simplejson httplib2

Install wkhtmltopdf

This must be installed, accounting documents cannot be printed without installation, thanks to jeff wang
Download first
wget https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.2.1/wkhtmltox-0.12.2.1_linux-trusty-amd64.deb
installation
sudo apt install ./wkhtmltox-0.12.2.1_linux-trusty-amd64.deb

Install postgresql

Create the following file
/etc/apt/sources.list.d/pgdg.list
Add inside
deb http://apt.postgresql.org/pub/repos/apt/ xenial-pgdg main
Download the public key update software source

wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | \
 sudo apt-key add -
sudo apt-get update

Install postgresql
sudo apt-get install postgresql-9.6
Set boot to start postgresql service
sudo systemctl enable postgresql
Establish gooderp database user
Switch to postgresql user
su root``su postgres
Create a gooderp user
createuser -d -U postgres -R -S -P gooderp
Switch to gooderp user
su gooderp
Modify user permissions of two folders
chown -Rf gooderp:gooderp base/ gooderp_addons/
Start gooderp
python base/odoo-bin --addons-path=gooderp_addons &

Set boot up###

Edit the following file
sudo vim /lib/systemd/system/gooderp.service
Add to

[ Unit]
Description=GoodERP
Documentation=http://www.gooderp.org/
After=network.target postgresql.service
[ Service]
Type=simple
User=gooderp
ExecStart=/home/gooderp/.pyenv/versions/2.7.14/bin/python /home/gooderp/base/odoo-bin --addons-path=/home/gooderp/gooderp_addons
[ Install]
WantedBy=multi-user.target

Then run
sudo systemctl enable gooderp
Restart verification

Welcome to follow Bboysoul's blog www.bboysoul.com
Have Fun

Recommended Posts

The ultimate guide to install gooderp on ubuntu
How to install the latest MySQL on Ubuntu 18.04
How to install Ruby on Ubuntu 20.04
How to install Java on Ubuntu 20.04
How to install VirtualBox on Ubuntu 20.04
How to install Elasticsearch on Ubuntu 20.04
How to install Protobuf 3 on Ubuntu
How to install Nginx on Ubuntu 20.04
How to install Apache on Ubuntu 20.04
How to install Git on Ubuntu 20.04
How to install Node.js on Ubuntu 16.04
How to install Vagrant on Ubuntu 20.04
How to install Bacula-Web on Ubuntu 14.04
How to install PostgreSQL on Ubuntu 16.04
How to install Git on Ubuntu 20.04
How to install Anaconda3 on Ubuntu 18.04
How to install Memcached on Ubuntu 18.04
How to install Jenkins on Ubuntu 16.04
How to install MemSQL on Ubuntu 14.04
How to install Go on Ubuntu 20.04
How to install MongoDB on Ubuntu 16.04
How to install Mailpile on Ubuntu 14.04
How to install PrestaShop on Ubuntu 16.04
How to install Skype on Ubuntu 20.04
How to install Jenkins on Ubuntu 20.04
How to install KVM on Ubuntu 18.04
How to install KVM on Ubuntu 20.04
How to install opencv3.0.0 on ubuntu14.04
How to install Prometheus on Ubuntu 16.04
How to install Jenkins on Ubuntu 18.04
How to install R on Ubuntu 20.04
How to install Moodle on Ubuntu 16.04
How to install Solr 5.2.1 on Ubuntu 14.04
How to install Teamviewer on Ubuntu 16.04
How to install MariaDB on Ubuntu 20.04
How to install Nginx on Ubuntu 20.04
How to install Mono on Ubuntu 20.04
How to install Go on Ubuntu 20.04
How to install Zoom on Ubuntu 20.04
How to install Nginx on Ubuntu 16.04
How to install OpenCV on Ubuntu 20.04
How to install Spotify on Ubuntu 20.04
How to install Postman on Ubuntu 18.04
How to install Go 1.6 on Ubuntu 16.04
How to install Go on Ubuntu 18.04
How to install MySQL on Ubuntu 14.04
How to install PostgreSQL on Ubuntu 20.04
How to install VLC on Ubuntu 18.04
How to install TeamViewer on Ubuntu 20.04
How to install Webmin on Ubuntu 20.04
Ubuntu install guide
Install the latest Python 3.6 version on Ubuntu
How to install Docker Compose on Ubuntu 18.04
How to install Ubuntu on Raspberry Pi
How to install Bacula Server on Ubuntu 14.04
How to install MySQL on Ubuntu 18.04 (linux)
Install the flat theme latabulous on Ubuntu 16.04
Install NeoVim on Ubuntu: the easiest way
How to install Apache Maven on Ubuntu 20.04
How to install Python2 on Ubuntu20.04 ubuntu/focal64
Use python3 to install third on ubuntu