注册 登录  
 加关注
   显示下一条  |  关闭
温馨提示!由于新浪微博认证机制调整,您的新浪微博帐号绑定已过期,请重新绑定!立即重新绑定新浪微博》  |  关闭

梦想之鹰的天空

天高任鸟飞......放飞....心情..........放飞.....梦想

 
 
 

日志

 
 

Odoo8.0在CentOS7的安装步骤  

2015-07-15 16:56:43|  分类: 信息化 |  标签: |举报 |字号 订阅

  下载LOFTER 我的照片书  |
1、odoo相关密码设置:
ODOO_POSTGRES_PASSWORD=`< /dev/urandom tr -dc _A-Z-a-z-0-9 | head -c${1:-20};echo;`
ODOO_DB_ADMIN_PASSWORD=`< /dev/urandom tr -dc _A-Z-a-z-0-9 | head -c${1:-20};echo;`

2、安装和配置数据库
yum -y install postgresql-server postgresql-devel
postgresql-setup initdb
systemctl enable postgresql.service

cp /var/lib/pgsql/data/pg_hba.conf /var/lib/pgsql/data/pg_hba.conf.orig
sed -i "/^host/s/ident/md5/g" /var/lib/pgsql/data/pg_hba.conf

systemctl start postgresql.service

echo -e "$ODOO_POSTGRES_PASSWORD\n$ODOO_POSTGRES_PASSWORD\n" | su - postgres -c "createuser --createdb --username postgres --no-createrole --no-superuser --pwprompt odoo"

3、在虚拟环境中安装的Python库
yum -y install wget gcc zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel gdbm-devel db4-devel libffi-devel libxslt libxslt-devel libxml2 libxml2-devel openldap-devel libjpeg-turbo-devel openjpeg-devel libtiff-devel libyaml-devel python-virtualenv git libpng12 libXext xorg-x11-fonts-Type1

yum install xorg-x11-fonts-75dpi
rpm -ivh http://sourceforge.net/projects/wkhtmltopdf/files/0.12.2.1/wkhtmltox-0.12.2.1_linux-centos7-amd64.rpm/download
ln -s /usr/local/bin/wkhtmltopdf /usr/bin/

rpm -ivh http://dl.fedoraproject.org/pub/epel/7/x86_64/l/libmspack-0.5-0.1.alpha.el7.x86_64.rpm
rpm -ivh http://dl.fedoraproject.org/pub/epel/7/x86_64/l/libmspack-devel-0.5-0.1.alpha.el7.x86_64.rpm
rpm -ivh http://dl.fedoraproject.org/pub/epel/7/x86_64/c/cabextract-1.5-1.el7.x86_64.rpm
rpm -ivh https://downloads.sourceforge.net/project/mscorefonts2/rpms/msttcore-fonts-installer-2.6-1.noarch.rpm


adduser odoo

DIR="/var/run/odoo /var/log/odoo /opt/odoo"
for NAME in $DIR
do
if [ ! -d $NAME ]; then
 mkdir $NAME
 chown odoo.odoo $NAME
fi
done

su - odoo
/bin/virtualenv odoo
source odoo/bin/activate


pip install http://download.gna.org/pychart/PyChart-1.39.tar.gz
pip install babel
pip install docutils
pip install feedparser
pip install gdata
pip install Jinja2
pip install mako
pip install mock
pip install psutil
pip install psycopg2
pip install pydot
pip install python-dateutil
pip install python-openid
pip install pytz
pip install pywebdav
pip install pyyaml
pip install reportlab
pip install simplejson
pip install unittest2
pip install vatnumber
pip install vobject
pip install werkzeug
pip install xlwt
pip install pyopenssl
pip install lxml
pip install python-ldap
pip install pillow
pip install decorator
pip install requests
pip install pyPdf
pip install wkhtmltopdf
pip install passlib
pip install pysftp

4:安装odoo 8从GitHub
cd /opt
git clone https://github.com/odoo/odoo.git --branch 8.0
chown -R odoo.odoo odoo
exit


cat > /etc/odoo-server.conf << EOF
[options]
; This is the password that allows database operations:
admin_passwd = $ODOO_DB_ADMIN_PASSWORD
; DATABASE OPTIONS
db_host = localhost
db_port = 5432
db_user = odoo
db_password = $ODOO_POSTGRES_PASSWORD
; MISC SETTINGS
addons_path = /opt/odoo/addons
without-demo=all
no-xmlrpc = True
no-xmlrpcs = True
no-netrpc = True
; LOG SETTINGS
logfile = /var/log/odoo/odoo-server.log
log_handler = werkzeug:WARNING
log_level = warn
no-logrotate = True
EOF


cat > /etc/logrotate.d/odoo-server << EOF
/var/log/odoo/*.log {
    copytruncate
    missingok
    notifempty
}
EOF


cat > /usr/lib/systemd/system/odoo.service << EOF
[Unit]
Description=Odoo Open Source ERP and CRM
After=network.target postgresql.service
[Service]
Type=forking
User=odoo
Group=odoo
Environment="ENVDIR=/home/odoo/odoo"
ExecStart=/bin/bash -c "cd /home/odoo; /bin/virtualenv -q odoo; source odoo/bin/activate; /usr/bin/odoo-server --config=/etc/odoo-server.conf &"

[Install]
WantedBy=multi-user.target
EOF


ln -s /opt/odoo/openerp-server /usr/bin/odoo-server
systemctl enable odoo


firewall-cmd --zone=public --add-port=8069/tcp --permanent
firewall-cmd --reload
systemctl start odoo



你应该能够打开一个浏览器并连接到OpenERP:HTTP://服务器IP:8069。
第一步:建立数据库 master password 应输入 odoo-server.conf的admin_passwd值

你可以检查日志文件/var/log/messages和/var/log/odoo/odoo-server.log确保一切正确启动。

注意您也可以使用“systemctl restart odoo”和“systemctl stop odoo”重新启动和停止odoo要求。
  评论这张
 
阅读(2865)| 评论(0)
推荐 转载

历史上的今天

在LOFTER的更多文章

评论

<#--最新日志,群博日志--> <#--推荐日志--> <#--引用记录--> <#--博主推荐--> <#--随机阅读--> <#--首页推荐--> <#--历史上的今天--> <#--被推荐日志--> <#--上一篇,下一篇--> <#-- 热度 --> <#-- 网易新闻广告 --> <#--右边模块结构--> <#--评论模块结构--> <#--引用模块结构--> <#--博主发起的投票-->
 
 
 
 
 
 
 
 
 
 
 
 
 
 

页脚

网易公司版权所有 ©1997-2017