Novo processo de instalação publicado no grupo:
http://groups.google.com/group/openerp-brasil/browse_thread/thread/d0fc92395bfba80f
Com a finalidade de melhorar o processo de instalação do OpenERP com a
localização brasileira, agora para instalar o código basta:
$*bzr branch *lp:~openerp-brazil-team/openerp/openerp-br
$cd openerp-br
$bzr_set.py
após executar esse comando ele vai baixar todas as branches do OpenERP:
addons - Pasta com os módulos core do OpenERP
addons-extra - Pasta com módulos extra
addons-community - Pasta com módulo comunitários
server - Servidor OpenERP
client - Cliente GTK
web - Web Client
br - Localização Brasileira
Além de baixar todas as branches, também já cria os links simbólicos na
pasta addons dos módulos da localização e dos módulos que fazem parte
de dependência da l10n_br que estão do addons-extra.
Executando ./bzr_set.py -h você pode usar algumas opções como por exemplo
-v para especificar a versão que você quer baixar do OpenERP (trunk, 4.2,
5.0, 6.0), hoje por padrão ele vai baixar a versão trunk
Os outros processos de configurar o postgres e baixar os pacotes do python
continuam o mesmo, futuramente esse script pode também instalar os pacotes
python e testar se todos os pacotes pyhton utilizados pelo OpenERP e
localização estão instalado no ambiente.
Espero que isso ajude bastante a todos a instalar e testar o OpenERP, pois
a cada dia o projeto se firma como melhor opção de sistema de gestão
empresarial em software livre no Brasil e no mundo.
Um grande abraço para todo !
Renato Lima
Sócio Diretor
+55 21 3010 9965
www.akretion.com
12/01/2012
Artigo publicado em :
http://www.altinisik.net/component/k2/item/1-how-to-install-and-run-openerp-61-trunk-with-ubuntu-1110-server-x64.html
Since there are many new features coming with the new 6.1 version
of the OpenERP, I decided to move to new trunk version and start my
implementation and localization for the new trunk version.
Below you can find the commands that I used to download the software from the launchpad and run it. I had Ubuntu 10.04 LTS on the server machine, since I had few errors with the required python modules and bzr version was old. Installing to a fresh Ubuntu 11.10 server seemed much easier.
Here are the steps:
Below you can find the commands that I used to download the software from the launchpad and run it. I had Ubuntu 10.04 LTS on the server machine, since I had few errors with the required python modules and bzr version was old. Installing to a fresh Ubuntu 11.10 server seemed much easier.
Here are the steps:
Download and install Ubuntu 11.10 Server to the server.
$ sudo apt-get update
$ sudo apt-get upgrade
$ sudo apt-get install mc bzr python-setuptools
$ sudo apt-get install gcc python-dev
( mc, gcc and python-dev was not really necessary I just use them :)
Let install some required packages.
$ sudo apt-get install python-babel python-feedparser python-gdata python-lxml python-mako python-psycopg2 python-ldap
$ sudo apt-get install python-webdav python-yaml python-reportlab python-reportlab-accel python-simplejson python-vatnumber
$ sudo apt-get install python-vobject python-werkzeug python-zsi python-openssl python-egenix-mxdatetime python-tz
$ sudo easy_install pydot
$ sudo apt-get install python-dateutil python-unittest2 python-mock python-pychart
$ sudo apt-get install lptools make
$ sudo apt-get install python-pychart python-openid
Let create user to run server
$ sudo adduser --home=/opt/openerp --group openerp
Install database application
$ sudo apt-get install postgresql
$ sudo su - postgres
Create database user and give a password to the database user
$ createuser --createdb --username postgres --no-createrole --no-superuser --pwprompt openerp
$ exit
let give a password to the openerp user and download source code from bazaar with the openerp user
$ sudo passwd openerp
$ su openerp
$ cd /opt/openerp
$ mkdir trunk
$ cd trunk
$ bzr cat -d lp:~openerp-dev/openerp-tools/trunk setup.sh | sh
It takes some time to download openerp-tools
now it is time to download server and addons with the make script in the openerp-tools
$make init-trunk
This takes quiet a while to download the trunk for server,web and addons.
copy the configuration file to the etc folder
$ exit
$ sudo cp ./server/trunk/install/openerp-server.conf /etc/openerp-server.conf
Edit the configuration file to add database connection information
$ sudo nano /etc/openerp-server.conf
I added admin_passwd, db_host,db_port and db_passwd and log settings to the file.
[options]
; This is the password that allows database operations:
admin_passwd = YOUR_DB_OPERATION_PASSWORD
db_host = false
db_port = false
db_user = openerp
db_password = false
; Log settings
logfile = /opt/openerp/openerp-server.log
syslog = False
logrotate = True
log_level = info
$ sudo chown openerp:root /etc/openerp-server.conf
$ sudo chmod 640 /etc/openerp-server.conf
create a small init script
$ sudo nano /etc/init.d/openerp
#!/bin/sh
cd /opt/openerp/trunk
sudo -u openerp ./server/trunk/openerp-server -c /etc/openerp-server.conf --addons-path=addons/trunk,web/trunk/addons --test-disable &
Change the init scripts permissions
$ sudo chmod 755 /etc/init.d/openerp
$ sudo chown root: /etc/init.d/openerp
start it automatically with the system
$ sudo update-rc.d openerp defaults
When it is ok you can connect to the server from: http://youripaddress:8069
Note: I make this installation with help of this two articles:
$ sudo apt-get update
$ sudo apt-get upgrade
$ sudo apt-get install mc bzr python-setuptools
$ sudo apt-get install gcc python-dev
( mc, gcc and python-dev was not really necessary I just use them :)
Let install some required packages.
$ sudo apt-get install python-babel python-feedparser python-gdata python-lxml python-mako python-psycopg2 python-ldap
$ sudo apt-get install python-webdav python-yaml python-reportlab python-reportlab-accel python-simplejson python-vatnumber
$ sudo apt-get install python-vobject python-werkzeug python-zsi python-openssl python-egenix-mxdatetime python-tz
$ sudo easy_install pydot
$ sudo apt-get install python-dateutil python-unittest2 python-mock python-pychart
$ sudo apt-get install lptools make
$ sudo apt-get install python-pychart python-openid
Let create user to run server
$ sudo adduser --home=/opt/openerp --group openerp
Install database application
$ sudo apt-get install postgresql
$ sudo su - postgres
Create database user and give a password to the database user
$ createuser --createdb --username postgres --no-createrole --no-superuser --pwprompt openerp
$ exit
let give a password to the openerp user and download source code from bazaar with the openerp user
$ sudo passwd openerp
$ su openerp
$ cd /opt/openerp
$ mkdir trunk
$ cd trunk
$ bzr cat -d lp:~openerp-dev/openerp-tools/trunk setup.sh | sh
It takes some time to download openerp-tools
now it is time to download server and addons with the make script in the openerp-tools
$make init-trunk
This takes quiet a while to download the trunk for server,web and addons.
copy the configuration file to the etc folder
$ exit
$ sudo cp ./server/trunk/install/openerp-server.conf /etc/openerp-server.conf
Edit the configuration file to add database connection information
$ sudo nano /etc/openerp-server.conf
I added admin_passwd, db_host,db_port and db_passwd and log settings to the file.
[options]
; This is the password that allows database operations:
admin_passwd = YOUR_DB_OPERATION_PASSWORD
db_host = false
db_port = false
db_user = openerp
db_password = false
; Log settings
logfile = /opt/openerp/openerp-server.log
syslog = False
logrotate = True
log_level = info
$ sudo chown openerp:root /etc/openerp-server.conf
$ sudo chmod 640 /etc/openerp-server.conf
create a small init script
$ sudo nano /etc/init.d/openerp
#!/bin/sh
cd /opt/openerp/trunk
sudo -u openerp ./server/trunk/openerp-server -c /etc/openerp-server.conf --addons-path=addons/trunk,web/trunk/addons --test-disable &
Change the init scripts permissions
$ sudo chmod 755 /etc/init.d/openerp
$ sudo chown root: /etc/init.d/openerp
start it automatically with the system
$ sudo update-rc.d openerp defaults
When it is ok you can connect to the server from: http://youripaddress:8069
Note: I make this installation with help of this two articles:
In my previous post I just installed the OpenERP trunk to ubuntu server 11.10 with help of openerp-tools. After some time we can use the following commands to update the code to the latest revisions on launchpad.
to update all of the branches
Stop the openerp server.
$ su openerp
$ cd /opt/openerp/trunk
$ make pull
# addons-extra
bzr branch lp:openobject-addons/extra-trunk
# Brasil
bzr branch lp:~openerp-brazil-team/openerp.pt-br-localiz/openerp.pt-br-localiz6-1
# Fim 12/01/2012
- Primeiro faça o processo 1 até o 8, abaixo;
- Baixando direto do repositorio :
Pegue os links nesta pagina : https://launchpad.net/openobject
Exemplo (clique em um destes links abaixo):
The core OpenERP project are:
https://launchpad.net/openobject-addons : business application modules
https://launchpad.net/openobject-server : the framework
https://launchpad.net/openerp-web : web modules and frontend
https://launchpad.net/openobject-client: native interface for OpenERP (aka GTK client)
no Server por exemplo, teremos, em Series and milestones (trunk):
https://launchpad.net/openobject-server/trunk
então no terminal colocarei :
bzr branch lp:~openerp/openobject-server/trunk server
1 - Abra o terminal (Applications>Accessories>Terminal);
2 - Instale o Bazzar: "sudo apt-get install bzr";
3 - Defina seu usuario launchpad; "bzr launchpad-login
SeuLoginLaunchpad" <--(Aqui tive problemas pois eu não tinha conta no
launchpad e mesmo depois de criado a conta ele não reconhecia meu ssh.
Tive que efetuar os passos 4 a 7 antes e configular la no launchpad)
4 - Instale o openssh-client: "sudo apt-get install openssh-client";
5 - Crie sua chave: "ssh-keygen -t rsa"
Enter file in which to save the key (/home/guilherme/.ssh/id_rsa):
"Deixe em branco";
Enter passphrase (empty for no passphrase): "Digite sua frase";
Your identification has been saved in /home/guilherme/.ssh/id_rsa;
Your public key has been saved in /home/guilherme/.ssh/id_rsa.pub;
6 - Abra a chave "id_rsa.pub" que você acabou de gerar, note que ela
esta na pasta .shh, que está oculta, digite Ctrl+H para exibir;
7 - Copie esse código e adicione na sua conta do Launchpad, em SSH Keys;
8 - Baixe o arquivo instalador do OpenERP: "bzr branch lp:openerp" (o
arquivo será salvo na pasta de seu Usuário, Places>Home
Folder>openerp);
9 - No terminal, navegue até a pasta 'openerp': "cd openerp";
10 - Execute o arquivo 'bzr_set.py': "./bzr_set.py -v 5.0" (-v é a
versão que você deseja baixar: "5.0" = Versão Estável; "trunk" =
Versão atual de desenvolvimento);
11 - Repare que a primeira pasta será criada, "addons-extra", é normal
demorar um pouco para baixar. (Você pode monitorar a velocidade pelo
Monitor do Ubuntu: Sistema>Administração>Monitor do Sistema;
12 - Para instalar o PostgreSQL, use o comando: "sudo apt-get install
postgresql";
13 - Aproveite e instale também o PostgreSQL Administration Tool:
"sudo apt-get install pgadmin3";
14 - Agora configure o arquivo 'pg_hba.conf': "sudo gedit
/etc/postgresql/8.4/main/pg_hba.conf";
Procure a linha:
# Database administrative login by UNIX sockets
local all postgres ident
Substitua por:
# Database administrative login by UNIX sockets
local all all trust
------------------------------------------------------------------------
Procure a linha:
# "local" is for Unix domain socket connections only
local all all ident
Substitua por:
# "local" is for Unix domain socket connections only
local all all trust
------------------------------------------------------------------------
Procure a linha:
# IPv4 local connections:
host all all 127.0.0.1/32 md5
Substitua por:
# IPv4 local connections:
host all all 0.0.0.0/0 trust
15 - Configure o arquivo 'postgresql.conf' agora: "sudo gedit
/etc/postgresql/8.4/main/postgresql.conf";
Procure a linha
#listen_addresses = 'localhost' - Descomente ela e substitua o
'localhost' por '*':
Fica assim:
listen_addresses = '*'
16 - Reinicie o PostgreSQL: "sudo /etc/init.d/postgresql-8.4 restart";
17 - Crie um novo usuário:
"sudo su - postgres";
"createuser --createdb --username postgres --no-createrole
--pwprompt openuser";
"Enter password for new role: suasenha";
"Enter it again: suasenhadenovo";
"Shall the new role be a superuser? (y/n) y";
exit
18 - Instale os pacotes Python para o servidor:
"sudo apt-get install python python-psycopg2 python-reportlab
python-egenix-mxdatetime python-tz python-pychart python-pydot
python-lxml python-libxslt1 python-vobject python-yaml"; <--(Nesse
ponto tive dois erros de conexão e não eram da minha internet, mas
tentei mais vezes até que conseguiu baixar e instalar)
19 - Instale os pacotes Python para o client GTK:
"sudo apt-get install python-gtk2 python-glade2
python-matplotlib python-egenix-mxdatetime python-tz
python-hippocanvas";
20 - Para iniciar o servidor, navegue até a pasta 'bin' da pasta
'server', ex.: "cd openerp/server/bin/"
21 - A primeira vez que for rodar, use o seguinte comando:
"./openerp-server.py --db_user=openuser --db_password=admin
--db_host=127.0.0.1 --db_port=5432 --save"
Explicando os comandos:
--db_user=openuser -> Usuario que nós criamos anteriormente;
--db_user=xxxxxx -> Senha do usuário "openuser";
--db_host=127.0.0.1 -> IP do banco de dados;
--db_port=5432 -> A porta do postgresql, por padrão 5432;
--save -> Salva a configuração em um arquivo
localizado em Home Folder, note que será um arquivo oculto, para
exibir: Ctrl + H;
-- LOCALIZACAO BRASILEIRA
Instalação da localização brasileira com o Bazaarbzr branch lp:openerp.pt-br-localiz l10n_br
Remover a pasta l10n_br do addons que está desatualizada
cd /opt/openerp/addonsrm -rf l10n_brcd /opt/openerp/addons
ln -s ../addons-extra/account_fiscal_position_rule
ln -s ../addons-extra/account_fiscal_position_rule_purchase
ln -s ../addons-extra/account_fiscal_position_rule_stock ln -s ../addons-extra/account_fiscal_position_rule_sale ln -s ../addons-extra/account_product_fiscal_classification
ln -s ../l10n_br/l10n_br
ln -s ../l10n_br/l10n_br_account
ln -s ../l10n_br/l10n_br_base
ln -s ../l10n_br/l10n_br_data_account ln -s ../l10n_br/l10n_br_data_base
ln -s ../l10n_br/l10n_br_data_cep
ln -s ../l10n_br/l10n_br_delivery
ln -s ../l10n_br/l10n_br_fp_rule_sale_link ln -s ../l10n_br/l10n_br_product
ln -s ../l10n_br/l10n_br_purchase
ln -s ../l10n_br/l10n_br_sale
ln -s ../l10n_br/l10n_br_stock
22 - Com o servidor rodando, abra um novo terminal para iniciar o
Client GTK, navegue até a pasta 'bin' da pasta 'client', ex.: "cd
openerp/client/bin";
23 - Execute o arquivo 'openerp-client.py': "./openerp-client.py";
24 - Se você quiser usar o client Web, abra um novo terminal:
1 - "sudo apt-get install python-setuptools";
2 - Navegue até a pasta 'lib' da pasta 'web': "cd openerp/web/lib";
3 - Execute o arquivo 'populate.sh': "./populate.sh";
4 - Execute o arquivo 'openobject-web.py' que está nas pasta
'web': "./openobject-web.py";
5 - No seu navegador: "http://localhost:8080";
Publicado por :
