CentOS 6.3 X64 OpenERP 7.0 스 크 립 트 자동 설치

8023 단어 centos
주소
#!/bin/bash -e
# Modified script from Carlos E. Fonseca Zorrilla 

# 1. Add the two additional installation sources:
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

# 2. Install additional packages:
yum -y install wget unzip
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 PyYAML\
            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\

# 3. Install database postgresql 9.2
yum -y install postgresql92-libs postgresql92-server postgresql92
service postgresql-9.2 initdb
chkconfig postgresql-9.2 on
service postgresql-9.2 start
su - postgres -c "createuser  --superuser openerp"

# 4. Install Google Data Python Client Library:
cd /tmp
wget http://gdata-python-client.googlecode.com/files/gdata-2.0.17.zip
unzip gdata-2.0.17.zip
rm -rf gdata-2.0.17.zip
cd gdata*
python setup.py install

# 5. Install OpenERP 7.0:
cd /tmp
adduser openerp
DIR="/var/run/openerp /var/log/openerp"
for NAME in $DIR
do
if [ ! -d $NAME ]; then
   mkdir -p $NAME
   chown openerp.openerp $NAME
fi
done

rm -rf openerp*
wget http://nightly.openerp.com/7.0/nightly/src/openerp-7.0-latest.tar.gz
tar -zxvf openerp-7.0-latest.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
chkconfig openerp on
service  openerp start

# 6. Allow the port 8069 go through firewall:
sed -i '/dport 22/a\-A INPUT -m state --state NEW -m tcp -p tcp --dport 8069 -j ACCEPT' /etc/sysconfig/iptables
service iptables restart

echo "


All Well Done!! Congratulations!!
" echo " :" echo "1. postgresql.conf pg_hba.conf /var/lib/pgsql/9.2/data ;" echo "2. OpenERP /usr/lib/python2.6/site-packages/openerp-7.0_xxxx.egg/openerp ;" echo "3. PostgreSQL postgres openerp, , "

좋은 웹페이지 즐겨찾기