centos上安装odoo

安装数据库并对其初始化
yum -y install postgresql postgresql-server postgresql-libs
[[email protected] ~]# postgresql-setup initdb
Initializing database ... OK
设置开机启动, 并且启动postgre数据库, 设置postgres密码
[[email protected] ~]# systemctl enable postgresql
Created symlink from /etc/systemd/system/multi-user.target.wants/postgresql.service to /usr/lib/systemd/system/postgresql.service.
[[email protected] ~]# systemctl start postgresql
[[email protected] ~]# su - postgres
-bash-4.2$ psql
psql (9.2.23)
输入 "help" 来获取帮助信息.

postgres=# \password postgres
输入新的密码:
再次键入:
postgres=# \q
-bash-4.2$ exit
登出
安装odoo
[[email protected] ~]# yum install epel-release -y   #安装odoo的依赖
 添加Odoo仓库
[[email protected] ~]# yum install yum-utils -y
[[email protected] ~]# yum-config-manager --add-repo=https://nightly.odoo.com/10.0/nightly/rpm/odoo.repo
[[email protected] ~]# yum -y install odoo  #安装odoo 10.0.20170201, 下载比较慢, 我下载了将近2个小时; 也可以使用迅雷下载, 然后传到服务器上, 安装

[[email protected] ~]# systemctl enable odoo #创建开机自启动
Created symlink from /etc/systemd/system/multi-user.target.wants/odoo.service to /usr/lib/systemd/system/odoo.service.
[[email protected] ~]# systemctl start odoo  #启动odoo
[[email protected] ~]# firewall-cmd --zone=public --add-port=8069/tcp --permanent && firewall-cmd --reload
默认情况下只有本地菜运行连接数据库, 如果要允许PostgreSql远程访问, 需要在 vim /var/lib/pgsql/data/pg_hba.conf

文件中添加 允许访问

host    all             all             0.0.0.0/0               md5


安装pdf生成器wkhtmltopdf
install libxrender1 fontconfig xvfb
wget http://download.gna.org/wkhtmltopdf/0.12/0.12.3/wkhtmltox-0.12.3_linux-generic-amd64.tar.xz -P /tmp/
cd /opt/
tar xf /tmp/wkhtmltox-0.12.3_linux-generic-amd64.tar.xz
ln -s /opt/wkhtmltox/bin/wkhtmltopdf /usr/local/bin/wkhtmltopdf
现在就可以在浏览器中输入ip:8069访问了

猜你喜欢

转载自blog.csdn.net/bbwangj/article/details/80748112

相关文章