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
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
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
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
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
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
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
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 &
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