How to install openERP on Linux / Fedora
Steps for installing openerp on EC2 server Fedora 9
1 SETTING UP THE POSTGRESQL DATABASE
1.1 IN NORMAL CASE:
1)yum install postgresql postgresql-server
2)service postgresql initdb
3)service postgresql start
4)nano /var/lib/pgsql/data/pg_hba.conf
locate at the end and Modify
# TYPE DATABASE USER CIDR-ADDRESS METHOD
# "local" is for Unix domain socket connections only
local all all trust
#local all all ident sameuser
# IPv4 local connections:
host all all 127.0.0.1/32 trust
#host all all 127.0.0.1/32 ident sameuser
# IPv6 local connections:
host all all ::1/128 trust
#host all all ::1/128 ident sameuser
5)su postgres
6)psql -d template1 -U postgres
7)alter user postgres with password 'solutions';
8) for openerp 6 we have to crete user 'openerp' with 'solutions'
command : CREATE USER openerp WITH PASSWORD 'solutions' CREATEDB CREATEUSER;
COMMAND TO SEE USER'S FROM PG_USER : SELECT * FROM PG_USER;
#su
#su postgres
#psql template1
#template1=# \q
#exit
1.2 IN ABNORMAL CASE:
Like In installation of postgresql it install it and also run initdb command but still service is not stated and giving some isuue
try following method
If you have no database currently installed then:
* rm -rf /var/lib/pgsql/data/*
type following :
[root@fc7 ~]# su - postgres
-bash-3.2$ initdb
After typing initdb it will show you below process
The files belonging to this database system will be owned by user "postgres".
This user must also own the server process.
The database cluster will be initialized with locale en_US.UTF-8.
The default database encoding has accordingly been set to UTF8.
fixing permissions on existing directory /var/lib/pgsql/data ... ok
creating subdirectories ... ok
selecting default max_connections ... 100
selecting default shared_buffers/max_fsm_pages ... 32MB/204800
creating configuration files ... ok
creating template1 database in /var/lib/pgsql/data/base/1 ... ok
initializing pg_authid ... ok
initializing dependencies ... ok
creating system views ... ok
loading system objects' descriptions ... ok
creating conversions ... ok
setting privileges on built-in objects ... ok
creating information schema ... ok
vacuuming database template1 ... ok
copying template1 to template0 ... ok
copying template1 to postgres ... ok
WARNING: enabling "trust" authentication for local connections
You can change this by editing pg_hba.conf or using the -A option the
next time you run initdb.
Success. You can now start the database server using:
postgres -D /var/lib/pgsql/data
or
pg_ctl -D /var/lib/pgsql/data -l logfile start
After completing process we have to start service by typing following command which gives us error:
-bash-3.2$ postgres -D /var/lib/pgsql/data
LOG: could not translate host name "localhost", service "5432" to address: Name or service not known
WARNING: could not create listen socket for "localhost"
FATAL: could not create any TCP/IP sockets
-bash-3.2$
LOG: could not translate host name "localhost", service "5432" to address: Name or service not known
To Avoide this Error we have to do localhost entry in /etc/hosts
add the following to /etc/hosts:
nano /etc/hosts
127.0.0.1 localhost.localdomain localhost
2 SETTING UP PYTHON
1)yum install python-psycopg2 python-lxml PyXML python-setuptools-devel libxslt-python pytz python-matplotlib pydot mx pychart
1.1) Do yum search Imaging for Image files
Command : yum search Imaging
use following files: python-imaging-devel.i686, python-imaging-tk.i686, python-imaging.i686
1.2) Do search for Yaml module by following command # This module needed by openerp-server otherewise while starting services # it will throw error for same
command : yum search yaml
use following files: PyYAML.i686, libyaml.i686, libyaml-devel.i686
2)wget http://www.reportlab.com/ftp/reportlab-2.1.tar.gz
3)tar -xvzf reportlab-2.1.tar.gz
4)rm reportlab-2.1.tar.gz
5)cd reportlab_2_1/reportlab
6)python setup.py install
3 SETTING UP openerp-server(download files from our ftp site)
cd /opt
ftp
open ftp.bistasolutions.com
girish #after opening ftp site it will ask you for Username so type username your ftp site
GJoshi2010 #type password for the user
cd /Girish/openerp #the move to respective location were files are uploaded on server(ftp site)
get openerp-server-6.0.0-rc1.tar.gz # get is use to downloade file from ftp side to our location
get openerp-web-6.0.0-rc1.tar.gz
bye # this command is use to exit from ftp
3.1.1 THINGS TO DO FOR INSTALLTION OF Openerp-server if python2.6 is installed
tar -xvzf openerp-server-6.0.0-rc1.tar.gz
cd openerp-server-6.0.0-rc1
python setup.py install # This command is use to install openerp-server
3.1.2 THINGS TO DO FOR INSTALLTION OF Openerp-server if python2.5 is installed
tar -xvzf openerp-server-6.0.0-rc1.tar.gz
cd openerp-server-6.0.0-rc1
mkdir python25-compat #to create folder in openerp-server-6.0.0-rc1 beside bin folder
copy files from python2.5 and paste in python25-compat folder #This we do to make v6 caompatable with python2.5 no need to do this step for #python2.6 because it already handle this issue
** We can use find command to search file throw its name
command : find / -name "Filename"
cp /usr/lib/python2.5/BaseHTTPServer.py /opt/openerp-server-6.0.0-rc1/python25-compat
cp /usr/lib/python2.5/SimpleXMLRPCServer.py /opt/openerp-server-6.0.0-rc1/python25-compat
cp /usr/lib/python2.5/SocketServer.py /opt/openerp-server-6.0.0-rc1/python25-compat
python setup.py install # This command is use to install openerp-server
3.1.2 Create a folder in python2.5/site-packages called pixmaps and copy all the files from openerp-server-6.0.0-rc1/pixmaps to python2.5/site-packages
Commands:
cd /usr/lib/python2.5/site-packages
mkdir pixmaps
cp /opt/openerp-server-6.0.0-rc1/pixmaps/* /usr/lib/python2.5/site-packages/pixmaps
3.2 Go to following location and change following lines to configure openerp-server (This will be same for both type of installtion)
nano /usr/lib/python2.5/site-packages/openerp-server/tools/config.py
'db_user': 'openerp',
'db_password': 'solutions',
4 THINGS TO DO FOR INSTALLTION OF Openerp-web
tar -xvzf openerp-web-6.0.0-rc1.tar.gz
cd openerp-web-6.0.0-rc1
python setup.py install # This command is use to install openerp-web
4.1 Go to following location and change following lines to configure openerp-web
nano /usr/lib/python2.6/site-packages/openerp_web-6.0.0_rc1-py2.5.egg/openerp-web/doc/openerp-web.cfg
Change following line
server.socket_host = "127.0.0.1" #If you want start service by ipaddress so this field contains ipaddress or server ipaddress
5 AFTER DOING ALL THIS THING TO CHECK THERE IS NO ANY ISSUE WE HAVE TO TYPE FOLLOWING COMMANDS IN DIFFERENT TERMINALS
for openerp-web
openerp-web start
ctrl+c # To stop web
for openerp-server
su postgres
openerp-server start
ctrl+c # To stop server
6 IN OPENERP VERSION 6 GIVE SOME ISSUE WHILE STARTING SERVICES SO USE BASH COMMANDS
FOLLOWING CHANGES WE HAVE TO DO TO RUN BASH FILES
---------------/etc/rc.local-------------------------
sh /opt/openerpservicestart.sh
----------------/opt/openerpservicestart.sh------------------
#!/bin/bash
sh /opt/openerpstart.sh &
sh /opt/openerpwebstart.sh &
exit
----------------/opt/openerpstart.sh-----------------
#!/bin/bash
su postgres -c openerp-server start
exit
----------------/opt/openerpwebstart.sh-----------------
#!/bin/bash
su postgres -c openerp-web start
exit