Wednesday, June 5, 2013

Install OpenERP 7.0 on Redhat/Cent OS 6.4

Hi Friends I have Created a Script to install OpenERP on RedHat/CentOS

This is in the following Steps

Step 1 .

Make your system up to date

#yum -y update
#yum -y install man wget vim libevent unzip

# Download additional prerequisites
cd /tmp

wget && tar -xvzf pyparsing-1.5.7.tar.gz && cd pyparsing-1.5.7 && python install

wget && unzip && cd gdata* && python install

rpm -Uvh

rpm -Uvh

rpm -ivh

rpm -ivh

wget && sh

# Install core prerequisistes for OpenERP
yum -y install python-psycopg2 python-lxml PyXML python-setuptools libxslt-python pytz python-matplotlib python-babel python-mako python-dateutil python-psycopg2 pychart pydot python-reportlab python-devel python-imaging python-vobject hippo-canvas-python mx python-gdata python-ldap python-openid python-werkzeug python-vatnumber pygtk2 glade3 pydot python-dateutil python-matplotlib pygtk2 glade3 pydot python-dateutil python-matplotlib python python-devel python-psutil python-docutils make automake gcc gcc-c++ kernel-devel byacc flashplugin-nonfree poppler-utils pywebdav postgresql92-libs postgresql92-server postgresql92

#make sure that Postgresql is installed on the system
yum install postgresql

And ofter installing the Postgresql use
service postgresql-9.2 initdb
chkconfig postgresql-9.2 on
service postgresql-9.2 start
This will make you PostgreSQL ready to accept the connection

# Add users for managment and OpenERP. Requires manual input of the password (set to "openerp")
#useradd <name user>
#useradd -e yyyy-mm-dd <mane user>
su - postgres -c "createuser --createdb --username postgres --no-createrole --no-superuser --pwprompt openerp"
adduser openerp
DIR="/var/run/openerp /var/log/openerp"
for NAME in $DIR
if [ ! -d $NAME ]; then
   mkdir $NAME
   chown openerp.openerp $NAME
rm -rf openerp*

# Fetch and install OpenERP
cd /tmp
wget && tar -xvzf openerp-7.0-20130408-232357.tar.gz --transform 's!^[^/]\+\($\|/\)!openerp\1!' && cd openerp && python install
rm -rf /usr/local/bin/openerp-server
cp openerp-server /usr/local/bin
cp install/openerp-server.init /etc/init.d/openerp
cp install/openerp-server.conf /etc
chown openerp:openerp /etc/openerp-server.conf
chmod u+x /etc/init.d/openerp

Starting Openerp as a service

chkconfig openerp on
service  openerp start

# Clear firewall, enabling access
iptables -F
iptables -F INPUT
iptables -A INPUT -p tcp --dport ssh -j ACCEPT
iptables -A INPUT -p tcp --dport 8069 -j ACCEPT
iptables -A INPUT -p tcp --dport 10000 -j ACCEPT
iptables -A INPUT -p icmp --icmp-type echo-request -j ACCEPT
iptables -A INPUT -m state --state ESTABLISHED -j ACCEPT
iptables -A INPUT -j LOG -m limit

Guys now the openerp is production ready you can access it using
in browser http://<ipaddress-of-machine>:8069