linux安装odoo10,【已验证】如何在centos7上安装odoo 10 | 何连超的博客小站

odoo-logo.png

Make sure that all services installed on your server are up to date and install dependencies:sudo yum install -y epel-release

sudo yum -y update

sudo yum install yum-utils

sudo yum install fontconfig libpng libX11 libXext libXrender xorg-x11-fonts-Type1 xorg-x11-fonts-75dpi wkhtmltopdf

Remove other db servers and install Postgresql and start it:sudo yum remove mariadb mariadb-server

安装PostgreSQL数据库,添加PostgreSQL Yum Repository

第一步是在系统中安装PostgreSQL repository, 使用下面的命令.CentOS/RHEL 7

# rpm -Uvh http://yum.postgresql.org/9.5/redhat/rhel-7-x86_64/pgdg-centos95-9.5-2.noarch.rpm

CentOS/RHEL 6

# rpm -Uvh http://yum.postgresql.org/9.5/redhat/rhel-6-x86_64/pgdg-redhat95-9.5-2.noarch.rpm

CentOS/RHEL 5

# rpm -Uvh http://yum.postgresql.org/9.5/redhat/rhel-5-x86_64/pgdg-redhat95-9.5-2.noarch.rpm

Fedora 23:

# rpm -Uvh http://yum.postgresql.org/9.5/fedora/fedora-23-x86_64/pgdg-fedora95-9.5-3.noarch.rpm

Fedora 22

# rpm -Uvh http://yum.postgresql.org/9.5/fedora/fedora-22-x86_64/pgdg-fedora95-9.5-3.noarch.rpm

Fedora 21

# rpm -Uvh http://yum.postgresql.org/9.5/fedora/fedora-21-x86_64/pgdg-fedora95-9.5-2.noarch.rpm

安装PostgreSQL服务

启用PostgreSQL yum repository后,使用下面的命令来安装PostgreSQL 9.5 on.# yum install postgresql95-server postgresql95

初始化PGDATA

安装完PostgreSQL服务后,首次使用之前需要初始化,使用下面的命令.# /usr/pgsql-9.5/bin/postgresql95-setup initdb

上面的命令需要一些时间来初始化PostgreSQL. PGDATA 包含了数据文件夹.

PostgreSQL数据存储路径: /var/lib/pgsql/9.5/data/

开启PostgreSQL服务

使用下面的命令启动PostgreSQL. 同时也会将PostgreSQL服务加入到系统启动项.

For CentOS/RHEL 7 and Fedora 23# systemctl start postgresql-9.5

# systemctl enable postgresql-9.5

For CentOS/RHEL 6/5 and Fedora 22/21# service postgresql-9.5 start

# chkconfig postgresql-9.5 on

验证PostgreSQL安装

完成上面的步骤后,PostgreSQL 9.5就安装成功了,下面我们来验证下安装的完整性.# su - postgres

使用psql命令来进入PostgreSQL$ psql

psql (9.5.0)

Type "help" for help.

postgres=#

需要创建密码postgres=# \password postgres

Add Odoo repository:sudo yum-config-manager --add-repo=https://nightly.odoo.com/10.0/nightly/rpm/odoo.repo

and finally install and start Odoo 10sudo yum install -y odoo

sudo systemctl enable odoo

sudo systemctl start odoo

Open Odoo’s configuration file and uncomment the ‘admin_passwd’ line to set the admin master passwordsudo vi /etc/odoo/odoo.conf

admin_passwd = YourPassword

Don’t forget to replace ‘YourPassword’ with an actual strong password.

Restart Odoo for the changes to take effectsudo systemctl restart odoo

以上是安装步骤,至此odoo 10的安装基本上告一个段落,但是在选择数据库的时候可能会碰到如下提示

Database creation error: new encoding (UTF8) is incompatible with the encoding of the template database (SQL_ASCII) HINT: Use the same encoding as in the template database, or use template0 as template.

最后在说一下把默认的端口8069通过设置防火墙转发至80端口,本步骤根据个人喜好设置。

Firewall Settings

By default in Centos 7 minimal installation firewalld is installed and enabled. You need to open the port 8069 to be able to access it from the browser. I use this server just for Odoo tests so to make it easier to access I just forward port 80 to 8069 through fiirewalldport forwarding function:sudo firewall-cmd --zone=public --permanent --add-masquerade

sudo firewall-cmd --zone=public --permanent --add-forward-port=port=80:proto=tcp:toport=8069

sudo systemctl reload firewalld

sudo firewall-cmd --list-all

public (default, active)

interfaces: eno16777984

sources:

services: dhcpv6-client ssh

ports:

masquerade: yes

forward-ports: port=80:proto=tcp:toport=8069:toaddr=

icmp-blocks:

rich rules:

Now, open a web browser and access Odoo 10 at http://server-hostname-or-IP-address to create a new PostgreSQL database and set password for the admin user.

d85f796df7663ca0b6eaf7c301b150ad.png8629420e9c6068a999f1ba91d2ff4010.png

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值