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 http://pypi.python.org/packages/source/p/pyparsing/pyparsing-1.5.7.tar.gz && tar -xvzf pyparsing-1.5.7.tar.gz && cd pyparsing-1.5.7 && python setup.py install

wget http://gdata-python-client.googlecode.com/files/gdata-2.0.17.zip && unzip gdata-2.0.17.zip && cd gdata* && python setup.py install

rpm -Uvh http://pkgs.repoforge.org/tmux/tmux-1.6-1.el6.rf.x86_64.rpm

rpm -Uvh http://prdownloads.sourceforge.net/webadmin/webmin-1.620-1.noarch.rpm

rpm -ivh http://dl.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm

rpm -ivh http://yum.pgrpms.org/9.2/redhat/rhel-6-i386/pgdg-centos92-9.2-6.noarch.rpm

wget https://pypi.python.org/packages/2.6/s/setuptools/setuptools-0.6c11-py2.6.egg && sh
setuptools-0.6c11-py2.6.egg


# 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
do
if [ ! -d $NAME ]; then
   mkdir $NAME
   chown openerp.openerp $NAME
fi
done
rm -rf openerp*

# Fetch and install OpenERP
cd /tmp
wget http://nightly.openerp.com/7.0/nightly/src/openerp-7.0-20130408-232357.tar.gz && tar -xvzf openerp-7.0-20130408-232357.tar.gz --transform 's!^[^/]\+\($\|/\)!openerp\1!' && cd openerp && python setup.py 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

No comments:

Post a Comment