各种参考:

https://www.liaoxuefeng.com/wiki/0014316089557264a6b348958f449949df42a6d3a2e542c000/001432712108300322c61f256c74803b43bfd65c6f8d0d0000

http://blog.sina.com.cn/s/blog_955289220102ykzv.html

http://www.linuxidc.com/Linux/2012-10/71692.htm

https://blog.laslabs.com/2015/09/installing-odoo-8-from-source-ubuntu/

http://www.jianshu.com/p/40caabd91827

------------------------------------------------

切换shell命令:

#pkg install bash

#chsh -s /usr/local/bin/bash

#logout

更换非root用户默认的shell,#chsh -s /usr/local/bin/bash yourname

---------------------------------------------------

1、安装postgresql
版本不一样可能pg的用户名会是pgsql或者postgres(以下为postgres),以下用/pgsql/data作为数据库存放目录

#pkg search postgresql

 # pkg search postgresql

exim-postgresql-4.89_2         High performance MTA for Unix systems on the Internet
libgda5-postgresql-5.2.4       Provides postgresql access for the libgda5 library
opensmtpd-extras-table-postgresql-201606230001_2 PostgreSQL table support for OpenSMTPD
p5-PostgreSQL-PLPerl-Call-1.006_1 Simple interface for calling SQL functions from PostgreSQL PL/Perl
p5-PostgreSQL-PLPerl-Trace-1.001_1 Simple way to trace execution of Perl statements in PL/Perl
p5-Test-postgresql-0.09_1      Perl extension of postgresql runner for tests
pgtcl-postgresql10-2.0.0_1     TCL extension for accessing a PostgreSQL server (PGTCL-NG)
pgtcl-postgresql92-2.0.0_1     TCL extension for accessing a PostgreSQL server (PGTCL-NG)
pgtcl-postgresql93-2.0.0_1     TCL extension for accessing a PostgreSQL server (PGTCL-NG)
pgtcl-postgresql94-2.0.0_1     TCL extension for accessing a PostgreSQL server (PGTCL-NG)
pgtcl-postgresql95-2.0.0_1     TCL extension for accessing a PostgreSQL server (PGTCL-NG)
pgtcl-postgresql96-2.0.0_1     TCL extension for accessing a PostgreSQL server (PGTCL-NG)
postgresql-jdbc-9.2.1004       The Java JDBC implementation for PostgreSQL



挑一个合适的版本,目前9.6版本是没问题的
#pkg install postgresql96-server-9.6.6
#echo 'postgresql_enable="YES"' >> /etc/rc.conf
#echo 'postgresql_data="/pgsql/data"' >> /etc/rc.conf
#echo 'postgresql_class="postgres"' >> /etc/rc.conf
#echo 'postgresql_initdb_flags="--encoding=utf-8 --lc-collate=C"' >> /etc/rc.conf
 
#mkdir -p /pgsql/date
#chown -R postgres /pgsql
#chmod -R 777 /pgsql/date

#su postgres
$cd /pgsql/data

$

$ initdb -D /pgsql/data

The files belonging to this database system will be owned by user "postgres".
This user must also own the server process.

The database cluster will be initialized with locale "C".
The default database encoding has accordingly been set to "SQL_ASCII".
The default text search configuration will be set to "english".

Data page checksums are disabled.

fixing permissions on existing directory /server/pgsql/data ... ok
creating subdirectories ... ok
selecting default max_connections ... 100
selecting default shared_buffers ... 128MB
selecting dynamic shared memory implementation ... posix
creating configuration files ... ok
running bootstrap script ... ok
performing post-bootstrap initialization ... ok
syncing data to disk ... ok

WARNING: enabling "trust" authentication for local connections
You can change this by editing pg_hba.conf or using the option -A, or
--auth-local and --auth-host, the next time you run initdb.

Success. You can now start the database server using:

    pg_ctl -D /pgsql/data -l logfile start

$su root
#service postgresql restart



安装并创建odoo10数据库用户密码为123456
#su posgres
$psql postgres
#CREATE user odoo10  WITH PASSWORD '123456' CREATEDB;

Ctrl+d退出



2、配置odoo

以下操作root用户登录

创建用户odoo
adduser

 创建odoo10及log目录

mkdir /odoo10

mkdir /var/log/odoo10/

mkdir /var/log/supervisord/odoo10/

 

目录权限

chown -R odoo /odoo10

chmod -R 777 /odoo10

chown -R odoo /var/log/odoo10/

chmod -R 777 /var/log/odoo10/

 

用任意方法将odoo10源码上传到/odoo10

cd /odoo10
#创建虚拟环境

virtualenv --no-site-packages venv

#激活虚拟环境

source venv/bin/activate

#安装odoo的py支持环境
 pip install -r requirements.txt

 

deactivate命令退出虚拟环境 退出虚拟环境
node、wkhtmltopdf安装
pkg install node npm wkhtmltopdf
npm install -g less
npm install -g less-plugin-clean-css
ln -s /usr/local/bin/lessc /usr/bin/lessc
ln -s /usr/bin/node /usr/bin/node
ln -s /usr/bin/nodejs /usr/bin/node

ln -s /usr/bin/wkhtmltopdf /usr/bin/wkhtmltopdf

 


3.创建运行odoo10的配置文件
 vi /odoo10/odoo10.conf
内容如下:

[options]
; This is the password that allows database operations:
admin_passwd = 123456

db_host = 127.0.0.1
db_port = False
db_user = odoo10
db_password = 123456
addons_path = /server/odoo/odoo10/addons,/server/odoo/odoo10/odoo/addons
;addons_path = /server/odoo/odoo/openerp/addons
xmlrpc_port = 8069
log_level = info
logfile = /var/log/odoo10/odoo-server.log
logrotate = True
View Code

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-06-05
  • 2022-12-23
  • 2021-04-17
  • 2022-12-23
  • 2021-11-24
猜你喜欢
  • 2021-12-03
  • 2021-12-05
  • 2022-12-23
  • 2021-09-07
  • 2021-05-04
  • 2021-08-29
  • 2021-07-23
相关资源
相似解决方案